Jump to content

RunOnceEx problem in xp64


Recommended Posts

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

Link to comment
Share on other sites


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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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