tinnef Posted May 1, 2006 Share Posted May 1, 2006 I have a weird problem that i can't figure out. I run the attached script (which I assembled from various bits and pieces I found on the forums, so thanks to anyone who has contributed) from RunOnceEx, but it fails. What seems to happen is that the cdrom variable doesn't get set, causing the mountvol command to fail as well.When I run the exact same script in my xp32 UA cd, it runs without any problems. Also at the moment the script is paused and I run the script in a new CMD window, it runs fine as well so I'm pretty positive the script is fine.If anyone has any idsea why this happens, and how to solve it, please let me know.:DRIVEMGTrem call %systemdrive%\install\scripts\mapdrive.cmd ENUfor %%i in (d: e: f:) do if exist %%i\drive.set for /f %%j in (%%i\drive.set) do call %systemdrive%\install\runonceex\drivemgt2.cmd %%i %%j:SETCDFOR /F "tokens=3" %%A IN ('ECHO list volume ^| DISKPART.EXE ^| FIND.EXE "-ROM "') DO SET CDROM=%%A:FOR /F "tokens=*" %%B IN ('MOUNTVOL %CDROM% /L') DO SET VOLGUID=%%~BMOUNTVOL %CDROM% /DMOUNTVOL R: %VOLGUID%pause 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