I have been looking at all this Programming to inject everything into RunOnceEx, 'tis a pain I think, but there is more than one way to "skin a cat".
All that is required is one command/routine (whichever!) to originate from RunOnceEx e.g...
@ECHO OFF IF EXIST %SYSTEMROOT%\SYSTEM32\CMDOW.EXE CMDOW @ /HID SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx REG ADD %KEY% /V TITLE /D "Installing Applications" /f REG ADD %KEY% /V Flags /T REG_DWORD /D 128 /F REG ADD %KEY%\010 /VE /D "Applications Installation Batch File" /f REG ADD %KEY%\010 /V 1 /D "%systemdrive%\Software\install.cmd" /f
@ECHO OFF // Filename: install.cmd" IF EXIST %SYSTEMROOT%\SYSTEM32\CMDOW.EXE CMDOW @ /HID // If you don't know where %temp% will take you, enter it as a command. MKDIR %temp%\myprogram1 MKDIR %temp%\myprogram2 COPY /V /Y /B %SYSTEMDRIVE%\Software\myprogram1.exe %temp%\myprogram1 COPY /V /Y /B %SYSTEMDRIVE%\Software\myprogram2.exe %temp%\myprogram2 START/WAIT %TEMP%\myprogram1\myprogram1.exe START/WAIT %TEMP%\myprogram2\myprogram2.exe RD /S /Q %SYSTEMDRIVE%\Software EXIT
I know the above looks very abbreviated, but that's all you need. Of course one (anyone) would have more than two pieces of Software to install, but still very simple, and it works a treat.
I used to install my Programs from "%SYSTEMDRIVE%\Software", and delete on finish, but some Programs require access to it's source to uninstall, or repair or re-install.
Which just causes a hassle. I also tried installing direct from the CD-DVD, some Software was okay with it, and others were not. (Trial and error). It is no big deal or loss of time to copy them over to "%temp%\Folder", and makes everything very neat and orderly.
I know which way I will be doing it...
This post has been edited by jda-au: 15 February 2008 - 10:31 AM



Help

Back to top
















