krethan Posted March 29, 2005 Share Posted March 29, 2005 I would like to use the RunOnceEx method to install applications. However, it seems like the cmdlines.txt is not processed or the runonce.cmd file is not properly configured. I have made sure the cmdlines.txt and runonce.cmd files are in the $OEM$ on the root of the installationation CD and made the OEMPreinstall=Yes in the winnt.sif file. I do not know how come it is not working.Here is my cmdlines.txt file:[COMMANDS]"runonce.cmd"Here is my runonce.cmd file:cmdow @ /HID@echo offFOR %%i IN (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 %%i:\CD.txt SET CDROM=%%i:SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%\005 /VE /D "Adobe Reader 7" /fREG ADD %KEY%\005 /V 1 /D "%CDROM%\install\ar7\ar7.msi /qn" /fEXITHere is my winnt.sif file:;SetupMgrTag[Data] AutoPartition=1 MsDosInitiated="0" UnattendedInstall="Yes"[Unattended] UnattendMode=FullUnattended OemSkipEula=Yes OemPreinstall=Yes TargetPath=\WINNT Repartition=Yes WaitForReboot=No[GuiUnattended] AdminPassword=test AutoLogon=Yes AutoLogonCount=1 OEMSkipRegional=1 TimeZone=10 OemSkipWelcome=1[UserData] FullName="Installed for" OrgName="Someone" ComputerName=*[TapiLocation] CountryCode=107 AreaCode=780[Branding] BrandIEUsingUnattended=Yes[URL] Home_Page=http://www.msn.ca[Proxy] Proxy_Enable=0 Use_Same_Proxy=1[Identification] JoinWorkgroup=workgroup[Networking] InstallDefaultComponents=Yes[GuiRunOnce] Link to comment Share on other sites More sharing options...
Yzöwl Posted March 29, 2005 Share Posted March 29, 2005 Have you got a file called CD.txt in the root of your CD too?If not either changeDO IF EXIST %%i:\CD.txt SET CDROM=%%i:in you runonce.cmdtoDO IF EXIST %%i:\WIN51 SET CDROM=%%i:whereWIN51 is the name of any file in the root of your CDorcreate a file called CD.txt and put it in the root of your CD Link to comment Share on other sites More sharing options...
krethan Posted March 30, 2005 Author Share Posted March 30, 2005 I put a test batch file in my cmdlines.txt as follows just to see if the cmdlines.txt was getting parsed or not: [COMMANDS]"test.bat""runonce.cmd"Here is the test.bat file:md %systemdrive%\testSure enough the test folder is being made so the problem must be with something in the runonce.cmd file. I made sure I had the cd.txt on the root of of the CD to make sure the CD-ROM variable works within the runonce.cmd file: cmdow @ /HID@echo offFOR %%i IN (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 %%i:\cd.txt SET CDROM=%%i:SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%\001 /VE /D "Adobe Reader 7" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\install\ar7\ar7.msi /qn" /fEXITI don't know why it is still not working. Link to comment Share on other sites More sharing options...
Yzöwl Posted March 30, 2005 Share Posted March 30, 2005 Is the install folder also in the root of your CD?If not, you'll need to move it there, I'm guessing you've forgot and left it in the $OEM$ folder Link to comment Share on other sites More sharing options...
krethan Posted March 30, 2005 Author Share Posted March 30, 2005 It is on the root of the CD and I checked the rest of the folder path. Thats looks all right to me. Link to comment Share on other sites More sharing options...
krethan Posted March 31, 2005 Author Share Posted March 31, 2005 It still is not working and I do not know why. Any suggestions anyone? Link to comment Share on other sites More sharing options...
Dahi Posted April 1, 2005 Share Posted April 1, 2005 Cant see anything wrong with your files. If you have CMDOW.EXE and AR7.MSI in the correct folders on your CD then it should work.For testing, try changing your runonce.cmd to this, then check C:\test.txt for errors.REM cmdow @ /HID@echo offFOR %%i IN (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 %%i:\cd.txt SET CDROM=%%i:SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%\001 /VE /D "Adobe Reader 7" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\install\ar7\ar7.msi /qn" /fecho %CDROM%\install\ar7\ar7.msi > %systemdrive%\test.txtdir %CDROM%\install\ar7 >>%systemdrive%\test.txtdir %systemroot%\system32\cmdow.exe >>%systemdrive%\test.txt Link to comment Share on other sites More sharing options...
JasonGW Posted April 1, 2005 Share Posted April 1, 2005 I don't know why .CMD *wouldn't* work, but mine is .bat and it works *flawlessly*.Jason Link to comment Share on other sites More sharing options...
nujackk Posted April 7, 2005 Share Posted April 7, 2005 how are you checking that it has been parsed ? Reason I ask is that it may in fact be working but you msi is not. try removing the cmdow so you can see what is happening. 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