Jump to content

Winnt / Cmd / Runonce Questions


Recommended Posts

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

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%

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" /f
REG ADD %KEY%\025 /V 1 /D "%PP%%ProgramFiles%\Mozilla Thunderbird\thunderbird.exe -silent -nosplash -setDefaultMail" /f
REG ADD %KEY%\025 /V 2 /D "%PROGRAMFILES%\Mozilla Firefox\firefox.exe -silent -nosplash -setDefaultBrowser" /f

Link to comment
Share on other sites


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 ( \" )

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"
Link to comment
Share on other sites

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