Jump to content

Recommended Posts

Posted

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.

:DRIVEMGT
rem call %systemdrive%\install\scripts\mapdrive.cmd ENU
for %%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

:SETCD
FOR /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=%%~B

MOUNTVOL %CDROM% /D
MOUNTVOL R: %VOLGUID%

pause


Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...