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

Windows 7 post-installation


  • Please log in to reply
7 replies to this topic

#1
simurqq

simurqq

    Newbie

  • Member
  • 49 posts
  • Joined 03-January 09
Still learning unattended W7 setup... So far I have created "autounattend.xml" which runs ok on my VM. Now, in order to move to the next step I need your recommendations on installation of Windows updates (hotfixes), drivers and my favourite applications AFTER basic W7 setup is complete. Btw, I don't intend to use any R7Lite-kind of apps to manipulate install.wim, etc. - only Windows AIK tools for now...

So, I guess one of the options to achieve this is through a so-called "setupcomplete.cmd" looking just as below (code snippet taken from another thread):

@echo off

setlocal enableextensions disabledelayedexpansion

(set CDROM=)

for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (if exist %%i:\sources\install.wim set "CDROM=%%i:")

if not defined CDROM goto :eof
start /wait %CDROM%\Updates\IE9-Windows7-x64-enu.exe /passive /norestart /update-no
start /wait wusa.exe %CDROM%\Updates\AMD64-all-ie9-windows6.1-kb2530548-x64.msu /quiet /norestart /nobackup
start /wait wusa.exe %CDROM%\Updates\AMD64-all-ie9-windows6.1-kb2559049-x64.msu /quiet /nobackup /norestart
start /wait wusa.exe %CDROM%\Updates\AMD64-all-windows6.1-kb2533552.msu /quiet /norestart /nobackup
start /wait %CDROM%\Updates\AMD64_X86-all-silverlight.exe /q

del %0

Now the questions are:

