Jump to content

batch file and regtweaks dont execute after copy!


Recommended Posts

my programs dont install off my xp sp2/rc1 integrated cd, the install folder and drivers folder copy across, but my regisrty tweak file dosent execute or my batch file. the cmdlines.txt is located in the $oem$ directory, the reg tweak file is located in along with folders for my programs $oem$\$1\install\ directory along with the batch file.

can someone please help me find out what is wrong with these files please!

CMDLINES.TXT:

[COMMANDS]

"REGEDIT /S regtweaks.reg"

%systemdrive%\install\install_custom_programs.bat

WINNT.SIF:

;SetupMgrTag

[Data]

AutoPartition=0

MsDosInitiated="0"

UnattendedInstall="Yes"

[unattended]

UnattendMode=FullUnattended

OemSkipEula=Yes

OemPreinstall=Yes

OemPnPDriversPath="Drivers\detonator56.64"

DriverSigningPolicy=Ignore

TargetPath=\WINDOWS

UnattendSwitch="yes"

FileSystem=*

[GuiUnattended]

AdminPassword=*

EncryptedAdminPassword=Yes

AutoLogon=Yes

AutoLogonCount=1

OEMSkipRegional=1

TimeZone=85

OemSkipWelcome=1

[userData]

ProductKey=XXXXX-X2Q3M-6MWFX-W2Y7V-XXXXX

FullName="fred bloggs"

OrgName="home"

ComputerName=home

[Display]

BitsPerPel=32

Xresolution=1280

YResolution=1024

Vrefresh=85

[TapiLocation]

CountryCode=44

AreaCode=01254

[RegionalSettings]

LanguageGroup=1

SystemLocale=00000809

UserLocale=00000809

InputLocale=0809:00000809

[identification]

JoinWorkgroup=WORKGROUP

[Networking]

InstallDefaultComponents=Yes

[Components]

msmsgs=off

msnexplr=off

[shell]

DefaultStartPanelOff = Yes

install_custom_programs.bat:

@echo off

title Installing Custom Programs ...

ECHO.

ECHO Installing MSN Messenger 6.1.0211

ECHO Please wait...

start /wait %systemdrive%\install\MSN_6.1\MsnMsgs.msi /QB

ECHO.

ECHO.

ECHO Installing **** Nfo Viewer 2.0 RC3

ECHO Please wait...

start /wait %systemdrive%\install\****\****.msi /qn

ECHO.

ECHO.

ECHO Installing Winzip 9.0 Corporate

ECHO Please wait...

start /wait %systemdrive%\install\WINZIP\WINZIP.exe /noqp /notip /autoinstall

ECHO.

ECHO.

ECHO Installing WinRAR 3.30 Corporate and applying settings

ECHO Please wait...

start /wait %systemdrive%\Install\WINRAR\WINRAR.exe /s

REGEDIT /S "%systemdrive%\Install\WINRAR\Settings.reg"

ECHO.

ECHO.

ECHO Installing Messenger Plus 2.54

ECHO Please wait...

start /wait %systemdrive%\install\PLUS\PLUS.exe /SilentInstallNoSponsor

ECHO.

ECHO.

ECHO Installing Nero Burning ROM 6.3.1.6

ECHO Please wait...

start /wait %systemdrive%\install\NERO\NERO.exe /SN=xxxx-0086-0030-1319-5710-1xxx /WRITE_SN /SILENT /NOREBOOT

ECHO.

ECHO.

ECHO Installing Windows Media 9 Encoder

ECHO Please wait...

start /wait %systemdrive%\install\WMencoder\WMencoder.exe /Q:A /R:N

ECHO.

ECHO.

ECHO Installing Ad-Aware Pro v6 Build 181

ECHO Please wait...

Copy %systemdrive%\Install\AAwP6181\sleep.exe %systemroot%\

Copy %systemdrive%\Install\AAwP6181\AdAware.exe %systemdrive%\

Copy %systemdrive%\Install\AAwP6181\adaware.js %systemdrive%\

sleep 1

CD %systemdrive%\

Start %systemdrive%\Install\AAwP6181\adaware.js

sleep 9

Copy /y "%systemdrive%\Install\AAwP6181\reflist.ref" "%systemdrive%\Program Files\Lavasoft\Ad-aware 6\"

