any way to attach a bat file to windows installation?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
vipez21
Posts: 4
Joined: 30 Mar 2015 21:43

any way to attach a bat file to windows installation?

#1 Post by vipez21 » 08 Apr 2015 00:42

I want to automate some the installation of some drivers/programs i use on a daily basis to a windows iso. so lets so i reinstall windows, i want this batch file to run after the install is complete or during the installation process. is there any way to do that?

OperatorGK
Posts: 66
Joined: 13 Jan 2015 06:55

Re: any way to attach a bat file to windows installation?

#2 Post by OperatorGK » 08 Apr 2015 01:26

But you can just use Windows AIK to create your own Windows Install CD with all drivers and programs. It's much easier.

Dos_Probie
Posts: 233
Joined: 21 Nov 2010 08:07
Location: At My Computer

Re: any way to attach a bat file to windows installation?

#3 Post by Dos_Probie » 08 Apr 2015 04:45

If your a 'hands on' type then you can use Win ToolKit to integrate your updates and drivers to your image file, then use the SetupComplete.cmd method to install applications automatically at the end of the OOBE process/before the first logon.
http://www.majorgeeks.com/files/details ... olkit.html
http://www.mydefrag.com/forum/index.php?topic=3244.0
~DP

vipez21
Posts: 4
Joined: 30 Mar 2015 21:43

Re: any way to attach a bat file to windows installation?

#4 Post by vipez21 » 08 Apr 2015 11:44

thanks guys

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: any way to attach a bat file to windows installation?

#5 Post by Ed Dyreen » 09 Apr 2015 17:15

This will make your program run at first logon.

winNT.SIF

Code: Select all

[GuiRunOnce]

   "%systemDrive%\ED\DIST\EDPrinstall_WinXPPro32x86.CMD"

However, drivers are best installed during the hardware installation stage of windows setup. You can use the free driverPacks to have most drivers installed automatically ( even mas-storage ).

You can also edit svcPack.INF if you want more control over the installation ( driverpacks doesn't always select the proper driver ). For example, W2kTNT10.EXE is a SFX-archive that ( after decompression ) launches a batch file that will invoke devCon.EXE to figure out if a certain device is present on a system and then decide to install or not based on the presence of a HWID.

svcPack.INF

Code: Select all

; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Next executables are device drivers for specific devices.
; If the hardware is found on the system, they override any previous drivers installed.
; -------------------------------------------------------------------------------------------------------------
;
; Nvidia Riva TNT/TNT2 Pro driver for device 'PCI\VEN_10DE&DEV_0028'
W2kTNT10.EXE
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Unattended installs are well documented at http://unattended.msfn.org/unattended.xp/. If you are trying to automate a more recent OS some things may have changed, but it's still a good place to start.

Post Reply