October 18, 200421 yr I just want to know the CDROM variable for WinXP unattended on RunOnceEx.cmdIs it - > %CDROM% or %CDDRIVE% ????If I have one or more CDROM or partition, Is the system find the CDROM "with installation CD" automatically?If not , how can I let the system know where is the CDROM "with installation CD in it" ???
October 18, 200421 yr IF EXIST C:\somefile.whatever set CDROM=C:IF EXIST D:\somefile.whatever set CDROM=D:keep goin 2 the end of the alphabet IF EXIST Z:\somefile.whatever set CDROM=Z:
October 18, 200421 yr Why everybody seems to insist on doing it this way is beyond me (almost all post about their CDRom var seem to be like that anyways)for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%a:\path\to\file.xyz set CDROM=%%a: Works for all letters. One clean command line.
October 18, 200421 yr i personally use FOR %%d IN (c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z:) DO IF EXIST %%d\CD.TXT SET CDROM=%%d what it's marked in red can be changed to any singular file that you would like to use.what it's marked in green can be changed to call the cdrom like %CDROM% or %ANYSTRING%. hope it hleps edit: f***! another time some1 is faster Edited October 18, 200421 yr by SiMoNsAyS
October 18, 200421 yr Same thing than I do, just with more : 's (oh, and %%d verus %%a) Works nicely (Sorry for being a few seconds faster lol)
January 23, 201214 yr Hi, before I say anything, yes I know this seem to have been asked multiple time but bear with me. I'm a definite newb at this...anyway...I've found this little code that I think would satisfy navigating to the installation source directory with the GUIRunOnce in winnt.sif (I have no doubt this look very familiar to you experts on here)for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%a:\yourfile.xyz set CDROM=%%aI thought, why couldn't I just call cmd.exe from GUIRunOnce, passing the above statement (which would normally be ran in a separate batch file) as a parameter (or "echo" it into the prompt and ran, if that's pretty much the same thing...) instead of putting that in a separate file having to be copied from $OEM$ folder.Any idea how to do this? I must admit I have NO skill with the command prompt at all that can be even close to help here....Thanks.
January 23, 201214 yr SET will not set a variable beyond the current session so you cannot simply set a variable which can be used in future command sessions. Each line you create under GUIRunOnce will be a different command session. If you wish to work directly from GUIRunOnce, you'd have to do it all in one single line of commands concatenated as required.
January 28, 201214 yr Well...I was just thinking to use it to call on one batch file only on my disc. I'm not planning to run all my command with just one long concatenate by calling on cmd at RunOnce.
January 29, 201214 yr If you create a directory, SCRIPTS, in for instance, YourCD:\SUPPORT\TOOLS you can place MyScript.cmd inside it and run something like this from winnt.sif:[GuiRunOnce] DetachedProgram = CMD.EXE Arguments = "/Q /C FOR /F %# IN ('%SYSTEMROOT%\SYSTEM32\MOUNTVOL.EXE^|FINDSTR [C-Z]:\\') DO IF EXIST %#WIN51 CALL %#SUPPORT\TOOLS\SCRIPTS\MyScript.cmd"The above is three lines in total.That should run the script from your CDROM meaning that all commands within that script can be designed to be local to the CDROM e.g. %~d0
February 6, 201214 yr Hi, sorry for being a little late...I tried your code above but it doesn't seem to be able to find the file that my batch file is suppose to start.I first tried it in installation, then I just tried it in plain Windows with a Run dialog with the following%SYSTEMROOT%\SYSTEM32\cmd.exe /Q /C FOR /F %# IN ('%SYSTEMROOT%\SYSTEM32\MOUNTVOL.EXE^|FINDSTR [C-Z]:\\') DO IF EXIST %#WIN51 CALL %#PostInstall.cmdThe master batch PostInstall is at the root of CD, and it's suppose to "START /wait" a couple of program: the line in the batch program is : Start /wait UPDATE\3whateverprogram\whateverprogram.exe /parameterBoth pretty much give the same result of not finding what the Start command is suppose to find. Simply running the batch file from the cd's root has no such problem.Any idea how to fix this?Thanks
February 7, 201214 yr Can you provide a directory listing? Type the following into a command prompt and copy/paste the output into your response.for %# in (%systemdrive% X:) do @(echo/---%#---&dir/b/a/og %#)Replace X with the drive letter for your inserted unattended media
February 8, 201214 yr I skipped the Systemdrive part, was that required?---G:---$OEM$VALUEADDUPDATEDOCSI386SUPPORTcmpnentsPostInstall.cmdLast Session_u.iniSETUP.EXELast Session.iniBOOTFONT.BINAUTORUN.INFWIN51WIN51IPREADME.HTMsetupxp.htmwin51ip.SP2win51ip.SP3Sorry for some editing there, I moved my batch file into a folder later on but still the same problem. I now moved it back. Edited February 8, 201214 yr by drixomanbeta
February 9, 201214 yr Here's the batch file:CLS@echo offTITLE Post InstallECHO Installing KBECHO Please Wait...start /wait UPDATE\977816\update\update.exe /norestart /passive /nobackupstart /wait UPDATE\n2656353.msp /norestart /passive (there's other stuff in the same format as above here)EXIT
Create an account or sign in to comment