Simple tool for automating monthly tasks
#1
Posted 01 February 2010 - 03:15 AM
I'm looking for a tool or a guide so I can write my own script to automate these tasks:
- unattended.xml that allows me to repartition HDD manually, choose Windows edition and/or enter key
- patch integration
- driver injection
I've tried MDT, but it works with only one edition at a time, and doesn't allow repartition GUI.
TIA,
Chris
#2
Posted 01 February 2010 - 03:46 AM
This is an update to include drivers, edit it to suit your needs. Place your Updates (MSU or CAB) into the x86 or x64 folder and place all your drivers into the x86-Drivers or x64-Drivers folder. Then just need put your install.wim in the same folder with this CMD and double click it.
W7_Updater.cmd - both x86 + x64 scripts are included in the attachment.
MD %~dp0MOUNT Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:1 /MountDir:%~dp0MOUNT Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x86" Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x86-Drivers" /Recurse Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:2 /MountDir:%~dp0MOUNT Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x86" Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x86-Drivers" /Recurse Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:3 /MountDir:%~dp0MOUNT Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x86" Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x86-Drivers" /Recurse Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:4 /MountDir:%~dp0MOUNT Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x86" Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x86-Drivers" /Recurse Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit Dism.exe /Mount-Wim /WimFile:%~dp0install.wim /Index:5 /MountDir:%~dp0MOUNT Dism.exe /image:%~dp0MOUNT /Add-Package /PackagePath:"%~dp0x86" Dism.exe /image:%~dp0MOUNT /Add-Driver /Driver:"%~dp0x86-Drivers" /Recurse Dism.exe /Unmount-Wim /MountDir:%~dp0MOUNT /commit
EDIT: Don't worry about it integrating drivers or updates twice. It is safe to run multiple times as Windows 7 first checks if the update or driver has already been integrated.
Attached File(s)
-
W7_Updater.7z (514bytes)
Number of downloads: 304
This post has been edited by MrJinje: 01 February 2010 - 03:48 AM
#3
Posted 03 February 2010 - 04:38 AM
#4
Posted 06 May 2010 - 04:21 AM
error: 0x801f0005
An error occurred while attempting to start the servicing process for the image located at c:\W7_updater\MOUNT
any ideas
got updates in x86 folder
and drivers in x86-drivers folder
This post has been edited by ner: 06 May 2010 - 04:30 AM
#5
Posted 06 May 2010 - 04:34 AM
MrJinje, on 01 February 2010 - 03:46 AM, said:
Can you re-create the error, this time use ctrl+printscreen to snap a jpeg. I want to see exactly which command is failing.
Grab the corner and stretch the cmd window if you need to.
#6
Posted 06 May 2010 - 04:40 AM
Attached File(s)
-
Capture.PNG (147.66K)
Number of downloads: 93
This post has been edited by ner: 06 May 2010 - 05:36 AM
#7
Posted 06 May 2010 - 05:18 AM
Dism.exe /image:%~dp0MOUNT /Add-Package /LogPath:AddPackage.log /PackagePath:"%~dp0x86"
Here are some DISM syntax details you should look over to get an understanding of what DISM is doing.
http://technet.micro...28WS.10%29.aspx
http://technet.micro...28WS.10%29.aspx
http://technet.micro...28WS.10%29.aspx
This post has been edited by MrJinje: 06 May 2010 - 05:19 AM
#8
Posted 06 May 2010 - 05:23 AM
This post has been edited by ner: 06 May 2010 - 05:25 AM
#9
Posted 06 May 2010 - 05:33 AM
#10
Posted 06 May 2010 - 05:52 AM
#11
Posted 06 May 2010 - 06:11 AM
Well just wanted to say a thank you again, as this has now made my life much easier, now each month i can ensure that i have an upated 100% patched installation dvd. Because we all know that we do like to fomat and install every month or so, because we have buggered up something...
or just could re-image back my ghost backup - but that is never as much fun as doing a reinstall!!
This post has been edited by ner: 06 May 2010 - 06:11 AM
- ← Win7 PNP Driver Staging without using DISM?
- Unattended Windows 7/Server 2008R2
- Novell Client 2 sp1 for windows 7 →



Help
Back to top










