iwod Posted March 18, 2005 Posted March 18, 2005 I have this in my Winnt.sif. I don't understand why Start.cmd is not run after the setup and only after another restart. What am i missing?[GUIRunOnce] command7= "%SystemDrive%\DP\S\Sound_Control_Panels_1.cmd" command8= "%SystemDrive%\DP\S\Sound_Control_Panels_2.cmd" command9= "cmd.exe /c RD /S /Q %SystemDrive%\DP" %systemdrive%\start.cmdwhat is the sign for % in a CMD file? Because % is used as a operator in CMD file and i am trying to remove the link for Alcohol 120%DEL "%AllUsersProfile%\Desktop\Alcohol 120%.lnk"Another problem is with program files. %Programfiles% works but when i stick them all in it will generate a Error message stating C:\Program not found. I found out if i use [ "%Programfiles%command" -switch ] then it will work in CMD. So i am wondering what i need to do in Runonce. REG ADD %KEY%\025 /VE /D "Clean Up" /fREG ADD %KEY%\025 /V 1 /D "%PP%%ProgramFiles%\Mozilla Thunderbird\thunderbird.exe -silent -nosplash -setDefaultMail" /fREG ADD %KEY%\025 /V 2 /D "%PROGRAMFILES%\Mozilla Firefox\firefox.exe -silent -nosplash -setDefaultBrowser" /f
un4given1 Posted March 18, 2005 Posted March 18, 2005 what is the sign for % in a CMD file? Because % is used as a operator in CMD file and i am trying to remove the link for Alcohol 120%Since it parses the first % just use "Alcohol 120%%"
rendrag Posted March 18, 2005 Posted March 18, 2005 or you could just doDEL "%AllUsersProfile%\Desktop\Alcohol*.lnk"that'll delete every shortcut on the desktop that starts with alcohol.
iwod Posted March 18, 2005 Author Posted March 18, 2005 Thanks. What about the first question? any ideas?Edit: And i edited a 2nd question as well.
Alanoll Posted March 19, 2005 Posted March 19, 2005 start.cmd importing RunOnceEX entries?As for the %ProgramFiles% problem, you'll need to enclose the path in quotes, but in RunOnceEX you'll need to escape the quotes ( \" )
iwod Posted March 19, 2005 Author Posted March 19, 2005 start.cmd importing RunOnceEX entries?As for the %ProgramFiles% problem, you'll need to enclose the path in quotes, but in RunOnceEX you'll need to escape the quotes ( \" )<{POST_SNAPBACK}>Yes. Start.cmd has all my RunonceEX entries. ( Sorry my first time using RunonceEX method , Anything wrong? )2. So it would be like?"\"%ProgramFiles%\Mozilla Thunderbird\thunderbird.exe\" -silent -nosplash -setDefaultMail"
Alanoll Posted March 19, 2005 Posted March 19, 2005 1. Yes, you're doing it wrong. Simlest fix is to add:rundll32.exe iernonce.dll,RunOnceExProcessat the end of the START.CMD file just before the EXIT.2. Correct
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