Jump to content

Recommended Posts

Posted

Hi,

I made my own unattended XP install.

Problem is the applications I added are not unattended installed:

I've got this error in setuperr.log :(translated from french :P)

Warning: Setup was unabe to invoke external program runonceex.cmd
CreateProcess returned error 2 (2).

***

Error:
Setup was unable to execute the commands in $OEM$\OEMFILES\cmdlines.txt.

My cmdlines.txt is :

[COMMANDS]
"runonceex.cmd"

My runonceex.cmd is:

cmdow @ /HID
@echo off

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

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

REG ADD %HEY%\005 /VE /D "MSN Messenger 7.5" /f
REG ADD %HEY%\005 /V 1 /D "%Systemdrive%\INSTALL\MSN\MsnMsgs.msi /qn" /f

REG ADD %HEY%\010 /VE /D "Emule 0.46c" /f
REG ADD %HEY%\010 /V 1 /D "%Systemdrive%\INSTALL\EMULE\emule.exe /S" /f

REG ADD %HEY%\015 /VE /D "Winamp 5" /f
REG ADD %HEY%\015 /V 1 /D "%Systemdrive%\INSTALL\WINAMP\winamp.msi /qn Xfull=1 XDesktop=0 XQuicklaunch=1" /f

REG ADD %KEY%\090 /VE /D "Ajout des utilisateurs" /f
REG ADD %KEY%\090 /V 1 /D "%Systemdrive%\INSTALL\comptes.cmd" /f

REG ADD %KEY%\095 /VE /D "Modification de la base de registre" /f
REG ADD %KEY%\095 /V 1 /D "REGEDIT /S %Systemdrive%\INSTALL\regmodif.reg" /f

REG ADD %KEY%\099 /VE /D "Nettoyage et Reboot" /f
REG ADD %KEY%\099 /V 1 /D "%Systemdrive%\INSTALL\cleanup.cmd" /f

EXIT

cmdow.exe is in $OEM$\$$\system32\

all other files at their places.

I don't get it, could you help me please

Thx in advance


Posted

That looks correct, but I've got a better solution that cmdlines.txt that is less prone to error (at least for me :)).

Place your runonceex.cmd file in $oem$\$1\TEMP on your CD, then in your Winnt.sif file, use the [setupParams] section to call your script:

[SetupParams]
UserExecute=%systemdrive%\temp\runonceex.cmd

This will execute at T-9 during setup, with no need for a cmdlines.txt or any other files to keep track of.

Posted

Well I think i'm gonna try your solution

I forgot to say that in a previous version my comptes.cmd file was called from the cmdlines.txt, line under runonceex.cmd and comptes.cmd ran successfuly.

Posted

with your method i get this now :

Warning: Setup was unabe to invoke external program c:\temp\runonceex.cmd
CreateProcess returned error 2 (2).

***

Could it be because my file is renamed runonc~1.cmd ?

Posted
That's definitely it. Is the file getting renamed during install? If so, that's yet another problem because it shouldn't be...

well it's cdimage who shrinked the file names. :huh:

It's ok now it works.

It didn't work the first time and you can now all laugh at me :P look, and I searched like 1 hour why it didn't work properly:

cmdow @ /HID

@echo off

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

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

REG ADD %HEY%\005 /VE /D "MSN Messenger 7.5" /f

REG ADD %HEY%\005 /V 1 /D "%Systemdrive%\INSTALL\MSN\MsnMsgs.msi /qn" /f

REG ADD %HEY%\010 /VE /D "Emule 0.46c" /f

REG ADD %HEY%\010 /V 1 /D "%Systemdrive%\INSTALL\EMULE\emule.exe /S" /f

REG ADD %HEY%\015 /VE /D "Winamp 5" /f

REG ADD %HEY%\015 /V 1 /D "%Systemdrive%\INSTALL\WINAMP\winamp.msi /qn Xfull=1 XDesktop=0 XQuicklaunch=1" /f

REG ADD %KEY%\090 /VE /D "Ajout des utilisateurs" /f

REG ADD %KEY%\090 /V 1 /D "%Systemdrive%\INSTALL\comptes.cmd" /f

REG ADD %KEY%\095 /VE /D "Modification de la base de registre" /f

REG ADD %KEY%\095 /V 1 /D "REGEDIT /S %Systemdrive%\INSTALL\regmodif.reg" /f

REG ADD %KEY%\099 /VE /D "Nettoyage et Reboot" /f

REG ADD %KEY%\099 /V 1 /D "%Systemdrive%\INSTALL\cleanup.cmd" /f

EXIT

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