Jump to content

Recommended Posts


Posted

Is the RunOnce.cmd method still a feasible method of installing applications unattended under Windows 7 ?. Or is there a better method used now for Windows 7?

clivebuckwheat, not sure if that is availabe, but I use this in my AutoUnattend.xml file:

<FirstLogonCommands>

<SynchronousCommand wcm:action="add">

<Order>1</Order>

<Description>Start my batch file.</Description>

<CommandLine>CMD /R %systemdrive%\Run1\Run1-W7.bat >"%UserProfile%\DeskTop\Run1.log" 2>&1</CommandLine>

</SynchronousCommand>

</FirstLogonCommands>

My batch file is placed here "E:\W7\sources\$OEM$\$1\Run1" Enjoy, John.
Posted (edited)

A very rich and powerful way of adding applications is to deploy Windows 7 using the free Microsoft Deployment Toolkit (MDT) 2010. With MDT you get a task sequencer that will allow you to custom actions before applying the image, and after applying the image. Including handling reboots etc. MDT 2010 is becoming a de facto standard on how to deploy Windows. You can download it from www.microsoft.com/deployment

This a sample MDT task sequence, this sequence will deploy Windows 7 (setup + unattend.xml), patch the machine (via windows update), install a few apps, reboot, install more apps, patch the machine again. At all time there is a nice progress bar displayed.

post-83172-127454201886_thumb.png

/ Johan

Edited by arwidmark
Posted

The above task sequence actually does that... after intalling all the apps and patching the machine, it runs sysprep and captures the OS to a wim-file. All fully automated. That allow you to re-produce the image at any given time knowing it will be equally good as the last time. You can also add in a suspend in the middle (if you need to do something manually), and then resume and continue.

Posted

Hardware independet ?

I thougt the windows 7 setup already was beacuse it containts a lot of drivers :P

You could always integrate more drivers to it..

Posted

How do I do a hardware independent image of Windows 7

Hardware independet ?

I thougt the windows 7 setup already was beacuse it containts a lot of drivers :P

You could always integrate more drivers to it..

Posted

Windows 7 is hardware indendent by default, and most modern deployment solution will give you the option to add addtional drivers from a central repository during deployment as well, rather than storing them inside the image.

/ Johan

Posted

Windows 7 is hardware independent, until you start adding things like chipset drivers and such. However, sysprep /generalize does a good job of removing those sorts of things, but I still prefer to use a deployment solution to add drivers and applications simply because you *can* (not will, but can) run into problems adding apps and drivers and sysprep'ing the image. Also, I like having a single (untouched) image with a set of apps and drivers, and using MDT task sequences to do all sorts of different things with them without having to have multiple images. Just a preference, I suppose.

Posted

I know / use this methods for hardware dependent setups:

- create a task and use the option "Task sequence variable IsDesktop / IsLaptop / IsServer equals true / false"

- create a batch file and call devcon.exe checking the existence of hardware (devcon could be found and downloaded by Microsoft, there are different versions for x86 and x64):

devcon.exe find "USB\VID_413C*" | find.exe /i "USB\VID_413C&PID_8116&MI_00\7&12298780&0&0000">nul
if errorlevel 1 goto next
rem setup software
...

:next
rem skipped

- use VBS to query WMI information

ComputerType.vbs

On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

For Each strComputer In arrComputers
Set objWMIService = GetObject("winmgmts:\\localhost\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each objItem In colItems
WScript.Echo "IdentifyingNumber:" & Trim( objItem.IdentifyingNumber )
WScript.Echo "Name:" & Trim( objItem.Name )
WScript.Echo "Vendor:" & Trim( objItem.Vendor )
WScript.Echo "Version:" & Trim( objItem.Version )
Next
Next

getComputerType.cmd

set comptypvbs=<pathToFile>\ComputerType.vbs
for /f "tokens=2* delims=:" %%a in ('"%SystemRoot%\System32\cscript.exe" //NoLogo %comptypvbs% ^| "%SystemRoot%\System32\find.exe" /i "Vendor:"') do set ci_vendor=%%a
for /f "tokens=2* delims=:" %%a in ('"%SystemRoot%\System32\cscript.exe" //NoLogo %comptypvbs% ^| "%SystemRoot%\System32\find.exe" /i "Name:"') do set ci_name=%%a
for /f "tokens=2* delims=:" %%a in ('"%SystemRoot%\System32\cscript.exe" //NoLogo %comptypvbs% ^| "%SystemRoot%\System32\find.exe" /i "Version:"') do set ci_version=%%a

rem Dell D620
:D620
if /i "%ci_vendor%" neq "Dell Inc." goto T400
if /i "%ci_name%" neq "Latitude D620" goto T400
echo Dell D620 recognized...
rem install Dell D620 software
goto end

rem Lenovo T400
:T400
if /i "%ci_vendor%" neq "LENOVO" goto W701
if /i "%ci_version%" neq "ThinkPad T400" goto W701
echo Lenovo T400 recognized...
rem install Lenovo T400 software
goto end

:end

Regards,

Nils.

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.
×
×
  • Create New...