January 26, 200521 yr Is it possible to run a cmd file from winnt.sif's [GuiRunOnce] thats on CD?I know cmdlines.txt can run it in such a way, for example (working code):[COMMANDS]"REGEDIT /S ..\Tweaks\RegTweaks.reg""..\WPI\WPI.cmd"so my Q is: Can I use this method for [GuiRunOnce]? I want to run the WPI.cmd file (which is in the WPI folder, which is in the Root of the CD, same level as the i386 folder), without copying it to HDD.
January 26, 200521 yr As long as you specify the proper path...the problem with that is on different computer the cd has a different letter assignment...so you'd have to run a bit of code that would find your cd and save the letter a variable..then you can just use the variable as the path of the cd$cd$:\wpi.cmd
January 26, 200521 yr Author i know, that's why there are the "."s there, it should avoid this problem - it does in cmdlines.txt. I just never tested it with winnt.sif...can anyone else help?
January 26, 200521 yr Author anyone ever attempt this? calling a file located on the CD from GuiRunOnce? (as opposed to it being copied over from "$oem$\$1\Install")?
January 26, 200521 yr I always run my programs from the CD that are called by my GuiRunOnce batch file. You'd do something like this:for %%i in (C: D: E: F: G: H: I: J:) do if exist %%i\win51ip.SP2 set CDROM=%%istart /wait %CDROM%\Updates\apps\netfxsp1.exeObviously, the second line is a usage example.
January 27, 200521 yr I've always used RunOnceEx to run programs from the CD/DVD. I use VBscipt instead of batch, but it's essentially the same process. Determine the drive letter and away you go. What I do is actually put a VBscript in the ROE entry and that script installs software from the media.Option ExplicitDim fs, objService, objSoftware, Drives, Drive, strFiles, errReturnSet fs = CreateObject("Scripting.FileSystemObject")Set objService = GetObject("winmgmts:")Set objSoftware = objService.Get("Win32_Product")Drives = Array("C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", _"R", "S", "T", "U", "V", "W", "X", "Y", "Z")For Each Drive In Drives If fs.FileExists(Drive & ":\WIN51") Then strFiles = Drive & ":\EXTRAS\"Next'**********************************************************************'** Run Tasks **'**********************************************************************errReturn = objSoftware.Install(strFiles & "\Adobe Reader 7.0.msi", , True)errReturn = objSoftware.Install(strFiles & "\Camtasia Studio.msi", , True)errReturn = objSoftware.Install(strFiles & "\FFDShow.msi", , True)errReturn = objSoftware.Install(strFiles & "\J2RE5.0_1.msi", , True)
January 27, 200521 yr Author nono, you both misunderstood me.i know a batch file can determine a CDROM variable - but then i'd have to put a cmd file in $OEM$\$1 . I am trying to NOT copy ANYTHING to the harddrive (even the tiny cmd file).so is there any way to get that INITIAL cmd file to run FROM the cd? maybe using an approach similar to what i post in my first post?
January 27, 200521 yr so if i putin my RunOnceExfor %%i in (C: D: E: F: G: H: I: J:) do if exist %%i\win51ip.SP2 set CDROM=%%istart /wait %CDROM%\install\wpi\WPI.cmdAndcmd1[pn]=['%CDROM%\\Install\\Blah\\Blah.exe /S']would wpi install it from the cd?
January 27, 200521 yr wait for people to reply. You failed ot wait even 24 hours...\ does NOT work simply because GUIRunOnce is not executed in the $OEM$ directory. The current directory is on the HDD i believe. So it DOES NOT WORK.It works in CMDLINES.TXT simply because CMDLINES.TXT has a current directory of $OEM$.I've warned you before about waiting for people to reply...
January 27, 200521 yr As far as I know it is not possible to do this with [GuiRunOnce], a06lp. However, you could use a script executed from cmdlines.txt. This is essentially what people use RunOnceEx.cmd to do.Try running a batch file from there with code similar to:for %%i in (C D E F G H I J K L M N O P Q R S T L U V W X Y Z) do if exist %%i\win51ip.SP2 set CDROM=%%i:SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Title For Window" /fREG ADD %KEY%\001 /VE /D "Name of step" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\WPI\WPI.cmd" /fThis will be run the first time a user logs in to Windows after the install has been completed, exactly the same time as a program called from [GuiRunOnce]. The only real difference is that there will be a dialogue box created that displays each successive program as it is run.And do try to be a little more patient. Even one full day is not all that long to wait for an answer...
February 1, 200521 yr you can use setx.exe which can be obtained from XPCD\support\tools\support.cab,place it in $OEM$\$$\system32Execute a batch file containing the following code @T12(from cmdline.txt)setx SOURCE -k HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SourcePath -mthis will establish a system environment variable called "SOURCE" which stands for the CD drive you install XP fromuse[RuiRunOnce] %SOURCE%install.cmd %SOURCE%something ...................to perform your job Note the path does not contain a backlash "\"hope this helps a bit
Create an account or sign in to comment