Marthax Posted May 21, 2004 Share Posted May 21, 2004 hey guys!i recently started off on my own runonceex as i completed the batch file and thought that i would do something more nice looking. Well, now that i thought that i was finished i executed the file in windows to see if the commands are working, i mean i the switches are exepted my windows reigstry or not and when i did that the runonceex gives me the response "too many command-line parameters". Don't understand that because i've done everything the unattended site says and still it won't accept this. What am I doing wrong?. Here is a part of my runonceex that isn't accepted. REG ADD %KEY%\001 /VE /D "NAV 2004" /fREG ADD %KEY%\001 /V 1 /D "REGEDIT %systemdrive%\Install\NAV2004\NAVREG.reg /S" /fREG ADD %KEY%\001 /V 2 /D "%systemdrive%\Install\NAV2004\NAVSETUP.EXE /O REBOOT=ReallySuppress /QB" /fREG ADD %KEY%\001 /v 3 /D "taskkill.exe /F /IM cfgwiz.exe" /fREG ADD %KEY%\001 /v 4 /D "taskkill.exe /F /IM ccApp.exe" /f REG ADD %KEY%\001 /v 5 /D "taskkill.exe /F /IM symlcsvc.exe" /fREG ADD %KEY%\001 /v 6 /D "taskkill.exe /F /IM ccSetMgr.exe" /fREG ADD %KEY%\001 /v 7 /D "taskkill.exe /F /IM ccEvtMgr.exe" /fREG ADD %KEY%\001 /v 8 /D "taskkill.exe /F /IM SAVScan.exe" /fREG ADD %KEY%\001 /v 9 /D "taskkill.exe /F /IM navapsvc.exe" /fREG ADD %KEY%\001 /v 10 /D "taskkill.exe /F /IM NPROTECT.EXE" /fREG ADD %KEY%\001 /v 11 /D "%systemdrive%\Install\NAV2004\symlcsys.exe" /ffor every line that get's executed i get the answer "too many command-line parameters". The only one that i accepted as correct is this one:REG ADD %KEY% /V TITLE /D "The Setup Is Now Installing :" /fPlz help! Link to comment Share on other sites More sharing options...
hoTy3k Posted May 21, 2004 Share Posted May 21, 2004 /v 1-11 is wrong .... here my runonceex.cmd: REG ADD %KEY%\000 /VE /D "Installing WMP9 , WMM2, Codecs" /fREG ADD %KEY%\000 /V 1 /D "%systemdrive%\install\media.cmd /fREG ADD %KEY%\005 /VE /D "Installing DirectX 9.0b" /fREG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\direct.cmd /fREG ADD %KEY%\010 /VE /D "Installing .NET Framework v1.1 + Language Pack" /fREG ADD %KEY%\010 /V 1 /D "%systemdrive%\install\netfx.cmd /fREG ADD %KEY%\015 /VE /D "Installing 2 HotFixes" /fREG ADD %KEY%\015 /V 1 /D "%systemdrive%\install\updates.cmd" /fREG ADD %KEY%\020 /VE /D "Cleaning Up" /fREG ADD %KEY%\020 /V 1 /D "%systemdrive%\install\cleanup.cmd" /f Link to comment Share on other sites More sharing options...
sleepnmojo Posted May 21, 2004 Share Posted May 21, 2004 Not to clear which command isn't running, but I will try to answer the both I see.what is happening is it runs 1, then 10, then 11, then 2, ....You could add a 0 in front of the single digits, or you could make you taskkill command a lil smaller.taskkill /f /im cfgwiz.exe /im ccApp.exe /im ......If the runonceex.cmd is not adding any registry entries, then post the rest of the file. What you have posted looks fine, but if you put quotes in the key value, then I can see why this would cause a problem, ie set key="HKLM\......" Link to comment Share on other sites More sharing options...
TWILL Posted May 21, 2004 Share Posted May 21, 2004 MY guess would be the values after the %key% because the values after %key% have to be different, you have them all as 001, if they are not different the reg add will be over written by the next reg add after it.check out how hoty3k has it done.%key%001%key%005%key%010etc..goodluckTWILL Link to comment Share on other sites More sharing options...
Alanoll Posted May 21, 2004 Share Posted May 21, 2004 no...for what he wants, the 001 is right.It's not being over written as he is making 1,2,3,4,5,6 inside of it. Link to comment Share on other sites More sharing options...
Marthax Posted May 21, 2004 Author Share Posted May 21, 2004 but i have done exactly as him but the part of my runonceex that i have quoted has to be this way because otherwise it won't perform them correctly. It's still hte same program som why change regkey value? it's all the nav 2004 installation and registering process...Anyway i don't why it says that it's wrong...the thing is that as you say sleepnmojo that everything looks alright and it should work but it doesn't... i don't know the thing is that as i said i think that it should work also but it won't..i've followed all instructions but i didn't solve so much..well any ideas?? would appreciate it..'thanks in advance Link to comment Share on other sites More sharing options...
TWILL Posted May 21, 2004 Share Posted May 21, 2004 Oh Ok.... SorryYou are right Alanoll, I thought he was running different programs.Marthax, you definitley should add the zeros in fron of the numbers like sleepnmojo said.Also if you havent done so already, after you run it go to regedit and navigate to the reunonceex key and see what actually gets written and maybe that will help you narrow it down. Link to comment Share on other sites More sharing options...
TWILL Posted May 21, 2004 Share Posted May 21, 2004 I ran your code and checked the runoceex in regedit. Ive attached a screenshot. You can see how the items are out of order.That may be your problem, if you have to run the items in a certian order.untitled.bmp Link to comment Share on other sites More sharing options...
Marthax Posted May 21, 2004 Author Share Posted May 21, 2004 i'll check that out twill thanks for pointing it out for me...what's with the zeros? i don't understand...which zeros are you guys talking about..the zeros efter the %KEY%? i already have that kind of zeros.. And thanks for your replies BTW really appreciate it Link to comment Share on other sites More sharing options...
Alanoll Posted May 22, 2004 Share Posted May 22, 2004 you should add zero's to the /v 1 values.so/v 001/v 002/v 003 Link to comment Share on other sites More sharing options...
TWILL Posted May 22, 2004 Share Posted May 22, 2004 @MarthaxThe leading zeros allow it to sort correctly.if you dont have the leading zeros you get this:1101112 234if you put in the leading zeros you get this001002003004011012so heres what you wantREG ADD %KEY%\001 /VE /D "NAV 2004" /fREG ADD %KEY%\001 /V 001 /D "REGEDIT %systemdrive%\Install\NAV2004\NAVREG.reg /S" /fREG ADD %KEY%\001 /V 002 /D "%systemdrive%\Install\NAV2004\NAVSETUP.EXE /O REBOOT=ReallySuppress /QB" /fREG ADD %KEY%\001 /v 003 /D "taskkill.exe /F /IM cfgwiz.exe" /fREG ADD %KEY%\001 /v 004 /D "taskkill.exe /F /IM ccApp.exe" /f REG ADD %KEY%\001 /v 005 /D "taskkill.exe /F /IM symlcsvc.exe" /fREG ADD %KEY%\001 /v 006 /D "taskkill.exe /F /IM ccSetMgr.exe" /fREG ADD %KEY%\001 /v 007 /D "taskkill.exe /F /IM ccEvtMgr.exe" /fREG ADD %KEY%\001 /v 008 /D "taskkill.exe /F /IM SAVScan.exe" /fREG ADD %KEY%\001 /v 009 /D "taskkill.exe /F /IM navapsvc.exe" /fREG ADD %KEY%\001 /v 010 /D "taskkill.exe /F /IM NPROTECT.EXE" /fREG ADD %KEY%\001 /v 011 /D "%systemdrive%\Install\NAV2004\symlcsys.exe" /fTWILL Link to comment Share on other sites More sharing options...
Marthax Posted May 22, 2004 Author Share Posted May 22, 2004 oh, ok thx guys really appreciate it..i'll let you know if it works thanks! Link to comment Share on other sites More sharing options...
Marthax Posted May 22, 2004 Author Share Posted May 22, 2004 hi guys,well i tried it out but i still have the same problem remaining..this is what i have :cmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx REG ADD %KEY% /V TITLE /D "The Setup Is Now Installing :" /fREG ADD %KEY%\001 /VE /D "NAV 2004" /fREG ADD %KEY%\001 /V 001 /D "REGEDIT %systemdrive%\Install\NAV2004\NAVREG.reg /S" /fREG ADD %KEY%\001 /V 002 /D "%systemdrive%\Install\NAV2004\NAVSETUP.EXE /O REBOOT=ReallySuppress /QB" /fREG ADD %KEY%\001 /v 003 /D "taskkill.exe /F /IM cfgwiz.exe" /fREG ADD %KEY%\001 /v 004 /D "taskkill.exe /F /IM ccApp.exe" /f REG ADD %KEY%\001 /v 005 /D "taskkill.exe /F /IM symlcsvc.exe" /fREG ADD %KEY%\001 /v 006 /D "taskkill.exe /F /IM ccSetMgr.exe" /fREG ADD %KEY%\001 /v 007 /D "taskkill.exe /F /IM ccEvtMgr.exe" /fREG ADD %KEY%\001 /v 008 /D "taskkill.exe /F /IM SAVScan.exe" /fREG ADD %KEY%\001 /v 009 /D "taskkill.exe /F /IM navapsvc.exe" /fREG ADD %KEY%\001 /v 010 /D "taskkill.exe /F /IM NPROTECT.EXE" /fREG ADD %KEY%\001 /v 011 /D "%systemdrive%\Install\NAV2004\symlcsys.exe" /fand this is what i get :(see the attached picture)PLZ HELP ME Link to comment Share on other sites More sharing options...
sleepnmojo Posted May 22, 2004 Share Posted May 22, 2004 I copied what you had, and it works on my machine. Try turning on echo, to make sure the commands are working properly. The only other think I can think of is that you have XP home, and that might not work. Link to comment Share on other sites More sharing options...
Marthax Posted May 22, 2004 Author Share Posted May 22, 2004 ok i'll try that...but i have win xp pro...i don't understand...someone else that has an idea....? 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