From: Greg Ercolano <erco@(email surpressed)>
Subject: Q+A: Under windows, how to ensure drive letters are mapped?
   Date: Sat, 16 Apr 2004 03:59:26 -0700
Msg# 539
View Complete Thread (0 article) | All Threads
> Some of our artists can't get away from having mapped drives appear
> in their scene files, instead of UNC paths. I know UNC paths are
> more reliable, but is there some way to have Rush make sure
> drive letters are mapped on the remote Windows machines?

	Windows has a command called 'net use' that can map
	drive letters from the command line.

	You can embed these commands in the render script
	just above the render command, to ensure the drives
	are mapped BEFORE the renderer is invoked.

	The syntax is:

	    NET USE Z: \\YOURSERVER\VOLUMENAME /PERSISTENT:YES

	As you can see from the syntax of the command, drive letters
	are implemented on top of UNC paths in Windows. UNCs are the
	"real thing".

	So in the "-render" section of your submit script,
	you might want to add commands like:

	    system("NET USE X: \\\\bigserver\\volume1 /persistent:yes");
	    system("NET USE Y: \\\\bigserver\\volume2 /persistent:yes");
	    system("NET USE Z: \\\\bigserver\\volume3 /persistent:yes");

	..which ensure that the X, Y and Z drives are mapped to the
	appropriate UNC paths \\bigserver\volume1, etc.

	Note that in Perl, you have to double the backslashes in strings,
	because backslashes are escape characters. So the UNC path \\foo\bar
	has to be written as "\\\\foo\\bar" inside Perl.

	However, you will want to make sure you /submit/ the job with UNC
	paths, to ensure the script can at least open its log file, even
	if the drives aren't already mapped on the remotes. (Before the
	remote can run the script, it opens the log file, and if the log
	file is a mapped drive, it can't run the script that makes the maps..)

	This will protect your animator from drive letters embedded in their
	scene file.