Hello All,
I am having a small problem with getting this to run, i keep getting an error when vmware gets to the part where it runs the runonceex.cmd. A window pops up and says, "Too many command line parimeters".
Any ideas?
Briar
Oh, Here is the code for my runonceex.cmd:
cmdow @ HID
@Echo Off
for /f "tokens=3 skip=2" %%i in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v SourcePath') do set cddrive=%%~di
SET PP=%cdrom%\$1\Apps\
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing Applications" /f
REG ADD %KEY%\000 /VE /D "Acrobat Reader 6.0" /f
REG ADD %KEY%\000 /V 1 /D "%PP%AdbeRdr60_enu_full.exe -p"-s /v\"/qn\""" /f
REG ADD %KEY%\001 /VE /D "WinRAR 3.20" /f
REG ADD %KEY%\001 /V 1 /D "%PP%wrar320.exe /s" /f
REG ADD %KEY%\002 /VE /D ".Net Framework 2.0" /f
REG ADD %KEY%\002 /V 1 /D "%PP%dotnetfx.exe /Q" /f
REG ADD %KEY%\003 /VE /D "MDAC 2.8 SP1" /f
REG ADD %KEY%\003 /V 1 /D "%PP%MDAC_28SP1.exe /q /n /q:a" /f
EXIT
Page 1 of 1
RunonceEx.cmd RunonceEx.cmd
#2
Posted 08 December 2005 - 11:45 AM
I think this:
Should be:
(If you want it to run hidden that is)
cmdow @ HID
Should be:
cmdow @ /HID
(If you want it to run hidden that is)
#3
Posted 08 December 2005 - 12:41 PM
A couple of things here
1.
for /f "tokens=3 skip=2" %%i in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v SourcePath') do set cddrive=%%~di
SET PP=%cdrom%\$1\Apps\
^^ Also, if the apps are in '$oem$\$1\Apps' then they will be copied to HDD and can/should be run from there. For that you can more simple use...
2.
Some unescaped quotes in this line -- this is where your too many parameters error is
REG ADD %KEY%\000 /V 1 /D "%PP%AdbeRdr60_enu_full.exe -p"-s /v\"/qn\""" /f
1.
for /f "tokens=3 skip=2" %%i in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v SourcePath') do set cddrive=%%~di
SET PP=%cdrom%\$1\Apps\
^^ Also, if the apps are in '$oem$\$1\Apps' then they will be copied to HDD and can/should be run from there. For that you can more simple use...
set PP=%systemdrive%\Apps\(no need to use the /for line)
2.
Some unescaped quotes in this line -- this is where your too many parameters error is
REG ADD %KEY%\000 /V 1 /D "%PP%AdbeRdr60_enu_full.exe -p"-s /v\"/qn\""" /f
This post has been edited by nakira: 08 December 2005 - 12:42 PM
#4
Posted 08 December 2005 - 01:42 PM
Thanks for the reply, it stopped saying that it has too many command line parimeters, but it still wont add to the runonceex in the registry.
Here is my code now:
CMDOW @ /HID
@Echo Off
SET PP=%systemdrive%\Apps\
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing Applications" /f
;REG ADD %KEY%\000 /VE /D "Acrobat Reader 6.0" /f
;REG ADD %KEY%\000 /V 1 /D "%PP%AdbeRdr60_enu_full.exe -p"-s /v\"/qn\""" /f
REG ADD %KEY%\001 /VE /D "WinRAR 3.20" /f
REG ADD %KEY%\001 /V 1 /D "%PP%wrar320.exe /s" /f
REG ADD %KEY%\002 /VE /D ".Net Framework 2.0" /f
REG ADD %KEY%\002 /V 1 /D "%PP%dotnetfx.exe /Q" /f
REG ADD %KEY%\003 /VE /D "MDAC 2.8 SP1" /f
REG ADD %KEY%\003 /V 1 /D "%PP%MDAC_28SP1.exe /q /n /q:a" /f
EXIT
Again thanks for all the help so far.
Here is my code now:
CMDOW @ /HID
@Echo Off
SET PP=%systemdrive%\Apps\
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing Applications" /f
;REG ADD %KEY%\000 /VE /D "Acrobat Reader 6.0" /f
;REG ADD %KEY%\000 /V 1 /D "%PP%AdbeRdr60_enu_full.exe -p"-s /v\"/qn\""" /f
REG ADD %KEY%\001 /VE /D "WinRAR 3.20" /f
REG ADD %KEY%\001 /V 1 /D "%PP%wrar320.exe /s" /f
REG ADD %KEY%\002 /VE /D ".Net Framework 2.0" /f
REG ADD %KEY%\002 /V 1 /D "%PP%dotnetfx.exe /Q" /f
REG ADD %KEY%\003 /VE /D "MDAC 2.8 SP1" /f
REG ADD %KEY%\003 /V 1 /D "%PP%MDAC_28SP1.exe /q /n /q:a" /f
EXIT
Again thanks for all the help so far.
#5
Posted 08 December 2005 - 02:24 PM
Briar, on Dec 8 2005, 08:42 PM, said:
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
I think HKLM doesn't work ... try with HKCU ....
and for other programs you must use \ before other " symbol ... example: "program.exe with=\"param1\""
With this in the registry you have program.exe with="param1" .... the red quotes is just for encapsule the whole argument of reg add ...
- ← Force Windows Update
- Unattended Windows 2000/XP/2003
- JoinDomain setted and still end in Workgroup! →
Share this topic:
Page 1 of 1



Help
Back to top









