Jump to content

Recommended Posts

Posted

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" /f
REG ADD %KEY%\001 /V 1 /D "REGEDIT %systemdrive%\Install\NAV2004\NAVREG.reg /S" /f
REG ADD %KEY%\001 /V 2 /D "%systemdrive%\Install\NAV2004\NAVSETUP.EXE /O REBOOT=ReallySuppress /QB" /f
REG ADD %KEY%\001 /v 3 /D "taskkill.exe /F /IM cfgwiz.exe" /f
REG 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" /f
REG ADD %KEY%\001 /v 6 /D "taskkill.exe /F /IM ccSetMgr.exe" /f
REG ADD %KEY%\001 /v 7 /D "taskkill.exe /F /IM ccEvtMgr.exe" /f
REG ADD %KEY%\001 /v 8 /D "taskkill.exe /F /IM SAVScan.exe" /f
REG ADD %KEY%\001 /v 9 /D "taskkill.exe /F /IM navapsvc.exe" /f
REG ADD %KEY%\001 /v 10 /D "taskkill.exe /F /IM NPROTECT.EXE" /f
REG ADD %KEY%\001 /v 11 /D "%systemdrive%\Install\NAV2004\symlcsys.exe" /f

for 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 :" /f

Plz help! :rolleyes:


Posted

/v 1-11 is wrong .... here my runonceex.cmd: :)

REG ADD %KEY%\000 /VE /D "Installing WMP9 , WMM2, Codecs" /f

REG ADD %KEY%\000 /V 1 /D "%systemdrive%\install\media.cmd /f

REG ADD %KEY%\005 /VE /D "Installing DirectX 9.0b" /f

REG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\direct.cmd /f

REG ADD %KEY%\010 /VE /D "Installing .NET Framework v1.1 + Language Pack" /f

REG ADD %KEY%\010 /V 1 /D "%systemdrive%\install\netfx.cmd /f

REG ADD %KEY%\015 /VE /D "Installing 2 HotFixes" /f

REG ADD %KEY%\015 /V 1 /D "%systemdrive%\install\updates.cmd" /f

REG ADD %KEY%\020 /VE /D "Cleaning Up" /f

REG ADD %KEY%\020 /V 1 /D "%systemdrive%\install\cleanup.cmd" /f

Posted

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\......"

Posted

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%010

etc..

goodluck

TWILL

Posted

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

Posted

Oh Ok.... Sorry

You 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.

Posted

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

Posted

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.. :rolleyes:

And thanks for your replies BTW really appreciate it :)

Posted

@Marthax

The leading zeros allow it to sort correctly.

if you dont have the leading zeros you get this:

1

10

11

12

2

3

4

if you put in the leading zeros you get this

001

002

003

004

011

012

so heres what you want

REG ADD %KEY%\001 /VE /D "NAV 2004" /f
REG ADD %KEY%\001 /V 001 /D "REGEDIT %systemdrive%\Install\NAV2004\NAVREG.reg /S" /f
REG ADD %KEY%\001 /V 002 /D "%systemdrive%\Install\NAV2004\NAVSETUP.EXE /O REBOOT=ReallySuppress /QB" /f
REG ADD %KEY%\001 /v 003 /D "taskkill.exe /F /IM cfgwiz.exe" /f
REG 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" /f
REG ADD %KEY%\001 /v 006 /D "taskkill.exe /F /IM ccSetMgr.exe" /f
REG ADD %KEY%\001 /v 007 /D "taskkill.exe /F /IM ccEvtMgr.exe" /f
REG ADD %KEY%\001 /v 008 /D "taskkill.exe /F /IM SAVScan.exe" /f
REG ADD %KEY%\001 /v 009 /D "taskkill.exe /F /IM navapsvc.exe" /f
REG ADD %KEY%\001 /v 010 /D "taskkill.exe /F /IM NPROTECT.EXE" /f
REG ADD %KEY%\001 /v 011 /D "%systemdrive%\Install\NAV2004\symlcsys.exe" /f

TWILL

Posted

hi guys,

well i tried it out but i still have the same problem remaining..this is what i have :

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "The Setup Is Now Installing :" /f

REG ADD %KEY%\001 /VE /D "NAV 2004" /f
REG ADD %KEY%\001 /V 001 /D "REGEDIT %systemdrive%\Install\NAV2004\NAVREG.reg /S" /f
REG ADD %KEY%\001 /V 002 /D "%systemdrive%\Install\NAV2004\NAVSETUP.EXE /O REBOOT=ReallySuppress /QB" /f
REG ADD %KEY%\001 /v 003 /D "taskkill.exe /F /IM cfgwiz.exe" /f
REG 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" /f
REG ADD %KEY%\001 /v 006 /D "taskkill.exe /F /IM ccSetMgr.exe" /f
REG ADD %KEY%\001 /v 007 /D "taskkill.exe /F /IM ccEvtMgr.exe" /f
REG ADD %KEY%\001 /v 008 /D "taskkill.exe /F /IM SAVScan.exe" /f
REG ADD %KEY%\001 /v 009 /D "taskkill.exe /F /IM navapsvc.exe" /f
REG ADD %KEY%\001 /v 010 /D "taskkill.exe /F /IM NPROTECT.EXE" /f
REG ADD %KEY%\001 /v 011 /D "%systemdrive%\Install\NAV2004\symlcsys.exe" /f

and this is what i get :

(see the attached picture)

PLZ HELP ME :)

post-70-1085244363_thumb.jpg

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...