Jump to content

Maybe a noob problem with script


Recommended Posts

Hi guys!

I'm new on unattend install, and i having some problems...i get the idea about driverpacks, updates, themes, tweaks, etc...but the apps autoinstall are making me nuts!! I made some installations with autoit, others with silent switches, and about this everything is ok. But, why the script aren't working? It shows only a command prompt with a syntax error for every line:

(RunOnceEx Method, huh?)

cmdow @ /HID

@Echo Off

FOR %%i IN (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:\win51ip.SP2 SET CDROM=%%i:

SET PP=%cdrom%\Install\

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

REG ADD %KEY% /V TITLE /D "Instalando Programas" /f

REG ADD %KEY%\000 /VE /D "WinRAR" /f

REG ADD %KEY%\000 /V 1 /D "%PP%wrar370.exe /s" /f

REG ADD %KEY%\001 /VE /D "Messenger 8.5" /f

REG ADD %KEY%\001 /V 1 /D "%PP%WLM85.MSI" /f

REG ADD %KEY%\002 /VE /D "O&O Defrag" /f

REG ADD %KEY%\002 /V 1 /D "%PP%\oodefrag10pro\oodefrag.cmd" /f

REG ADD %KEY%\003 /VE /D "Nero 8 Ultra Edition" /f

REG ADD %KEY%\003 /V 1 /D "%PP%Nero.exe" /f

REG ADD %KEY%\004 /VE /D "Picasa2" /f

REG ADD %KEY%\004 /V 1 /D "%PP%\Picasa2\Picasa.cmd" /f

REG ADD %KEY%\005 /VE /D "Office 2003" /f

REG ADD %KEY%\005 /V 1 /D "%PP%office2003br.exe" /f

REG ADD %KEY%\006 /VE /D "Flash" /f

REG ADD %KEY%\006 /V 1 /D "%PP%flash.exe /silent" /f

REG ADD %KEY%\007 /VE /D "Messenger Plus! Live" /f

REG ADD %KEY%\007 /V 1 /D "%PP%Instalarmsgpluslive.exe" /f

REG ADD %KEY%\008 /VE /D "..." /f

REG ADD %KEY%\008 /V 1 /D "%PP%taskkill.exe /F /IM msnmsgr.exe" /f

REG ADD %KEY%\009 /VE /D "Tweaks" /f

REG ADD %KEY%\009 /V 1 /D "%PP%REGEDIT32 /s tweaks.reg" /f

REG ADD %KEY%\010 /VE /D "DirectX Março 2008" /f

REG ADD %KEY%\010 /V 1 /D "%PP%\directx\dxsetup /silent" /f

EXIT

Link to comment
Share on other sites


Well most of the problems are likely cause by the non-logical addition of the trailing backslash in your %PP% variable.

I've made a few changes to the syntax, I have no intention of looking at any programs and/or switches however so you'll need to do your own research etc. for any which do fail to load unattendedly during installation.

@cmdow @ /HID
@Echo Off&Setlocal enableextensions
For %%# In (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 %%#:\win51ip.SP2 Set "PP=%%#:\Install")
If Not Defined PP Goto :Eof

Set "KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"

Reg add %KEY% /v Title /d "Instalando Programas" /f

Reg add %KEY%\000 /ve /d "WinRAR" /f
Reg add %KEY%\000 /v 1 /d "%PP%\wrar370.exe /s" /f

Reg add %KEY%\001 /ve /d "Messenger 8.5" /f
Reg add %KEY%\001 /v 1 /d "%PP%\WLM85.MSI" /f

Reg add %KEY%\002 /ve /d "O&O Defrag" /f
Reg add %KEY%\002 /v 1 /d "%PP%\oodefrag10pro\oodefrag.cmd" /f

Reg add %KEY%\003 /ve /d "Nero 8 Ultra Edition" /f
Reg add %KEY%\003 /v 1 /d "%PP%\Nero.exe" /f

Reg add %KEY%\004 /ve /d "Picasa2" /f
Reg add %KEY%\004 /v 1 /d "%PP%\Picasa2\Picasa.cmd" /f

Reg add %KEY%\005 /ve /d "Office 2003" /f
Reg add %KEY%\005 /v 1 /d "%PP%\office2003br.exe" /f

Reg add %KEY%\006 /ve /d "Flash" /f
Reg add %KEY%\006 /v 1 /d "%PP%\flash.exe /silent" /f

Reg add %KEY%\007 /ve /d "Messenger Plus! Live" /f
Reg add %KEY%\007 /v 1 /d "%PP%\Instalarmsgpluslive.exe" /f
Reg add %KEY%\007 /v 2 /d "taskkill /im msnmsgr.exe /f" /f

Reg add %KEY%\008 /ve /d "Tweaks" /f
Reg add %KEY%\008 /v 1 /d "regedit /s %PP%\tweaks.reg" /f

Reg add %KEY%\009 /ve /d "DirectX Março 2008" /f
Reg add %KEY%\009 /v 1 /d "%PP%\directx\dxsetup /silent" /f

Hope this helps you out a little!

Link to comment
Share on other sites

Thanks a lot my friend!! But something else happened now...nothing! :P

The installation runs okay, but on the phase of installing apps, nothing happens! I've put the command on the "commands to execute on first run" or something like that on Nlite, but nothing happened...why? Another noob error I guess...

Thanks a lot guys!!

Link to comment
Share on other sites

If nothing is happening then the most likely scenarios are that either your Install directory is not located in the root of the installation media or a problem with your implementation through nLite.

Link to comment
Share on other sites

If nothing is happening then the most likely scenarios are that either your Install directory is not located in the root of the installation media or a problem with your implementation through nLite.

Yes, it is. Is on the folder "Install", on the root of installation. Anyway, i'll try doing by scratch again and tell to you! :D

Link to comment
Share on other sites

If nothing is happening then the most likely scenarios are that either your Install directory is not located in the root of the installation media or a problem with your implementation through nLite.

Yes, it is. Is on the folder "Install", on the root of installation. Anyway, i'll try doing by scratch again and tell to you! :D

are you doing this on sp3? if so i have found the searching for cd.txt in the different drives fails i reverted to the local format

if it sp2 i will have a closer look at it as it worked fien for me on sp2

Link to comment
Share on other sites

If nothing is happening then the most likely scenarios are that either your Install directory is not located in the root of the installation media or a problem with your implementation through nLite.

Yes, it is. Is on the folder "Install", on the root of installation. Anyway, i'll try doing by scratch again and tell to you! :D

are you doing this on sp3? if so i have found the searching for cd.txt in the different drives fails i reverted to the local format

if it sp2 i will have a closer look at it as it worked fien for me on sp2

Yeah, it is SP3! I didn't undersand well what would be this reversion...

Link to comment
Share on other sites

The installation runs okay, but on the phase of installing apps, nothing happens! I've put the command on the "commands to execute on first run" or something like that on Nlite, but nothing happened...why?

Please read the MSFN unattended guide...

You are using the 'RunOnceEx from CD' method, and this relies on the reg-entries that handles the installations to be imported before first logon, like e.g. at T-12(cmdlines.txt) or T-13(svcpack.inf).

nLite doesn't have any GUI options for getting those reg-entries imported before first-logon, so instead of adding the commands to nLite's 'Runonce' section, then you could e.g. manually include a batchfile with those commands into the '$OEM$' folder and then add the batchfiles name surrounded by double-quotes to 'cmdlines.txt'.

Link to comment
Share on other sites

Yeah, now i read it with more attention! But i understand better now...

i'm tryin a maybe simple method, that is including a line in cmdlines.txt to execute my script, and if it works, will make fine tune to installers and cleaning!

EDIT:

Now everything is working fine!!! Thanks a lot guys!! Now still some small errors with the installations, plus anothers i'll put into disc! Thanks!!

Edited by elmatadorbr
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...