Jump to content

RunOnceEx.cmd


Recommended Posts

Hi, i've read threads about the RunOnceEx.cmd but i'm not figuring out how to put it in winnt.sif.

I was using a batch file wich i called %systemdrive%\install\hotfixes\hotfixes.cmd in the [GuiRunOnce] section before but then, i've read that you could replace the GuiRunOnce section by RunOnceEx to have a graphical view of what is installing on your computer.

I'd like to know how to add the RunOneEx in winnt.sif. Do i have to delete the GuiRunOnce section and replace it with RunOneEx ? If so, do i have to call a file such as RunOnceEx.cmd somewhere ?

Thanks for your support,

Magellan456

Link to comment
Share on other sites


no entery for RunOnceEx.cmd in winnt.sif

u only have to put RunOnceEx.cmd in $OEM$ folder & it will be called from cmdlines.txt

I think u should delete guirunonce coz ;not need it then

plz read more at the site @ RunOnceEx section

Link to comment
Share on other sites

If you really wanted to execute RunOnceEx.cmd from [GuiRunOnce], you can add rundll32.exe iernonce.dll,RunOnceExProcess to the very bottom of the cmd file, so the RunOnceEx window is launched straight after.

Link to comment
Share on other sites

Hi, Thanks for the Informat AaronXp.

Unfortunatly i just finished trying my cd and the RunOnceEx command didn't lunch.

I'm now trying to figure out why.

Maybe you can help me.

I've put the files: cmdlines.txt and RunOnceEx.cmd in the $OEM$ forlder.

My cleanup.cmd and prepare.cmd files are in the $OEM$\$1\Install Folder.

I have mofified my winnt.sif and removed the [GuiRunOnce] section as proposed above.

There's maybe a problem with my svcpack.inf. I'm using it to put some hotfixes during installation... maybe i need to add something to it.

Note that the hotfixes in my svc pack where sucsessfully installed during my installation.

I don't really know what went wrong.

Any help is welcome!

Thank you,

Magellan456

Link to comment
Share on other sites

Ok. Hi, here's the winnt.sif, RunOnceEx.cmd and cmdlines.txt

Winnt.sif

;SetupMgrTag

[Data]

AutoPartition=0

MsDosInitiated="0"

UnattendedInstall="Yes"

[unattended]

UnattendMode=FullUnattended

OemSkipEula=Yes

OemPreinstall=Yes

TargetPath=\WINDOWS

Repartition=No

UnattendSwitch="yes"

WaitForReboot="No"

[GuiUnattended]

AdminPassword=*

EncryptedAdminPassword=NO

OEMSkipRegional=1

TimeZone=35

OemSkipWelcome=1

[userData]

ProductKey=removed

FullName="Usager"

OrgName=""

ComputerName=Utilisateur

[TapiLocation]

CountryCode=107

AreaCode=819

[RegionalSettings]

LanguageGroup=1

Language=00000c0c

[identification]

JoinWorkgroup=WORKGROUP

[Networking]

InstallDefaultComponents=Yes

[Components]

msmsgs=off

RunOnceEx.cmd :

cmdow @ /HID

@echo off

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

REG ADD %KEY% /V TITLE /D "Installation des applications" /f

REG ADD %KEY%\001 /VE /D "Preparation de l'installation..." /f

REG ADD %KEY%\001 /V 1 /D "%systemdrive%\install\prepare.cmd" /f

REG ADD %KEY%\005 /VE /D "Pack Reseau Avance" /f

REG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\hotfixes\Q817778.EXE /Q /O /N /Z" /f

REG ADD %KEY%\010 /VE /D "Mise a Jour de Securite pour Ms Data Access Components" /f

REG ADD %KEY%\010 /V 1 /D "%systemdrive%\install\hotfixes\Q823718.exe /T:%systemdrive%\install\tmp /C:\"%systemdrive%\install\tmp\dahotfix.exe /q /n\" /Q" /f

REG ADD %KEY%\015 /VE /D "Installation de Microsoft Windows Media Player 9" /f

REG ADD %KEY%\015 /V 1 /D "%systemdrive%\install\hotfixes\MP.exe /Q:A /R:N" /f

