Haxelon Posted December 17, 2009 Posted December 17, 2009 Hello i am almost finished with my unatended windows 7 instalation disk. here is the last problem i got. I use the Setupcomplete.cmd to install application un the first login. here is the code. The only problem is that not all the applicatiuons are installed ( only office and AVG9 ) But if i run the commands manualy it work. I was able to do this on windows Xp but windows 7 give me alot of problems. any help would be really apreciated. cmdow @ /HID@echo offFOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\CD.txt SET CDDRIVE=%%i:SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Install Par Francis Gauthier" /fREG ADD %KEY%\020 /VE /D "Winrar 3.9" /fREG ADD %KEY%\020 /V 1 /D "%CDDRIVE%\Applications\Winrar 3.9\winrar-x64-390fr.exe /s" /fREG ADD %KEY%\030 /VE /D "0ffice 2003" /fREG ADD %KEY%\030 /V 1 /D "%CDDRIVE%\Applications\Office 2003\office2003sp3.exe" /fREG ADD %KEY%\040 /VE /D "Adobe 9.2" /fREG ADD %KEY%\040 /V 1 /D "%CDDRIVE%\Applications\Adobe 9.2\AdbeRdr920_fr_FR.exe /sAll /rs /l /msi"/qb-! /norestart ALLUSERS=1 EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES" /fREG ADD %KEY%\050 /VE /D "Flash player" /fREG ADD %KEY%\050 /V 1 /D "%CDDRIVE%\Applications\Flash player\flashaio.exe" /fREG ADD %KEY%\060 /VE /D "Java 6 update 17 x64" /fREG ADD %KEY%\060 /V 1 /D "%CDDRIVE%\Applications\Java 6 update 17 x64\jre-6u17-windows-i586-s.exe /s /v"/qn IEXPLORER=1 ADDLOCAL=ALL UPDATE=0" /fREG ADD %KEY%\070 /VE /D "K-lite 544" /fREG ADD %KEY%\070 /V 1 /D "%CDDRIVE%\Applications\K-lite 544\klcp_standard_unattended.bat" /fREG ADD %KEY%\150 /VE /D "CD Burner XP" /fREG ADD %KEY%\150 /V 1 /D "%CDDRIVE%\Applications\Cd burner xp\cdbxp_setup_4.2.7.1801.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-" /fREG ADD %KEY%\999 /VE /D "AVG 9.0" /fREG ADD %KEY%\999 /V 1 /D "%CDDRIVE%\Applications\AVG 9.0\avg_free_stf_eu_90_704a1756.exe /hide /no_welcome /REMOVE_FEATURE fea_AVG_SafeSurf /REMOVE_FEATURE fea_AVG_SafeSearch" /fEndLocalEXIT
Monty Carter Posted December 29, 2009 Posted December 29, 2009 Because two of your apps are actually working, I would say that it isn't a problem with you overall strategy for installation, by itself. Without looking at the way each item works, it is impossible to say what your problem is.However, here are a few things that I would look into first:Try using a batch file to put all of your commands into, and call the batch file as a RunOnce or RunOnceEx. If all the commands work when typed manually, then you will only have to troubleshoot the 'autostarting' of this one command, rather than each one. Another benefit to a batch file, is that you can specify wait times, inbetween each command. If MSIExec is busy when the next command starts, the second app trying to install wont have access to msiexec, and wont finish properly.Add lines for logs to your command lines, if they are available for your installer. This will give you more insight into what is happening as each command line is called.Check spaces. Try changing the paths on the executables to not include spaces. Especially when using a command line to enter registry keys, quotation marks can become very confusing, as to whether they will end up in the key, or if they will be interpreted as string separators at the time the reg add command was run. Check the registry entries before you reboot. This way, you can see if any of the entries aren't going into the registry as you had inteded. One, in particular, I notice that there are three double quotes in the line to install java. I am sure that this won't be interpreted as you have intended. On this note, you could also add an additional command for each app to install. Make this the exact same as the line you want to use to install, however, add 'echo' in front and '>>commandlog.txt' behind each command. This way, you will get a text file listing all of the command that were run. If it is a syntax error that is preventing your apps from installing, this will be the easiest way to see them.
Yzöwl Posted December 29, 2009 Posted December 29, 2009 I find it strange that you say that two of the installations worked, because all of the install lines within your file were incorrect due to spaces in the path names and a lack of supporting double-quotations, (with escapes)Here's an updated version:@CMDOW @ /HIDSETLOCALFOR %%# IN (C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%#:\CD.txt (SET CDDRIVE=%%# & GOTO INSTALL)GOTO :EOF:INSTALLSET "KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"REG ADD %KEY% /V TITLE /D "Install Par Francis Gauthier" /fREG ADD %KEY%\020 /VE /D "Winrar 3.9"REG ADD %KEY%\020 /V 1 /D "\"%CDDRIVE%\Applications\Winrar 3.9\winrar-x64-390fr.exe\" /s"REG ADD %KEY%\030 /VE /D "0ffice 2003"REG ADD %KEY%\030 /V 1 /D "\"%CDDRIVE%\Applications\Office 2003\office2003sp3.exe\""REG ADD %KEY%\040 /VE /D "Adobe 9.2"REG ADD %KEY%\040 /V 1 /D "\"%CDDRIVE%\Applications\Adobe 9.2\AdbeRdr920_fr_FR.exe\" /sAll /rs /l /msi\"/qb-! /norestart ALLUSERS=1 EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES\""REG ADD %KEY%\050 /VE /D "Flash player"REG ADD %KEY%\050 /V 1 /D "\"%CDDRIVE%\Applications\Flash player\flashaio.exe\""REG ADD %KEY%\060 /VE /D "Java 6 update 17 x64"REG ADD %KEY%\060 /V 1 /D "\"%CDDRIVE%\Applications\Java 6 update 17 x64\jre-6u17-windows-i586-s.exe\" /s /v\"/qn IEXPLORER=1 ADDLOCAL=ALL UPDATE=0\""REG ADD %KEY%\070 /VE /D "K-lite 544"REG ADD %KEY%\070 /V 1 /D "\"%CDDRIVE%\Applications\K-lite 544\klcp_standard_unattended.bat\""REG ADD %KEY%\150 /VE /D "CD Burner XP"REG ADD %KEY%\150 /V 1 /D "\"%CDDRIVE%\Applications\Cd burner xp\cdbxp_setup_4.2.7.1801.exe\" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-"REG ADD %KEY%\999 /VE /D "AVG 9.0"REG ADD %KEY%\999 /V 1 /D "\"%CDDRIVE%\Applications\AVG 9.0\avg_free_stf_eu_90_704a1756.exe\" /hide /no_welcome /REMOVE_FEATURE fea_AVG_SafeSurf /REMOVE_FEATURE fea_AVG_SafeSearch"Please note I've corrected only for coding errors, I've not looked at your switches etc.
myselfidem Posted February 1, 2010 Posted February 1, 2010 (edited) @HaxelonJ have read your message, and I hope to give you some help.I also use RunOnceEx method with Windows 7 succesfully. All programs you see here are installed succesfully.I prefere copy the programs on the HDD for the installation and after I delete the folder "Install".Here is my SetupComplete.cmdSetupComplete.cmd------------------------------------------------------------------::TITLE Windows 7 Edition Intégrale 32 bits - Méthode RunOnceEx for silent installREG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceExSET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installation des applications" /fREG ADD %KEY%\005 /VE /D "Activation Windows 7 Ultimate" /fREG ADD %KEY%\005 /V 1 /D "%systemroot%\Setup\Scripts\active.vbs" /fREG ADD %KEY%\010 /VE /D "Personnalisation Tweaks du registre" /fREG ADD %KEY%\010 /V 1 /D "REGEDIT /S %systemroot%\Setup\Scripts\Tweaks.reg" /fREG ADD %KEY%\015 /VE /D "Installation ATI Display Driver" /fREG ADD %KEY%\015 /V 1 /D "%systemdrive%\Install\ATIDriver\Setup.exe -INSTALL" /fREG ADD %KEY%\020 /VE /D "Installation Realtek R239" /fREG ADD %KEY%\020 /V 1 /D "%systemdrive%\Install\Realtek\Setup.exe -s "-f1%systemdrive%\Install\Realtek\setup.iss"" /fREG ADD %KEY%\025 /VE /D "Installation Office Standard 2007" /fREG ADD %KEY%\025 /V 1 /D "%systemdrive%\Install\Office\SETUP.EXE /config %systemdrive%\Install\Office\STANDARDR.WW\CONFIG.XML" /f REG ADD %KEY%\030 /VE /D "Installation JAVA SUN" /fREG ADD %KEY%\030 /V 1 /D "%systemdrive%\Install\Java\jre-6u17-windows-i586-s.exe /s /v "/qn"" /fREG ADD %KEY%\035 /VE /D "Installation Adobe Flash Player 10 ActiveX" /fREG ADD %KEY%\035 /V 1 /D "%systemdrive%\Install\Flash\install_flash_player_10_active_x.exe /s" /fREG ADD %KEY%\040 /VE /D "Installation Adobe Reader 9.2.0" /fREG ADD %KEY%\040 /V 1 /D "%systemdrive%\Install\Adobe\AdbeRdr920_fr_FR.exe /sAll /rs" /fREG ADD %KEY%\045 /VE /D "Installation Adobe Reader 9.2.0 eula" /fREG ADD %KEY%\045 /V 1 /D "REGEDIT /S %systemroot%\Setup\Scripts\Adobe.reg" /fREG ADD %KEY%\050 /VE /D "Installation TuneUp 2008 Key" /fREG ADD %KEY%\050 /V 1 /D "REGEDIT /S %systemroot%\Setup\Scripts\TuneUp.reg" /fREG ADD %KEY%\055 /VE /D "Installation TuneUp Utilities 2008" /fREG ADD %KEY%\055 /V 1 /D "%systemdrive%\Install\TuneUp\TU2008TrialFR.exe /qn /norestart" /fREG ADD %KEY%\060 /VE /D "Installation WinRar 390" /fREG ADD %KEY%\060 /V 1 /D "%systemdrive%\Install\WinRar\wrar390fr.exe /S" /f REG ADD %KEY%\065 /VE /D "Installation WinRar 390 Key" /fREG ADD %KEY%\065 /V 1 /D "REGEDIT /S %systemroot%\Setup\Scripts\rarreg.key" /fREG ADD %KEY%\070 /VE /D "Installation Movie Maker 2.6" /fREG ADD %KEY%\070 /V 1 /D "msiexec.exe /i "%systemdrive%\Install\MovieMaker\MM26_FR.msi" /qn" /fREG ADD %KEY%\075 /VE /D "Finalisation de l'installation" /fREG ADD %KEY%\075 /V 1 /D "%systemroot%\Setup\Scripts\clean.vbs" /fEXIT---------------------------------------------------------------------------You can see when you want install a msi file, you must use msiexec.exe.I use two vbs scripts for hide the batch, you can tray itClean.vbs--------------------------------------------Set WshShell = WScript.CreateObject("WScript.Shell" ) WshShell.Run "%SystemRoot%\Setup\Scripts\clean.bat" ,SH_WIDE ,true--------------------------------------------Clean.bat---------------------------------------------@echo offRMDIR /S /Q %systemdrive%\InstallEXIT--------------------------------------------Put all these scripts into the folder SCRIPTS.You can see the attachment here.Good luck! Edited February 5, 2010 by myselfidem
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now