Copy "%systemdrive%\Install\AAwP6181\prefs.ini" "%systemdrive%\Program Files\Lavasoft\Ad-aware 6\"

Del %systemdrive%\adaware.js

Del %systemdrive%\AdAware.exe

ECHO.

ECHO.

ECHO Installing Divx 5.1.1 Pro

ECHO Please wait...

start /wait regsvr32.exe %systemroot%\system32\divxdec.ax /s

ECHO.

ECHO.

ECHO Installing Ac3 0.70b

ECHO Please wait...

start /wait %systemdrive%\install\AC3\AC3.exe /S /D="%systemdrive%\Program Files\AC3Filter"

ECHO.

ECHO.

ECHO Applying Registry Tweaks...

REGEDIT /S %systemdrive%\install\RegTweaks.reg

ECHO.

pause

exit

Link to comment
Share on other sites


If regtweaks.reg is in $oem$\$1\install\, then how is cmdlines.txt supposed to find it? Put regtweaks.reg in the $OEM$ folder.

%systemdrive%\install\install_custom_programs.bat in cmdlines.txt may also need quotations.

Next time, put all your commands in

 tags...
Link to comment
Share on other sites

ive now put the regtweaks.reg in the $oem$ folder, so should commands.txt look like this?

CMDLINES.TXT:

[COMMANDS]

"REGEDIT /S regtweaks.reg"

"%systemdrive%\install\install_custom_programs.bat"

what do you mean by putting my commands in code tags []? please could you show me an example.

Link to comment
Share on other sites

i edited it as shwon in the post above your reply's, but the regtweak and batch file didnt execute under virtual pc 2004.

the drivers for my graphics card didnt install either.

can somebody help please, im supposed to be formatting today and installing the unattended cd!

Link to comment
Share on other sites

the drivers for my graphics card didnt install either.
How would you expect it to install your video drivers when using Virtual PC? VPC is not emulating your exact video card. It is just emulating a standard VGA card.
ive now put the regtweaks.reg in the $oem$ folder, so should commands.txt look like this?

CMDLINES.TXT:

[COMMANDS]

"REGEDIT /S regtweaks.reg"

"%systemdrive%\install\install_custom_programs.bat"

Are variables even aloud in cmdlines.txt? (i.e. %systemdrive%)

You may need to move the .bat file to the base of the $OEM$ folder (where cmdlines.txt is)

Blyster

Link to comment
Share on other sites

Well, obviously you are doing something wrong because what you have is not working. The second point i made is that variables CAN'T be used in cmdlines.txt, which would describe why your batch file is not being run. You could simply call c:\install\install_custom_programs.bat instead of using %systemdrive%. Then again, if C is not your systemdrive, then this won't work. I was simply telling you why the batch file wasn't being run. There are numerous ways around using variables in cmdlines.txt, and this is just one way. Another way would be to put a .cmd file in the $OEM$ folder (with cmdlines.txt) that will call the batch file on the hard drive using the systemdrive variable. You could then call that .cmd file from cdmlines.txt instead of the batch file on the systemdrive. Just some advice - you seem to be trying to pack everything into your unattended CD all at once and are suffering from many problems. Take one thing at a time and perfect it then move on to the next so you always know what is causing your problem.

Blyster

Link to comment
Share on other sites

i have put the .bat file in the $oem$ dir now, is my cmdlines.txt right with the .bat file in this folder?

[COMMANDS]

"REGEDIT /S RegTweaks.reg"

"%systemdrive%\install_custom_programs.bat"

so now my $oem dir contains the following files:

RegTweaks.reg

cmdlines.txt

install_custom_programs.bat

Link to comment
Share on other sites

Do you not understand what i mean when i say that variables CAN'T be used in cmdlines.txt. You are still using %systemdrive%, why? It is considered a variable. This is what you might want to try

[COMMANDS]
"REGEDIT /S regtweaks.reg"
"install_custom_programs.bat"

You may need to modify your batch file depending on how you handled the paths to the setup files (relative vs. full). Also be aware that some installs actually require some services to be active or an actual user to logged in, so some of the program installs may fail trying to install them during this time.

Blyster

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