whterbtobj Posted October 31, 2008 Share Posted October 31, 2008 I have a WinPE Image that runs on ramdisk.I want to run my own shell. Here is what my Winpeshl.ini looks likeWinpeshl.ini==============[LaunchApp]AppPath = D:\myShell.exeI don't want to hard code the"D:\"Can I run a script and set %CDROM% as an environment variable and be able to run%CDROM%\myShell.exe in Winpeshl.ini?Anyone out there have a solution? Link to comment Share on other sites More sharing options...
Tripredacus Posted November 3, 2008 Share Posted November 3, 2008 Is your shell so large it can't run off the ramdisk? Link to comment Share on other sites More sharing options...
WreX Posted November 6, 2008 Share Posted November 6, 2008 I've posted this several times before, but I would recommend assigning a specific letter to the CD drive (I use K:) and just go from there.@echo offecho list volume > X:\ListCD.txtFOR /F "tokens=2,4" %%i IN ('diskpart /s X:\ListCD.txt') DO @IF /I %%j == CD_ROM SET CDROMVOL=%%iIF DEFINED CDROMVOL echo select volume %CDROMVOL% > X:\ChangeCD.txtIF DEFINED CDROMVOL echo assign letter=K: >> X:\ChangeCD.txtIF DEFINED CDROMVOL diskpart /s X:\ChangeCD.txt 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