Killgore

Simple tool for automating monthly tasks

11 posts in this topic

Hi!

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

0

Share this post


Link to post
Share on other sites

Driver Injection and Patch Integration can be done very easy, but every method you will find is limited in that you need to mount each image and update them one at a time. Lucky for you I already wrote a partial script that does this. AIO-DISM-Updater

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.

W7_Updater.7z

Edited by MrJinje
0

Share this post


Link to post
Share on other sites

Thank you very much. I've just added simple unattended script and it works perfectly as a generic Win 7 image.

0

Share this post


Link to post
Share on other sites

download and ran and got

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

Edited by ner
0

Share this post


Link to post
Share on other sites

Then just need put your install.wim in the same folder with this CMD and double click it.

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.

0

Share this post


Link to post
Share on other sites

Ok here you go capture and also log file

post-12737-127314240692_thumb.png

Edited by ner
0

Share this post


Link to post
Share on other sites

Now you are gonna have to do some testing. Try to mount the 1st image again (manually - not via my script), then we are gonna modify the second command to generate a log file and see what is going on there. You might need to edit each command to match your actual file-paths.

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.microsoft.com/en-us/library/dd744382%28WS.10%29.aspx

http://technet.microsoft.com/en-us/library/dd799258%28WS.10%29.aspx

http://technet.microsoft.com/en-us/library/dd744311%28WS.10%29.aspx

Edited by MrJinje
0

Share this post


Link to post
Share on other sites

ok thanks mounted ok, same error message, here is the log

Edited by ner
0

Share this post


Link to post
Share on other sites

soved it, it was norton ghost 15 causing the error - was running backup, stop services and ran ok 100& perfect thank you :thumbup

0

Share this post


Link to post
Share on other sites

soved it, it was norton ghost 15 causing the error - was running backup, stop services and ran ok 100& perfect thank you :thumbup

Good work, never would have guessed that.

0

Share this post


Link to post
Share on other sites

Yeah i know...

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!! :no:

:thumbup:unsure::thumbup

Edited by ner
0

Share this post


Link to post
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.