(1) Shall I prefer "setupcomplete.cmd" to insertion of files through "WSIM // Packages" option into "Autounattend.xml"?
(2) How to successfully install drivers in unattended W7 setup environment? Any methods or guides available?!?
(3) I got more than 200 hotfixes (.MSU) for W7 SP1 (from SoLoR's update pack) stored on my USB drive. Considering the number of files, HOW do I know (i) which switch (/quiet, /norestart, etc.) must be used in "setupcomplete.cmd" with a particular KBxxxxxx.exe and (ii) whether I need to restart Windows after a specific hotfix is installed?

Thank you very much in advance!!!

Edited by Tripredacus, 12 October 2011 - 07:43 AM.
removed link



How to remove advertisement from MSFN

#2
gotenks98

gotenks98

    Member

  • Member
  • PipPip
  • 162 posts
  • Joined 02-June 05
I would slipstream the updates using the waik. There are a few that can not be though. Those are the .net 4.0 stuff and the like 1 or 2 regular updates. .Net 3.0 stuff can be slipstreamed just fine. I would not slipstream IE9 though, it has an odd bug that will always open the welcome wizard every single IE run. Although you can use registry fixes to stop it I would rather not as I do not know if that will end up breaking something in the future. As for as doing the setup complete for each update thats going to take a year and a day to run unless you specify system restore is turned off during the unattended install. With system restore on it wants to create a restore point for every single update which is a waste of time and disk space. So in short slipstream what you can and what you cant just put in setupcomplete. I am more interested in getting the firstlogoncommands thing to work. So far I havent found a sure fire method that makes this work on a 64-bit setup.

#3
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,902 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

If you are going to use these updates and drivers every time, you can just put them into the image using DISM.

DISM Add or Remove Packages Offline
DISM Add and Remove Drivers Offline

Hotfixes are not redistributable.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#4
simurqq

simurqq

    Newbie

  • Member
  • 49 posts
  • Joined 03-January 09
Thank you guys for your prompt replies!!!

@Tripredacus: Technet articles instruct to include "unattend.xml" containing setup instructions for a package or a driver into the WIM image. But is it possible NOT to include XML into the image and simply put "autounattend.xml" into the root of setup DVD? This would be very useful since (i) mounting/unmounting INSTALL.WIM takes too long; and (ii) I would be able to regularly update my update package and drivers offline untouching "install.wim".

Also, Technet recommends to apply updates at offlineServicing pass but I think "setupcomplete.cmd" activates at oobeSystem. Right?

And one more question: what do you mean by this:

Hotfixes are not redistributable.


@gotenks98: Can you advise how to turn off system restore in "Autounattend.xml"? Or, turn it off using a registry tweak just before running "setupcomplete.cmd"?

Thank you!

#5
gotenks98

gotenks98

    Member

  • Member
  • PipPip
  • 162 posts
  • Joined 02-June 05

Thank you guys for your prompt replies!!!

@Tripredacus: Technet articles instruct to include "unattend.xml" containing setup instructions for a package or a driver into the WIM image. But is it possible NOT to include XML into the image and simply put "autounattend.xml" into the root of setup DVD? This would be very useful since (i) mounting/unmounting INSTALL.WIM takes too long; and (ii) I would be able to regularly update my update package and drivers offline untouching "install.wim".

Also, Technet recommends to apply updates at offlineServicing pass but I think "setupcomplete.cmd" activates at oobeSystem. Right?

And one more question: what do you mean by this:

Hotfixes are not redistributable.


@gotenks98: Can you advise how to turn off system restore in "Autounattend.xml"? Or, turn it off using a registry tweak just before running "setupcomplete.cmd"?

Thank you!

amd64_Microsoft-Windows-SystemRestore-Main on the Waik

#6
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,902 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Thank you guys for your prompt replies!!!

@Tripredacus: Technet articles instruct to include "unattend.xml" containing setup instructions for a package or a driver into the WIM image. But is it possible NOT to include XML into the image and simply put "autounattend.xml" into the root of setup DVD? This would be very useful since (i) mounting/unmounting INSTALL.WIM takes too long; and (ii) I would be able to regularly update my update package and drivers offline untouching "install.wim".

Also, Technet recommends to apply updates at offlineServicing pass but I think "setupcomplete.cmd" activates at oobeSystem. Right?

And one more question: what do you mean by this:

Hotfixes are not redistributable.


Well there are multiple ways to do it. By injecting the updates into the WIM, it will shorten your deployment time.

Regarding hotfixes, noticed I removed the link in your post. See the forum rules:

1.b Respect the requests of companies who do not permit redistribution of their products without express permission - including unmodified hotfix/feature pack packages. Download sources for official software should be from the vendor directly where possible.


MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#7
scott45333

scott45333
  • Member
  • 3 posts
  • Joined 11-February 10
I saw gotenks98 made a reference to a first run command. Here is a little tutorial I wrote that I have never had an issue with:

Sometimes it is necessary to use a FirstRun.cmd instead of the SETUPCOMPLETE.cmd when integrating your silent apps in a custom build. The reason for this is some applications need the user to be logged in to install correctly. Here is a short tutorial to show you how to create a FirstRun.cmd.

First, you must get the apps you want to install. (make sure they are silent if you want it to be an unattended installation).

Second, if you want to include registry tweaks in the install, you need to make a .reg file containing the tweaks you want.

Now, with Notepad++ we are going to make the first batch file. It should look something like this:

@echo off

ren "%programdata%\Microsoft\Windows\Start Menu\Programs\StartUp\Start.bat" "temp.TMP"

DEL /F /Q "%programdata%\Microsoft\Windows\Start Menu\Programs\StartUp\temp.TMP"
DEL /F /Q "%windir%\Setup\scripts\AppName1.EXE"
DEL /F /Q "%windir%\Setup\scripts\AppName2.EXE"
DEL /F /Q "%windir%\Setup\scripts\AppName3.EXE"

Shutdown /r /f

*AppName* is the FULL name of the apps install .exe you want.

Save this file as Install.bat

With your Windows image mounted, you will save this .bat file, all of your silent apps and your reg tweak file in:
Windows/Setup/Scripts (you will have to create the Scripts folder in the Setup folder.

Next, we will create the Start.bat

Open Notepad++ again.
This file should look like this:
@echo off
TITLE scott45333's Post Install Configurator
echo.
echo Please wait while the post install configures your system...
echo ... the configuration process may take up to 10 minutes and will reboot automatically when finished.
echo.

cmd /c REGEDIT /S %windir%\Setup\scripts\Tweaks.reg

START /WAIT %windir%\Setup\scripts\AppName1.EXE
START /WAIT %windir%\Setup\scripts\AppName2.EXE
START /WAIT %windir%\Setup\scripts\AppName3.EXE
START /WAIT %windir%\Setup\scripts\install.bat
END

Save this file as Start.bat

With Windows still mounted, this file will be saved in:
ProgramData/Microsoft/Windows/StartMenu/Programs/StartUp

Now, when Windows is install and the user logs on for the first time, all tweaks and apps will be installed silently and the temporary files deleted after the computer restarts.
Posted Image

#8
tolios1313

tolios1313

    Newbie

  • Member
  • 20 posts
  • Joined 19-December 12
  • OS:Windows 7 x64
  • Country: Country Flag
okey i find the way!

Edited by tolios1313, 31 May 2013 - 07:32 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users