Jump to content

Convert start.cmd to runonceex.cmd


Recommended Posts

Hello

I have some problems to convert my start.cmd to a RunOnceEx.cmd

Here is the content of my start.cmd

ECHO.

ECHO Installation de CDex

Echo Permet de ripper les cd audio en MP3

ECHO Veuillez patienter......

start /wait %systemdrive%\Install\Applications\CDex\cdex_151.exe /S

echo installation terminee

echo.

echo Installation de Adobe acrobat reader

echo Permet de lire les fichier PDF

ECHO Veuillez patienter......

start /wait %systemdrive%\Install\Applications\AdobeReader\AdbeRdr60_fra_full.exe -p"-s /v\"/qn\""

echo installation terminee

echo.

echo Installation de MSN messenger

echo Outil de messagerie instantanee

ECHO Veuillez patienter......

start /wait %systemdrive%\Install\Msn\MsnMsgs.msi /QB

echo installation terminee

echo.

echo Installation Pack Office 2003

echo Suite bureautique

ECHO Veuillez patienter......

start /wait %systemdrive%\install\Applications\Office2003\setup.exe TRANSFORMS="unattended.mst" /qb-

echo installation terminee

echo.

echo Installation Norton Antivirus 2004

echo Logiciel Antivirus

echo Veuillez patienter...

start /wait %systemdrive%\install\Applications\NAV2004\NAV\NAV.msi /QB

echo installation terminee

Can someone help me to convert these lines to RunOnceex ?

Thanks a lot

Greg

Link to comment
Share on other sites


Hello

I've tried this :

@echo off

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

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

REG ADD %KEY%\005 /VE /D "CdEx" /f

REG ADD %KEY%\005 /V 1 /D "%systemdrive%\Install\Applications\CDex\cdex_151.exe /S" /f

REG ADD %KEY%\010 /VE /D "Adobe Reader 6" /f

REG ADD %KEY%\010 /V 1 /D "%systemdrive%\Install\Applications\AdobeReader\AdbeRdr60_fra_full.exe -p"-s /v\"/qn\"" /f

REG ADD %KEY%\015 /VE /D "MSN Messenger" /f

REG ADD %KEY%\015 /V 1 /D "%systemdrive%\Install\Msn\MsnMsgs.msi /qn" /f

REG ADD %KEY%\020 /VE /D "Pack Microsoft Office 2003" /f

REG ADD %KEY%\020 /V 1 /D "%systemdrive%\Install\Applications\Office2003\setup.exe TRANSFORMS="unattended.mst" /qb- /f

REG ADD %KEY%\020 /VE /D "Norton Internet Security 2004" /f

REG ADD %KEY%\020 /V 1 /D "%systemdrive%\Install\Applications\NAV2004\NAV\NAV.msi /QB" /f

exit

I'm a little lost with the "" and \", that's why I asked your help...but in fact i should had post my RunOnceExe file :blushing:

Can you also explain me what does the \015\ mean ?

Thanks

Greg

Link to comment
Share on other sites

\015 simply puts an order to the process. Lower numbers are executed prior to larger ones.

REG ADD %KEY%\010 /VE /D "Adobe Reader 6" /f
REG ADD %KEY%\010 /V 1 /D "%systemdrive%\Install\Applications\AdobeReader\AdbeRdr60_fra_full.exe -p"-s /v\"/qn\"" /f

should be

REG ADD %KEY%\010 /VE /D "Adobe Reader 6" /f
REG ADD %KEY%\010 /V 1 /D "%systemdrive%\Install\Applications\AdobeReader\AdbeRdr60_fra_full.exe -p\"-s /v\"/qn\"\"" /f

and

REG ADD %KEY%\020 /VE /D "Pack Microsoft Office 2003" /f
REG ADD %KEY%\020 /V 1 /D "%systemdrive%\Install\Applications\Office2003\setup.exe TRANSFORMS="unattended.mst" /qb- /f

should be

REG ADD %KEY%\020 /VE /D "Pack Microsoft Office 2003" /f
REG ADD %KEY%\020 /V 1 /D "%systemdrive%\Install\Applications\Office2003\setup.exe TRANSFORMS=\"unattended.mst\" /qb- /f

The question on the quotes really isn't.... with "" but just with embedded quotes in general.....like your offcie line...

the outer quotes (the ones just after the /D and the ending ones just before the /f) don't get \ before them. ALL INNER QUOTES do. If you don't entire the \ with the inside quotes, then when importing the line is taken as two strings and imported wrong. the \ escapes the quotes and causes the line to be ONE string with the quotes inside.

Link to comment
Share on other sites

1 more correction

REG ADD %KEY%\020 /VE /D "Pack Microsoft Office 2003" /f
REG ADD %KEY%\020 /V 1 /D "%systemdrive%\Install\Applications\Office2003\setup.exe TRANSFORMS=\"unattended.mst\" /qb- /f

should be

REG ADD %KEY%\020 /VE /D "Pack Microsoft Office 2003" /f
REG ADD %KEY%\020 /V 1 /D "%systemdrive%\Install\Applications\Office2003\setup.exe TRANSFORMS=\"unattended.mst\" /qb-" /f

notice the " after qb- to end the command.

it is easy to convert your commands, just take your time. once you start you can't finish :P

Link to comment
Share on other sites

mind you the quotes around the mst you can leave out.

REG ADD %KEY%\020 /VE /D "Pack Microsoft Office 2003" /f
REG ADD %KEY%\020 /V 1 /D "%systemdrive%\Install\Applications\Office2003\setup.exe TRANSFORMS=unattended.mst /qb-" /f

Easier to look at and not tending to make mistakes.

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