What I need to do is place the directory I CD into in a variable I can call elsewhere. What's happening is @CurDir is the same as @StartDir.

1) cd to a directory like below [this works fine].
Shell "cmd.exe /c cd %userprofile%\.."

2) make a directory in the above directory path, versus it going into the directory path of the scrip?.
MD "WDrive\" + TestDir

3) save this new directory path in a Variable $WDrive, where @CurDir is the directory I changed to in number 1 above?
$WDrive=@CurDir + "\WDrive\" + $UserDir

Does using Shell "cmd.exe / cd" store this in @CurDir?
Thanks in advance. Danfiggolf
CODE Below

; -----
; My Kixtart Script
; -----

; create a new WDrive at the Documents and Settings directory level.
Shell "cmd.exe /c cd %userprofile%\.."
$UserDir=@userid + "$$";
MD "WDrive\" + $UserDir
$WDrive=@CurDir + "\WDrive\" + $UserDir

; set permissions full control user and administrator
Shell "cmd.exe /c echo y| cacls $WDrive" + "/t /g " + @userid + ":F"
Shell "cmd.exe /c echo y| cacls $WDrive" + "/e /t /g administrator:F"

; mount virtual WDrive to the new storage area
Shell "cmd.exe /c subst W: /D"
Shell "cmd.exe /c subst.exe w: $WDrive"


Edited by danfiggolf (2007-04-25 08:36 PM)
Edit Reason: additional info