pr1ngl3 Posted January 10, 2012 Share Posted January 10, 2012 After 2 full days of searching and researching I have come up blanks so was hoping someone could help me.I have hundreds of scripts written by 3rd parties that I need to incorporate into a WIM, the trouble is all the scripts are hard coded to reference an X: drive. I can not rework the scripts becuause of licensing and liabilities so need to find a way of getting WinPE to alllow me to physically set the drive letter it loads as the RAM drive and subsiquently mount a device as the X: drive.I have looked into SUBST but it will obviously not allow substitution of the %Systemdrive%I have looked at DOSKEY but the complexity because of the number of hardcoded references to X:\<whatever>\<whatever>\<whatever> far outweighs the possibilitiesI have looked at the options within bcdedit > devobject > {ramdisk} but there is nothing associated with the drive letterI can't believe MS would hardcode the drive letter so deeply that it can not be changed, I know with the intruduction of WMI the registry needs a hardcoded reference, but surely this can be dynamic up to the point of creating the RAM Drive, even if this means rebuilding the sdi. Link to comment Share on other sites More sharing options...
cdob Posted January 11, 2012 Share Posted January 11, 2012 WinPE with SystemRoot on C:\ (or anything) Link to comment Share on other sites More sharing options...
daremo Posted February 27, 2012 Share Posted February 27, 2012 After 2 full days of searching and researching I have come up blanks so was hoping someone could help me.I have hundreds of scripts written by 3rd parties that I need to incorporate into a WIM, the trouble is all the scripts are hard coded to reference an X: drive. I can not rework the scripts becuause of licensing and liabilities so need to find a way of getting WinPE to alllow me to physically set the drive letter it loads as the RAM drive and subsiquently mount a device as the X: drive.......I can't believe MS would hardcode the drive letter so deeply that it can not be changed, I know with the intruduction of WMI the registry needs a hardcoded reference, but surely this can be dynamic up to the point of creating the RAM Drive, even if this means rebuilding the sdi.You can try the following:First, mount the boot.wim file which is the winPE-Dism /Mount-Wim /WimFile:D:\data\boot.wim /index:1 /MountDir:D:\data\tmpWimMountwhich mounts the boot.wim file (located at D:\data\ folder) to a new folder (D:\data\tmpWimMount)Then ask for PE environment settings-Dism /image:D:\data\tmpWimMount /Get-PESettingsOne of these information displayed is the windows root directory (such as "X:$windows.~bt\windows")Alternatively, you can also get the Windows Root Directory information directly by issuing the following command- Dism /image:D:\data\tmpWimMount /Get-TargetPathYou can reset the root directory to something you want. Most of the time, for custom WinPE, and especially when building Win7PESE via winbuilder, or for LastOS custom PE via the lastos builder, you need to set the windows root directory to "X:\". You must issue- Dism /image:D:\data\tmpWimMount /Set-TargetPath:X:\ (or some other drive letter)Finally, you have to commit the changes and unmount the boot.wim image- Dism /Unmount-Wim /MountDir:D:\data\tmpWimMount /commitRepeat the above steps for boot.wim index=2 image as well, and make sure the target path is the same as what you have specified for boot.wim index=1 image. Commit changes and unmount boot.wim index-2 image.Then try out your scripts and see if that works. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now