REG ADD %KEY%\020 /V 1 /D "%systemdrive%\install\hotfixes\q828026.exe /Q /O /N /Z" /f

REG ADD %KEY%\025 /VE /D "Installation de .NET Framework v1.1" /f

REG ADD %KEY%\025 /V 1 /D "%systemdrive%\install\hotfixes\frameworks\netfx.msi /qb" /f

REG ADD %KEY%\030 /V 1 /D "%systemdrive%\install\hotfixes\frameworks\lpack\langpack.msi /qb" /f

REG ADD %KEY%\035 /VE /D "Installation des mises a jour systeme" /f

REG ADD %KEY%\040 /V 1 /D "%systemdrive%\install\hotfixes\Q322011.EXE /Q /O /N /Z" /f

REG ADD %KEY%\045 /V 1 /D "%systemdrive%\install\hotfixes\Q327979.EXE /Q /O /N /Z" /f

REG ADD %KEY%\050 /V 1 /D "%systemdrive%\install\hotfixes\Q330994.exe /Q:A /R:N" /f

REG ADD %KEY%\055 /V 1 /D "%systemdrive%\install\hotfixes\Q810243.exe /Q /O /N /Z" /f

REG ADD %KEY%\060 /V 1 /D "%systemdrive%\install\hotfixes\814078.EXE /Q:A /R:N" /f

REG ADD %KEY%\065 /V 1 /D "%systemdrive%\install\hotfixes\Q817787.exe /Q:A /R:N" /f

REG ADD %KEY%\070 /V 1 /D "%systemdrive%\install\hotfixes\Q819696.exe /Q /O /N /Z" /f

REG ADD %KEY%\075 /V 1 /D "%systemdrive%\install\hotfixes\q820223.exe /Q:A /R:N" /f

REG ADD %KEY%\080 /V 1 /D "%systemdrive%\install\hotfixes\Q821253.exe /Q /O /N /Z" /f

REG ADD %KEY%\085 /V 1 /D "%systemdrive%\install\hotfixes\Q822603.exe /Q /O /N /Z" /f

REG ADD %KEY%\090 /V 1 /D "%systemdrive%\install\hotfixes\Q824146.exe /Q /O /N /Z" /f

REG ADD %KEY%\095 /V 1 /D "%systemdrive%\install\hotfixes\Q826939.EXE /Q /O /N /Z" /f

REG ADD %KEY%\100 /V 1 /D "%systemdrive%\install\hotfixes\Q826942.EXE /Q /O /N /Z" /f

REG ADD %KEY%\105 /V 1 /D "%systemdrive%\install\hotfixes\Q832483.EXE /T:%systemdrive%\install\tmp2 /C:\"%systemdrive%\install\tmp2\dahotfix.exe /q /n\" /Q" /f

REG ADD %KEY%\110 /V 1 /D "%systemdrive%\install\hotfixes\B833998.EXE /Q /O /N /Z" /f

REG ADD %KEY%\115 /V 1 /D "%systemdrive%\install\hotfixes\hu10021.exe /Q:A /R:N" /f

REG ADD %KEY%\120 /V 1 /D "%systemdrive%\install\hotfixes\setup53.EXE /Q:A /R:N" /f

REG ADD %KEY%\125 /V 1 /D "%systemdrive%\install\hotfixes\wm9code.EXE /Q:A /R:N" /f

REG ADD %KEY%\130 /VE /D "Installation de Winzip 9.0" /f

REG ADD %KEY%\130 /V 1 /D "xcopy %systemdrive%\winapps\winzip\*.* \"%systemdrive%\Program Files\WinZip\ \" /I \"%systemdrive%\Program Files\WinZip\winzip32.exe\" /cleaninstall" /f

REG ADD %KEY%\135 /VE /D "Installation Adobe Reader 6.01 FR" /f

REG ADD %KEY%\135 /V 1 /D "%systemdrive%\WINAPPS\adobe\Adobe.exe -p"-s /v\"/qn\"" /f

REG ADD %KEY%\140 /VE /D "Installation de Kazaa Lite 2.4.3" /f

REG ADD %KEY%\140 /V 1 /D "%systemdrive%\WINAPPS\KLite\klite.exe /silent" /f

REG ADD %KEY%\145 /VE /D "Installation de Ad-Aware 6" /f

REG ADD %KEY%\145 /V 1 /D "%systemdrive%\WINAPPS\aware\aaw6.exe /s" /f

REG ADD %KEY%\150 /VE /D "Installation du Msn Messenger 6.1" /f

REG ADD %KEY%\150 /V 1 /D "%systemdrive%\WINAPPS\msnmess\MsnMsgs.msi /QB" /f

REG ADD %KEY%\155 /VE /D "Installation de la barre d'outils Google" /f

REG ADD %KEY%\155 /V 1 /D "%systemdrive%\WINAPPS\google\google.exe" /f

REG ADD %KEY%\160 /VE /D "Application des optimisations de la base de registre..." /f

REG ADD %KEY%\160 /V 1 /D "REGEDIT /S %systemdrive%\install\tweaks.reg" /f

REG ADD %KEY%\165 /VE /D "Nettoyage et Redemarrage" /f

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

EXIT

cmdlines.txt:

[COMMANDS]

"RunOnceEx.cmd"

There's all the files i'm using.

Thank you

Magellan456

Link to comment
Share on other sites

Hi. Good news, my cd works now. But, since i'm here, i'd like to know something.

My Winzip is not installing during my setup. I knew this one would be though because it uses " a lot.

Maybe you could help me with that.

When i was using [GuiRunOnce] with hotfixes.cmd i had this for winzip:

Echo Installation de Winzip 9.0

xcopy %systemdrive%\winapps\winzip\*.* "%systemdrive%\Program Files\WinZip\" /I

"%systemdrive%\Program Files\WinZip\winzip32.exe" /cleaninstall

Echo.

As you can see, it uses a lot of " and the problem comes when i put \ in RunOnceEx to uses " commands.

Here's my RunOnceEx.cmd using winzip:

REG ADD %KEY%\130 /VE /D "Installation de Winzip 9.0" /f

REG ADD %KEY%\130 /V 1 /D "xcopy %systemdrive%\winapps\winzip\*.* \"%systemdrive%\Program Files\WinZip\ \" /I \"%systemdrive%\Program Files\WinZip\winzip32.exe\" /cleaninstall" /f

I put a \ separated by a space by choice in the line (...)systemdrive%\Program Files\WinZip\ \" /I \"%systemdrive%\Program(...)

Maybe that's the problem...

Another thing i'd like to know, if you don't mind, is how can i create a menu at the end of the installation asking the user wich applications he'd like to install, such as Norton Antivirus, Spysweeper, Winrar...etc. I've seen menu like this in some threads but i didn't find how to do it.

Thanks a lot for your support!

Magellan456

Link to comment
Share on other sites

Could you be more specficic Aaronxp ?

What do you mean by launch a batch file from RunOnceEx containing the xcopy commands ?

Would i have to create a .cmd file containing the xcopy command about winzip and put it in the $oem$ folder afterward ?

And if so, do i add a line at the end in my runonceex.cmd pointing to this .cmd file ?

You're also suggesting me to Otherwise add a cmd.exe /c before the xcopy command.

What does the /c stands for ?

Thank you, you're really nice to help me through this one pal,

Magellan456

Link to comment
Share on other sites

What do you mean by launch a batch file from RunOnceEx containing the xcopy commands ?

Would i have to create a .cmd file containing the xcopy command about winzip and put it in the $oem$ folder afterward ?

Yes, create a cmd file with just this:

xcopy %systemdrive%\winapps\winzip\ "%programfiles%\WinZip\" /I

"%programfiles%\WinZip\winzip32.exe" /cleaninstall

EXIT

Then launch it from RunOnceEx with something like this:

REG ADD %KEY%\040 /VE /D "Copying Winzip files" /f

REG ADD %KEY%\040 /V 1 /D "%systemdrive%\path\to\winzip.cmd" /f

To answer your last question: "/C Carries out the command specified by string and then terminates" (this is from typing out cmd.exe /?). But its less messy using the above method anyway.

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