Jump to content

Recommended Posts

Posted

Hi,

I was wondering if one of you clever ppl could tell me if this kind of setup in RunOnceEX.cmd would work. (before i go and try it)

What i would like to know is will the batches of install files halt untill they are finished or will it continue to the next one using these commands?

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

REG ADD %KEY% /V TITLE /D "Unattended instalation - Applications..." /f


REG ADD %KEY%\001 /VE /D "BitCommet" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /f
RD /S /Q "%Systemdrive%\Program Files\BitComet\fav"
XCOPY /S "%CDROM%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"

REG ADD %KEY%\003 /VE /D "InCD" /f
REG ADD %KEY%\003 /V 1 /D "%CDROM%\Apps\InCD\Setup.exe /SILENT /NOREBOOT" /f

REG ADD %KEY%\005 /VE /D "System Info Tool" /f
XCOPY /S "%CDROM%\Apps\SystemInfoTool" "%Systemdrive%\Program Files\SystemInfoTool\"
COPY "%CDROM%\Links\System Info Tool.lnk" "%AllUsersProfile%\Start Menu\Programs\Accessories\System Tools\"

or am I better of using a bunch of .cmd files?

thanks

amd64


Posted

i was using .cmd files in place of the XCOPY an COPY comands.

Sample of one of my .cmd files (Install_BitComet_Favorites.cmd)

TITLE BitComet Favorites Installation......

@Echo Off

IF EXIST D:\CD.txt set CDROM=D:
IF EXIST E:\CD.txt set CDROM=E:
IF EXIST F:\CD.txt set CDROM=F:
IF EXIST G:\CD.txt set CDROM=G:
IF EXIST H:\CD.txt set CDROM=H:
IF EXIST I:\CD.txt set CDROM=I:
IF EXIST J:\CD.txt set CDROM=J:

CLS
COLOR 0A
ECHO.
ECHO.
ECHO Installing BitComet Favorites...
ECHO Please Wait...
RD /S /Q "%Systemdrive%\Program Files\BitComet\fav"
XCOPY /S "%CDROM%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"
ECHO Done!

EXIT

and using it like this

REG ADD %KEY%\001 /VE /D "BitCommet Favorites" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /f
REG ADD %KEY%\001 /V 2 /D "%CDROM%\CMDS\Install_BitComet_Favorites.cmd" /f

Posted

i'd stick with the CMD files..

REG ADD %KEY%\001 /VE /D "BitCommet" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /f
RD /S /Q "%Systemdrive%\Program Files\BitComet\fav"
XCOPY /S "%CDROM%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"

That is wrong. Without the CMD file it'd be

REG ADD %KEY%\001 /VE /D "BitCommet" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /f
REG ADD %KEY%\002 /V 1 /D "CMD.EXE /C %RD /S /Q \"%Systemdrive%\Program Files\BitComet\fav\"" /f
REG ADD %KEY%\003 /V 1 /D "CMD.EXE /C %XCOPY /S \"%CDROM%\Apps\Bit_Comet\fav\" "\%Systemdrive%\Program Files\BitComet\fav\"" /f

Or so.

Posted

ok i think i can understand you.

on the first example

REG ADD %KEY%\001 /VE /D "BitCommet" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /f
RD /S /Q "%Systemdrive%\Program Files\BitComet\fav"
XCOPY /S "%CDROM%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"

note that your favs will be copied (at t-13) BEFORE the program installs from runonce if you don't add REG ADD blah blah entries.

so the correct would be use "a bunch of cmd files" like in the second example.

next say that you haven't defined the variable %CDROM% on the runonce batch (you did it only on the favs cmd).

Posted

cheers ppl,

@SiMoNsAyS

so the correct would be use "a bunch of cmd files" like in the second example.

next say that you haven't defined the variable %CDROM% on the runonce batch (you did it only on the favs cmd).

I was using the %CDROM% variable and it worked fine.

But Alanoll's way sounds a lot better. This method has not been mentioned in the Unattended guide!!! (i think)

think i'll go give it a try!

cheers ppl :thumbup

Posted
But Alanoll's way sounds a lot better. This method has not been mentioned in the Unattended guide!!! (i think)

You mean the CMD file or the calling CMD.EXE?

If i ws to add it to the guide, I'd recommend the CMD file simply because it'd be easier.

also, to avoid having to run the same IF EXIST thigns again (I like efficiency and yeah...)

REG ADD %KEY%\001 /VE /D "BitCommet Favorites" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /f
REG ADD %KEY%\001 /V 2 /D "%CDROM%\CMDS\Install_BitComet_Favorites.cmd" /f

could be changed to

REG ADD %KEY%\001 /VE /D "BitCommet Favorites" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /f
REG ADD %KEY%\001 /V 2 /D "%CDROM%\CMDS\Install_BitComet_Favorites.cmd %CDROM%" /f

then in your CMD file

Instead of:

TITLE BitComet Favorites Installation......

@Echo Off

IF EXIST D:\CD.txt set CDROM=D:
IF EXIST E:\CD.txt set CDROM=E:
IF EXIST F:\CD.txt set CDROM=F:
IF EXIST G:\CD.txt set CDROM=G:
IF EXIST H:\CD.txt set CDROM=H:
IF EXIST I:\CD.txt set CDROM=I:
IF EXIST J:\CD.txt set CDROM=J:

CLS
COLOR 0A
ECHO.
ECHO.
ECHO Installing BitComet Favorites...
ECHO Please Wait...
RD /S /Q "%Systemdrive%\Program Files\BitComet\fav"
XCOPY /S "%CDROM%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"
ECHO Done!

EXIT

Have

TITLE BitComet Favorites Installation......

@Echo Off

CLS
COLOR 0A
ECHO.
ECHO.
ECHO Installing BitComet Favorites...
ECHO Please Wait...
RD /S /Q "%Systemdrive%\Program Files\BitComet\fav"
XCOPY /S "%1%\Apps\Bit_Comet\fav" "%Systemdrive%\Program Files\BitComet\fav\"
ECHO Done!

EXIT

Remember, this is simply for effeciencies sake :P It decreases the time by a slight ammount, but negligible.

Posted

@Alanoll

You have given me the code that reads

REG ADD %KEY%\001 /VE /D "BitCommet" /f

REG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /f

REG ADD %KEY%\002 /V 1 /D "CMD.EXE /C %RD /S /Q \"%Systemdrive%\Program Files\BitComet\fav\"" /f

REG ADD %KEY%\003 /V 1 /D "CMD.EXE /C %XCOPY /S \"%CDROM%\Apps\Bit_Comet\fav\" "\%Systemdrive%\Program Files\BitComet\fav\"" /f

Should it not read

REG ADD %KEY%\001 /VE /D "BitComet" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\Bit_Comet\bitcomet.exe /S" /f
REG ADD %KEY%\001 /V 2 /D "CMD.EXE /C %RD /S /Q \"%Systemdrive%\Program Files\BitComet\fav\"" /f
REG ADD %KEY%\001 /V 3 /D "CMD.EXE /C %XCOPY /S \"%CDROM%\Apps\Bit_Comet\fav\" "\%Systemdrive%\Program Files\BitComet\fav\"" /f

or am i right in saying that you create a new %KEY% for each entry?

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