Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Simple tool for automating monthly tasks


  • Please log in to reply
10 replies to this topic

#1
Killgore

Killgore

    Newbie

  • Member
  • 32 posts
  • Joined 28-September 04
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


How to remove advertisement from MSFN

#2
MrJinje

MrJinje

    Tool™ Developer

  • Developer
  • 1,067 posts
  • Joined 14-October 09
  • OS:Server 2012R2
  • Country: Country Flag
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.

Attached Files


Edited by MrJinje, 01 February 2010 - 03:48 AM.


#3
Killgore

Killgore

    Newbie

  • Member
  • 32 posts
  • Joined 28-September 04
Thank you very much. I've just added simple unattended script and it works perfectly as a generic Win 7 image.
Regards,
Chris

#4
ner

ner

    Member

  • Member
  • PipPip
  • 266 posts
  • Joined 19-January 04
  • OS:Windows 7 x86
  • Country: Country Flag
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, 06 May 2010 - 04:30 AM.


#5
MrJinje

MrJinje

    Tool™ Developer

  • Developer
  • 1,067 posts
  • Joined 14-October 09
  • OS:Server 2012R2
  • Country: Country Flag

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.

#6
ner

ner

    Member

  • Member
  • PipPip
  • 266 posts
  • Joined 19-January 04
  • OS:Windows 7 x86
  • Country: Country Flag
Ok here you go capture and also log file

Attached Files


Edited by ner, 06 May 2010 - 05:36 AM.


#7
MrJinje

MrJinje

    Tool™ Developer

  • Developer
  • 1,067 posts
  • Joined 14-October 09
  • OS:Server 2012R2
  • Country: Country Flag
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.micro...382(WS.10).aspx

http://technet.micro...258(WS.10).aspx

http://technet.micro...311(WS.10).aspx

Edited by MrJinje, 06 May 2010 - 05:19 AM.


#8
ner

ner

    Member

  • Member
  • PipPip
  • 266 posts
  • Joined 19-January 04
  • OS:Windows 7 x86
  • Country: Country Flag
ok thanks mounted ok, same error message, here is the log

Edited by ner, 06 May 2010 - 05:25 AM.


#9
ner

ner

    Member

  • Member
  • PipPip
  • 266 posts
  • Joined 19-January 04
  • OS:Windows 7 x86
  • Country: Country Flag
soved it, it was norton ghost 15 causing the error - was running backup, stop services and ran ok 100& perfect thank you :thumbup

#10
MrJinje

MrJinje

    Tool™ Developer

  • Developer
  • 1,067 posts
  • Joined 14-October 09
  • OS:Server 2012R2
  • Country: Country Flag

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.

#11
ner

ner

    Member

  • Member
  • PipPip
  • 266 posts
  • Joined 19-January 04
  • OS:Windows 7 x86
  • Country: Country Flag
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, 06 May 2010 - 06:11 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users