MSFN Forum: Simple tool for automating monthly tasks - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Simple tool for automating monthly tasks

#1 User is offline   Killgore 

  • Newbie
  • Group: Members
  • Posts: 30
  • Joined: 28-September 04

Posted 01 February 2010 - 03:15 AM

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


#2 User is offline   MrJinje 

  • Tool™ Developer
  • Group: Developers
  • Posts: 942
  • Joined: 14-October 09
  • OS:none specified
  • Country: Country Flag

  Posted 01 February 2010 - 03:46 AM

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 File(s)


This post has been edited by MrJinje: 01 February 2010 - 03:48 AM


#3 User is offline   Killgore 

  • Newbie
  • Group: Members
  • Posts: 30
  • Joined: 28-September 04

Posted 03 February 2010 - 04:38 AM

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

#4 User is offline   ner 

  • Member
  • PipPip
  • Group: Members
  • Posts: 266
  • Joined: 19-January 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 06 May 2010 - 04:21 AM

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

This post has been edited by ner: 06 May 2010 - 04:30 AM


#5 User is offline   MrJinje 

  • Tool™ Developer
  • Group: Developers
  • Posts: 942
  • Joined: 14-October 09
  • OS:none specified
  • Country: Country Flag

Posted 06 May 2010 - 04:34 AM

View PostMrJinje, on 01 February 2010 - 03:46 AM, said:

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 User is offline   ner 

  • Member
  • PipPip
  • Group: Members
  • Posts: 266
  • Joined: 19-January 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 06 May 2010 - 04:40 AM

Ok here you go capture and also log file

Attached File(s)


This post has been edited by ner: 06 May 2010 - 05:36 AM


#7 User is offline   MrJinje 

  • Tool™ Developer
  • Group: Developers
  • Posts: 942
  • Joined: 14-October 09
  • OS:none specified
  • Country: Country Flag

Posted 06 May 2010 - 05:18 AM

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...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 User is offline   ner 

  • Member
  • PipPip
  • Group: Members
  • Posts: 266
  • Joined: 19-January 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 06 May 2010 - 05:23 AM

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

This post has been edited by ner: 06 May 2010 - 05:25 AM


#9 User is offline   ner 

  • Member
  • PipPip
  • Group: Members
  • Posts: 266
  • Joined: 19-January 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 06 May 2010 - 05:33 AM

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

#10 User is offline   MrJinje 

  • Tool™ Developer
  • Group: Developers
  • Posts: 942
  • Joined: 14-October 09
  • OS:none specified
  • Country: Country Flag

Posted 06 May 2010 - 05:52 AM

View Postner, on 06 May 2010 - 05:33 AM, said:

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 User is offline   ner 

  • Member
  • PipPip
  • Group: Members
  • Posts: 266
  • Joined: 19-January 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 06 May 2010 - 06:11 AM

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

This post has been edited by ner: 06 May 2010 - 06:11 AM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy