Showing posts with label unattend. Show all posts
Showing posts with label unattend. Show all posts

Thursday, February 9, 2012

Software Deployment Basic Basics: Uninstalls

In my book "Grinding Gears" I discuss the various aspects of performing forensic analysis to support the repackaging of software for unattended, mass distribution.  I also discuss how this plays into performing unattended, mass UN-installations.  Here's the basic basics of where to look and what to do...

Add or Remove Programs / Registry

The list of applications that you see in "Add or Remove Programs" (ARP) is defined in the Registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, and for 64-bit clients it also spills over into HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall. Scan through all the entries, named and GUID labels as well.  Those that have a "DisplayName" value, are what you should see in the ARP list.  When you find the products you're looking to remove, note the "UninstallString" value and move on to the next one.  For "msiexec.exe" values, be sure to replace "/I" with "/X" (or lower case "/x", it doesn't really matter).

Sometimes you'll find references to .EXE files, as well as those which perform bootstrap setups and uninstalls (Autodesk 2009 and later products are well known for this).  In other words, you'll find the product listed multiple times.  Once with the product name, and another (or several) with a corresponding GUID.  Many vendors, Autodesk included, provide documented guidelines for automating removal of their products, which can be very useful.

Other places to look are HKEY_CLASSES_ROOT, HKEY_LOCAL_MACHINE\SOFTWARE\Classes (aliased) and HKEY_USERS\.DEFAULT.

Files and Folders

The nature of most modern installer utilities is that they will only uninstall what they originally installed.  Basically, the uninstall routine reads a manifest of what was installed, checks to see if it is the identical object, and then removes it.  If the object (file, folder) is new, or has been modified since the installation was completed, it will typically leave it behind.  That means that the folder in which the file resides cannot be removed either.  This is why you often need to do a little extra work to automate a truly "clean" uninstall package.  There are many ways to do this, but one of the most effective ways is to use a script wrapper.

It is important that you always use the vendor-provided uninstall mechanism first, and then follow behind with any required clean-up tasks.  NEVER, I repeat NEVER just delete files and folders without running the appropriate uninstall mechanism first.  Otherwise you may end up with a lot more junk strewn about the computer than you realize.

Hooks and Handles

One of the most common reasons that files and folders cannot be deleted during an uninstall operation is that which I described above.  But the other common reason is that a service or process has one of the files opened "in use" at the time of the uninstall.  If the vendor uninstall mechanism doesn't properly stop related services or terminate related processes, the files will be blocked from deletion.  If you can diagnose relevant services and processes, you can incorporate the appropriate termination commands to allow for a clean uninstall.  The most common commands for this are SC.exe and TASKKILL.exe, but you can also use Sysinternals' "PSSERVICE.exe" and "PSKILL.exe".

Sloppy Work

Many small-time development shops either cannot afford to implement proper packaging tools and processes, or simply don't care.  It's just a fact of life and economics.

Many will build their own ad hoc installer utilities, or give you a .ZIP file to extract and do your own heavy-lifting (moving files, registering DLL and OCX components, adding registry keys, running scripts, making shortcuts), which sucks ass, but again: they can't (or won't) do it for you.  Sad that it's 2012 and this is still not uncommon.

Many will give you an installation package, but the uninstall aspects were forgotten or released untested.  This too can make it a suck-ass experience to mop up behind.

If a vendor hands you a soggy bag of crappy software, you still have an option:  Repackage it.  If you have InstallShield or AdminStudio, you can repackage their crap into a shiny new installer package.  In most cases, you can make an .MSI but if there are prerequisite/redistributable dependencies you might prefer a bundled "SETUP.exe" package.  Either way, you get a cleaner installation package with a reliable ARP interface and the ability to do a clean uninstall as well.  In fact, if you spend a little time with uninstall testing you can incorporate some "Custom Action" tasks into the package to do your own cleanup work without the need for scripting.

Per-User

While most things are fine with "per machine" installation and removal, there are times when you need to seek out items under each user context and delete them.  Files, folders, and Registry keys are most common.  There are several ways to hit this...

  • Build a package to delete items on a per-user context and deploy to each user using a per-user advertisement.
  • Use a login script
  • Use Group Policy Preferences
  • Use ActiveSetup packages
Each of these is a world unto its own, so I won't dive into them here, but there's plenty you can find via a Google search that should help point you in the right direction.


Summary

While many products are well packaged for enterprise deployments, many more are not.  This is why so many IT professionals spend so much time shoe-horning applications for mass deployment and mass removal.  The more work you put in "up front" the less you will have to put in later.

Wednesday, August 17, 2011

Autodesk Design Review 2011 - Uninstall Notes

If you attempt to run the Design Review 2011 uninstall via msiexec using a silent switch and it fails with 1603, chances are if you run the uninstall interactively it will show you what's really wrong: The client is missing the Visual C++ 2005 SP1 runtime components.  To remedy this, reinstall VC++ 2005 SP1, then uninstall Design Review 2011 and it should work fine.  That is all.

Thursday, November 11, 2010

Packaging and Laziness

Some people have asked me: "Dave (that's me), why are MSI installers better?"

That's a great question.  The answer is: because they just are.  Next question?

I mean, really, do I need to explain why?  Answer: No.

Seriously, I'm not going to rip open this topic and try to explain why they are better, because so many other folks have already done that for our benefit.  I suggest http://en.wikipedia.org/wiki/Windows_Installer for a general overview and links to dive in deeper if you want.

But whatever.  What…evs…. (sing that like a high pitched soprano)

There are ways to get an MSI even when your dope-smoking idiot vendors decide it's not worth their time to make one for your benefit.  Imagine that?  A vendor doing something to benefit their customers?!  Holy ****ing ****!  Anytime you encounter a vendor who doesn't give a shit about making an MSI for you it means one thing: They don't have any competition.  And that means they desperately need competition.  Anything, I repeat ANYTHING that does not have competition gets lazy, fat and stupid.  It doesn't matter whether it's a product, a technology, a type of plant, a species of animal or a TV show.

And why is this?

Because human nature is to be lazy.  Sure, we all know some irritating bastard that gets up at 4:00 AM to go running and still gets to the office at 5:30 and stays late.  That bastard will be dead by 50 from stress, so just relax and continue on being your lazy fat self.  What's that? - You don't buy my statement that human nature = laziness?  Then why are you sitting and reading this insignificant crap?  You should be out climbing mountains, finding cures for disease or at least fixing your house or car.  That's right, you know it - we're all lazy.  IT folks are the laziest.  We hate to work, so we write scripts, download utilities, and generally find ways to make things work without having to babysit them 24/7.

MSI packages are the laziest and yet most reliable way to install and (just as importantly) uninstall a software product.  If you have a clean, properly developed MSI package, you only need to know two basic things to get the job done:

msiexec /i <vendor-bongload.msi> /quiet /norestart

msiexec /x <vendor-bongload.msi> /quiet /norestart

Can you spot the difference between the two lines above?

Once you have those worked out you can drink more beer and watch more TV.  But life isn't that easy is it?  Nope.  Vendors don't just rip bongloads, they huff paint cans.  That's why they produce crappy setup.exe files and online installers that are painful to package and deploy to multiple computers.  Even worse, you call them for help, and they act like you're a bill collector seeking payment, rather than a customer to be serviced.  I vaguely remember when vendors actually TRIED to provide customer service.  Good times.  Good times (can you hear the harmonic trailing off in the distance, heavy reverb, dark alley, beer cans…)

This is why I general abhor small developers.  Some are great, and are very attentive to customer satisfaction.  But most are full of shit, obnoxious as an emancipated 12 year old, and just want the sale profit and nothing more.  Even worse than even worse is how the big vendors are adopting a "go-fuck-yourself" customer service approach. Push-button call menus, long waits, pay-per-incident calls, and offshore reps who can't understand any basic problems (let alone simple English).

Ahh, I digress (I do that when I'm drinking IPA's, sorry)  *burp* (pardon me)…

Oh yes. How to get MSI packages out of crap installers.  There are several ways:

  • Try to open the .exe in WinZip or 7-Zip and extract the guts.  This sometimes works very well.  Many times it doesn't.
  • Run the setup.exe and let it sit at the first Welcome form.  Then dive into your %temp% folder and look for extracted goodies.  Copy them out and see if they can be run by themselves.
  • Use a setup capture utility like Wise or InstallShield to snapshot the acid-infested processes those heroine smoking developers have shoved at you during one of their convenience store robberies, and try to wrap that horrific mess into a MSI.  This is like stuffing an acid-tripping, crack-smoking aligator into a flimsy tin trash can and slapping a lid on it with duct tape.  Be careful.
  • If all else fails, try setup.exe /S or /SILENT or /Q or /QUIET or /SMS or /THIS_SHIT_SUCKS_ASS or /BUY-PLAN-TICKET-TO-VENDOR-OFFICE-TO-CHOKE-CRACK-SMOKING-OBNOXIOUS-DEVELOPER
  • or, just find another product and don't do business with that first vendor ever again. Ever.  Never.  As in never ever never ever ever never again.

I mean, really, this is 2010 folks.  Say that out loud, ok?  Say it. "This is 2010!"  It's the 21st century and we still have comatose paint-huffing Justin Bieber fan skateboarders writing code that drives big corporate tasks.  Is this how far we've come?  Holy crap!  We need to start a movement.  A real movement, not just a bowel movement.  A movement to evict these cough-syrup drinkers from the back alleys of software development and restore that former reputation they/we had for making customer-oriented products and services. 

This is where I would normally spill my thoughts about what Microsoft should do to reign in this insanity, but the Softards only care about shareholders and I'm not a shareholder, so, alright, I'll shut up.

Oh and in case you're wondering just what those developers you deal with really look like, here's a behind-the-scenes photo…

Saturday, November 6, 2010

Basics of Software Re-Packaging

  1. Check if it's already installed: exit here / stop / move on
  2. If not installed: Install it
  3. Check on the exit code / status after installation
  4. Write everything to a log file
  5. Check the log files

I told you this was basic.

Wednesday, October 13, 2010

Script to Remove AutoCAD LT 2011 (version 2.0)

Another (and better) method for scripting the removal of AutoCAD LT 2011.  Works fine with deployment products like SMS, SCCM, etc.

@echo off
rem ****************************************************************
rem Filename..: remove.bat
rem Author....: skatterbrainz.blogspot.com
rem Date......: 10/13/2010
rem Purpose...: uninstall/cleanup AutoCAD LT 2011
rem ****************************************************************
CLS
SETLOCAL
SET APPNAME=acadlt_2011
SET LOG=%TMP%\%APPNAME%_uninstall.log
echo %DATE% %TIME% uninstalling %APPNAME%... >%LOG%
echo %DATE% %TIME% computer = %COMPUTERNAME% >>%LOG%
echo %DATE% %TIME% source = %~dps0 >>%LOG%
echo %DATE% %TIME% temp = %TMP% >>%LOG%
rem -----------------------------------------------
echo %DATE% %TIME% checking if application was previously installed... >>%LOG%
if exist "c:\Program Files\Autodesk\AutoCAD LT 2011\acadlt.exe" (
echo %DATE% %TIME% application has been installed >>%LOG%
rem --------------------------------------------------
echo %DATE% %TIME% removing Autodesk Material Library 2011... >>%LOG%
msiexec /x {9DEABCB6-B759-4D52-92F8-51B34A2B4D40} /quiet /norestart
echo %DATE% %TIME% result code is %errorlevel% >>%LOG%
rem --------------------------------------------------
echo %DATE% %TIME% removing AutoCAD LT 2011... >>%LOG%
msiexec /x {5783F2D7-9009-0409-0002-0060B0CE6BBA} /quiet /norestart
echo %DATE% %TIME% result code is %errorlevel% >>%LOG%
rem --------------------------------------------------
echo %DATE% %TIME% removing AutoCAD LT 2011 Language Pack >>%LOG%
msiexec /x {5783F2D7-9009-0409-1002-0060B0CE6BBA} /quiet /norestart
echo %DATE% %TIME% result code is %errorlevel% >>%LOG%
rem --------------------------------------------------
echo %DATE% %TIME% checking if ADR 2011 is installed... >>%LOG%
if exist "c:\Program Files\Autodesk\Autodesk Design Review\DesignReview.exe" (
echo %DATE% %TIME% installation was found, removing now... >>%LOG%
msiexec /x {8D20B4D7-3422-4099-9332-39F27E617A6F} /quiet /norestart
echo %DATE% %TIME% result code is %errorlevel% >>%LOG%
) else (
echo %DATE% %TIME% Design Review 2011 was not found. >>%LOG%
)
) else (
echo %DATE% %TIME% AutoCAD LT 2011 was not found on this computer. >>%LOG%
exit /b 0
)
rem --------------------------------------------------
echo %DATE% %TIME% uninstall completed >>%LOG%
ENDLOCAL
exit /b %errorlevel%

Friday, October 8, 2010

Teaching Pigs to Sing (and scripts to make pretty logs)

Today is Friday, and OMFG the weather is increditastical here in sunny Virginia Beach, Virginia!  Going outside feels like having someone rub your scalp and sing pretty songs in your ear.  Yeah, I can’t concentrate on anything else, but… I must.

I had a walk-up request to package MapInfo Pro 10.0 today.  But not just by itself (because that would’ve been too easy, and you can’t have “easy” on a Friday), it had to include another application called “ADAM” and then copy down a whole folder tree of content files and make a shortcut to one of them on the “All Users” Start Menu as well.  It turns out the whole bundle is aimed at installing the “ADAM” software bundle for MapInfo by Deccan International.

The vendor (Pitney-Bowes, and don’t even ask why the **** Pitney-Bowes bought MapInfo.  It makes as much sense as eBay buying Skype, but oh well, onward…) provides a setup.exe, a setup.msi, and a data1.cab file.  They also provide a nice installation guide with tips on running the setup.exe unattended by feeding in arguments using the ancient InstallShield method (you know: setup.exe /v”a bunch of crap here”), but the problem with those is that they’re ill-behaved when strung together in a sequence because they often don’t wait to finish before releasing their “mutex” (go look that one up.  It’s ok.  I’ll wait…).  Are you back?  Ok, so the better option, in most cases, is using the .MSI file and making a transform (.MST) to stuff in the arguments more efficiently.

So, I fired up Wise Package Studio, consumed a coffee, ate a trail mix bar, and made a transform for the installation that inputs the “USERNAME”, “COMPANYNAME”, “PIDKEY” (serial number) and “ACCD” (activation code).  No problem.

You can use Orca instead of Wise Package Studio, or InstallShield, if you prefer.  As long as you can make and edit the .MST it doesn’t matter.

Time to setup the deployment folder structure.  I placed it on a server share named “Packages”, under a root folder named “Deccan”, then copied the MapInfo Pro 10.0 “Disk 1” files into a sub-folder called “MI_PRO\Disk1”.  Then I copied the ADAM installation files under a sub-folder under “Deccan” named “ADAM” and another folder created for “CADAnalyst” under “Deccan”.  The structure looks like this…

\Server\Packages\Deccan\…
-MI_PRO\Disk1
-ADAM
-CADAnalyst

I placed the .MST file into the “Disk1” sub-folder, next to the .MSI file it relates to.

I then created two script files:  setup.bat, and makeshortcut.vbs

Setup.bat simply runs the .MSI with the .MST transform in “quiet” mode.  Then it runs the ADAM .MSI installation, and downloads the data files and makes a shortcut using a call to the makeshortcut.vbs (vbscript) file.  But I also wanted this to generate a self-describing log file so I could backtrace any problems or check on progress, etc.  The “echo” command is simple enough, and I add %DATE% and %TIME% to make a standard “timestamped” log entry output.

However, VBScript uses a completely different format for showing a full date, so I had to beat that into shape with a hammer (see the makeshortcut.vbs script at the end).  I needed the output from both to merge into one log file and look consistent.  That’s just me.  Maybe you don’t care that much, which is fine.  I care about a lot of stupid things.

@echo off
01. rem ****************************************************************
02. rem Filename..: setup.bat
03. rem Author....: Guess Who? (skatterbrainz.blogspot.com)
04. rem Date......: 10/08/2010
05. rem Purpose...: install MapInfo 10 + ADAM + CAD Analyst files
06. rem ****************************************************************
07. CLS
08. SETLOCAL
09. SET LOG=%TMP%\mapinfo10_setup.log
10. echo %DATE% %TIME% initializing script [test_setup] >%LOG%
11. echo %DATE% %TIME% source = "%~dps0" >>%LOG%
12. echo %DATE% %TIME% target = %computername% >>%LOG%
13. echo %DATE% %TIME% tmp = %tmp% >>%LOG%
14. echo ---------------------------------------------- >>%LOG%
15. echo %DATE% %TIME% installing MapInfo Pro 10... >>%LOG%
16. msiexec /i "%~dps0MI_PRO\Disk1\MapInfo Professional 10.0.msi" TRANSFORMS="%~dps0MI_PRO\Disk1\MapInfoPro10_1.mst" /quiet /norestart
17. echo %DATE% %TIME% completed / result code = %errorlevel% >>%LOG%
18. rem ----------------------------------------------
19. if exist "c:\Program Files\Deccan International\ADAM.mbx" (
20. echo %DATE% %TIME% ADAM has already been installed >>%LOG%
21. ) else (
22. echo %DATE% %TIME% installing HPC ADAM ... >>%LOG%
23. msiexec /i "%~dps0ADAM\ADAMsetup.msi" /quiet /norestart
24. echo %DATE% %TIME% completed / result code = %errorlevel% >>%LOG%
25. )
26. rem ----------------------------------------------
27. if exist "c:\Program Files\Deccan International" (
28. if exist "c:\Program Files\Deccan International\CADAnalyst" (
29. echo %DATE% %TIME% the CADAnalyst folder was already created >>%LOG%
30. ) else (
31. echo %DATE% %TIME% downloading data files for CAD Analyst... >>%LOG%
32. xcopy "%~dps0CADAnalyst\*.*" "c:\Program Files\Deccan International\CADAnalyst\*.*" /s /y
33. echo %DATE% %TIME% download complete... >>%LOG%
34. )
35. ) else (
36. echo %DATE% %TIME% error / target folder Deccan International not found! >>%LOG%
37. exit /b 1
38. )
39. rem ----------------------------------------------
40. if exist "%allusersprofile%\Start Menu\Programs\CAD Analyst.lnk" (
41. echo %DATE% %TIME% shortcut already exists >>%LOG%
42. ) else (
43. echo %DATE% %TIME% creating a start menu shortcut for cad analyst .mbx file... >>%LOG%
44. cscript /nologo %~dps0makeshortcut.vbs "N=CAD Analyst" "T=c:\Program Files\Deccan International\CADAnalyst\CAD Analyst.MBX" "L=2" "W=c:\Program Files\Deccan International\CADAnalyst" "D=CAD Analyst" >>%LOG%
45. )
46. echo %DATE% %TIME% installation complete! >>%LOG%
47. ENDLOCAL
48. exit /b %errorlevel%


The %errorlevel% variable is used to capture and display the result code of the last-run command, which is “msiexec” in each case.  Then I force a script “exit” using the /b option and a return code that is non-zero if an error occurs.  If all proceeds along fine and finishes properly, the %errorlevel% result code at the very end should be zero (0).  Most deployment tools see zero as “good” or “no errors occurred”.



Then comes the makeshortcut.vbs script, for making the shortcut.  I could have downloaded some utility .exe to call instead, but I prefer making my own stuff so I know who to blame when it explodes or implodes.



'****************************************************************
' Filename..: makeShortcut.vbs
' Author....: Guess Who? (skatterbrainz.blogspot.com)
' Date......: 10/08/2010
' Purpose...: create a shortcut
'****************************************************************
Dim objArgs, fso, oShell, i, arg, scName, scTarget
Dim scFolder, scCaption, scLoc

Echo "info: makeShortcut.vbs --> processing inputs..."
Set objArgs = WScript.Arguments
If objArgs.Count = 0 Then
Echo "error: incorrect number of arguments supplied"
Echo "-- example..."
Echo "-- makeShortcut.vbs ""N=name"" ""T=target"" ""W=folder"" ""D=description"" ""L=loc"""
wscript.Quit(1)
Else
Echo "info: " & objArgs.Count & " arguments were provided"
Set fso = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("Wscript.Shell")
For i = 0 to objArgs.Count - 1
arg = objArgs(i)
Select Case Ucase(Left(arg,2))
Case "N=":
scName = Mid(arg,3)
Case "L=":
Select Case Right(arg,1)
Case "1":
' all-users desktop
scLoc = oShell.ExpandEnvironmentStrings("%allusersprofile%") & "\Desktop"
Case "2":
' all-users start menu / programs
If fso.FolderExists("C:\ProgramData\Microsoft\Windows\Start Menu\Programs") Then
' check for windows 7 client first
scLoc = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
Else
' default to assuming windows xp client
scLoc = oShell.ExpandEnvironmentStrings("%allusersprofile%") & "\Start Menu\Programs"
End If
Case "3":
' current user desktop
scLoc = oShell.ExpandEnvironmentStrings("%userprofile%") & "\Desktop"
Case "4":
scLoc = Mid(arg,3)
End Select
Case "T=":
scTarget = Mid(arg,3)
If fso.FileExists(scTarget) Then
Echo "info: shortcut target has been verified"
Else
Echo "error: shortcut target could not be found!"
wscript.Quit(2)
End If
Case "W=":
scFolder = Mid(arg,3)
If fso.FolderExists(scFolder) Then
Echo "info: shortcut working folder verified"
Else
Echo "error: shortcut working folder could not be found"
wscript.Quit(3)
End If
Case "D=":
scCaption = Mid(arg,3)
End Select
Next
If scFolder = "" or scTarget = "" or scName = "" or scLoc = "" Then
Echo "error: insufficient arguments provided"
wscript.Quit(4)
Else
Echo "validating shortcut parameters..."
Echo "-- name = " & scName
Echo "-- target = " & scTarget
Echo "-- path = " & scFolder
Echo "-- location = " & scLoc
Echo "-- caption = " & scCaption
On Error Resume Next
Set oShortcut = oShell.CreateShortcut(scLoc & "\" & scName & ".lnk")
If err.Number = 0 Then
Echo "info: creating shortcut..."
oShortcut.TargetPath = scTarget
oShortcut.WorkingDirectory = scFolder
oShortcut.IconLocation = scTarget & ",0"
oShortcut.WindowStyle = 1
oShortcut.Description = scCaption
oShortcut.Save
If fso.FileExists(scLoc & "\" & scName & ".lnk") Then
Echo "-- shortcut has been created"
Else
Echo "-- failed to create shortcut!"
End If
Else
Echo "-- access denied to the specified location!"
End If
End If
End If

'----------------------------------------------------------------
' comment: echo runtime progress
'----------------------------------------------------------------

Sub Echo(s)
wscript.Echo DosDate() & " " & s
End Sub

'----------------------------------------------------------------
' comment: format date stamp to match DOS %DATE% %TIME% format
'----------------------------------------------------------------

Function DosDate()
dn = Left(WeekDayName(WeekDay(Now)),3)
mo = PadLeft(Month(Now), "0", 2)
dd = PadLeft(Day(Now), "0", 2)
yr = Year(Now)
x = mo & "/" & dd & "/" & yr
DosDate = dn & " " & x & " " & FormatDateTime(Now, vbShortTime) & ".00.00"
End Function

'----------------------------------------------------------------
' comment: pad string on left side with char to requested length
'----------------------------------------------------------------

Function PadLeft(sVal, ch, max)
Dim tmp
tmp = Trim(sVal)
Do Until Len(tmp) = max
tmp = ch & tmp
Loop
PadLeft = tmp
End Function


Together, these run the installations, copy the files, make the shortcut, create a nice log, save the girl, kill the bad guy, and free the hostages, with rolling credits at the end and sweet theme music.



Now I can check the “mapinfo10_setup.log” under the %TEMP% folder path to see what’s going on.  Note that when you deploy this as a SCCM package, it runs as the local account “NT_AUTHORITY\SYSTEM” (aka “SYSTEM”), so the %TMP% and %TEMP% paths are C:\WINDOWS\TEMP (or %WINDIR%\TEMP).



I’m done.  Beer time folks.  It’s a tough job, but someone’s gotta do it.

Thursday, September 30, 2010

MS System Center Config Manager 2007 Tips for Deploying AutoCAD 2011 Products and other stuff as if this isn’t the ridiculously long title from the top of my pointy little head

Tip 1 – Package the Deployment in Accordance with Autodesk Guidelines

Use the Deployment utility to build a proper image.  I mean “proper” with respect to how Autodesk recommends building it.  And before you ask, because I get asked this all the time: NO, you do NOT have to grant any additional permissions to the share beyond READ-ONLY for users and computers UNLESS you chose to use a network log.  In that case, you only need to grant Change permissions to the account used to run your installations.  Do NOT grant Change permissions to “Domain Users”.

Build it.  Test it.  Rebuild it if necessary.  Test it again.  Repeat until ready.

Tip 2 – Fix the Package so it Works Properly

Then there’s the whole stupid-ass DirectX 9.0c issue.  So you will need to re-package the DirectX 9.0c components FOR EACH AUTODESK PRODUCT you intend to deploy via Config Manager, but the deployments won’t deploy with DirectX 9.0c and that causes the deployments to undeploy or de-deploy or whatever.  I’ve already blogged on this point, so go search back for what this is about and best of luck to you.  It works.  It’s just stupid as shit that a billion-dollar company touts support for Config Manager deployments and then doesn’t really make it work.

Tip 3 – Tweak the Advertisement

After you create the Package (do NOT use the Autodesk guidance here, make it manually), and create the Programs and edit the Program options (disable notifications, for example), then create the Advertisement and assign it to a null/blank/empty/unused collection until you’re ready to rock-n-roll.  Make sure you review the Advertisement settings and adjust them to suit your environment, your SLA terms with your users, your schedules (scheduled backups, scans, diagnostics, reports, etc.), and your sanity.

Tip 4 – Distribution Points are Important

AutoCAD 2011 products, like previous versions, are no toothpick wagon.  They’re pretty hefty deployments.  Several gigabytes of files that need to be pulled across the LAN and cached on the local hard drive to be extracted, expanded, exfoliated, expatriated and all that good stuff.  Make sure you took the time to place your distribution points and shares within close proximity (as it pertains to LAN throughput) to keep the traffic as localized to the targets as possible and avoid killing other LAN segments (assuming you have a WAN).  If you don’t have multiple locations then pop open a cold one and enjoy the freedom of not having to spend half your life managing that kind of mess.

Tip 5 – Baby Steps

Absolutely DO NOT push a big package like AutoCAD 2011 to all of your targets at once.  Even if it’s only going to 10 desktops, push it to 1 or 2 first.  Make sure that works.  Even better: Before pushing to any production computers, push it to a test computer (I push to a VM test computer as a standard practice).  Verify the results and move forward if all is well.

Tip 6 – Watch Out for Unplanned Restarts

If you don’t suppress reboots in the package and program options, you better make sure to set the post-install behavior in the Advertisement to suit.  Otherwise you will get some unclear or inaccurate results in your web reports.  I always disable/suppress reboots and capture the result code. 

Just keep in mind that if you choose to ignore the DirectX issue, your failed installations will still report “Successful” to SCCM and you will go off on a happy hour drinking binge, only to get a late night phone call that goes something like “Hey man, your deployments all failed.  You suck!!!”  That can lead to profuse vomiting like the back-alley scene in Team America (I love that scene by the way).

Tip 7 – Don’t Rush!

Take your time and be careful to document (take notes) what you’ve done.  It will help you with subsequent deployments for other Autodesk products (if you may have others).  If nothing else, it can save your ass months later when your network crashes and your backups don’t work and you bring the sleeping bag and spend all weekend rebuilding the network from scratch and you need to recreate the packages at 3:00 AM on Sunday.  Don’t laugh, I’ve seen that happen.

Tip 8 – Uhhh…

I forgot what 8 was going to be.  Oh well.  Seven tips should get you somewhere.  Seven days gets you to a weekend, right?

Monday, August 16, 2010

An Important Note about the SCCM Scripts

The scripts I posted recently for uninstalling AutoCAD LT 2011 and AutoCAD Civil 3D 2011 are for 32-bit Windows operating systems.  If you are working with 64-bit clients, you may need to add more code to check for 32-bit application registry keys under HKLM\SOFTWARE\Wow6432node, rather than just looking under HKLM\SOFTWARE.  I'm not going to waste my breath explaining why this is, just trust me: it is what it is.  And boy do I hate that overused phrase.

Here is an example of what I'm talking about…

Const strComputer = "."
Const HKLM = &H80000002

Set oShell = CreateObject("Wscript.Shell")

If RegKeyExists("HKLM\Software\Autodesk\DWF Viewer\") Then
wscript.echo "found!"
Else
wscript.echo "not found"
End If

If RegKeyExists("HKLM\Software\Autodesk\AutoCAD\") Then
wscript.echo "found!"
Else
wscript.echo "not found"
End If

If RegKeyExists64("Software\Autodesk", "AutoCAD") Then
wscript.echo "found!"
Else
wscript.echo "not found"
End If

Function RegKeyExists(key)
Dim bKey
On Error Resume Next
bKey = oShell.RegRead(key)
If err.Number = 0 Then
RegKeyExists = True
End If
End Function


Function RegKeyExists64(key, valueName)
Dim objRegistry, strValue
On Error Resume Next
Set objRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
objRegistry.GetStringValue HKLM, key, valueName, strValue
If err.Number = 0 Then
RegKeyExists64 = True
End If
End Function

Uninstalling AutoCAD Civil 3D 2011 with SCCM 2007

As promised, here is part 2 of my previous post about removing AutoCAD 2011 products using System Center Configuration Manager (SCCM).  I use a script to herd all the 3-legged cats together and remove them at once, silently.  Kind of like stealth kitty extraction.  Or something like that.

BEGIN VBSCRIPT…

'****************************************************************
' Filename..: uninstall_2011_civil3d.vbs
' Author....: David M. Stein
' Date......: 08/16/2010
' Purpose...: uninstall autocad civil 3d 2011
' SQL.......: N/A
'****************************************************************
Option Explicit

wscript.echo "info: initialized " & Now
wscript.echo "info: script executed from " & wscript.ScriptFullName

Dim oShell, oFSO, progfiles, sysdrive, counter : counter = 0

Set oShell = CreateObject("Wscript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

progfiles = oShell.ExpandEnvironmentStrings("%programfiles%")
sysdrive = oShell.ExpandEnvironmentStrings("%systemdrive%")

wscript.echo "info: product installation was found."

CleanApp "DirectX 9.0c for Civil 3D 2011", "{0B8F69E3-5983-4B2B-B464-5D833C76773D}"

CleanApp "Autodesk Material Library 2011", "{9DEABCB6-B759-4D52-92F8-51B34A2B4D40}"

CleanApp "Autodesk Material Library 2011 Base Image library", "{CD1E078C-A6B9-47DA-B035-6365C85C7832}"

CleanApp "AutoCAD Civil 3D 2011", "{5783F2D7-9000-0409-0002-0060B0CE6BBA}"

CleanApp "AutoCAD Civil 3D 2011 Language Pack - English", "{5783F2D7-9000-0409-1002-0060B0CE6BBA}"

CleanApp "Autodesk Design Review 2011", "{8D20B4D7-3422-4099-9332-39F27E617A6F}"

CleanApp "FARO LS 1.1.406.58", "{951B0F30-9F1A-4BF6-B3DA-99EB0E917B1C}"

If counter > 0 Then
CleanFolder progfiles & "\Autodesk\AutoCAD Civil 3D 2011"
CleanFolder progfiles & "\Autodesk\LandXML Reporting 8"
CleanFolder sysdrive & "\Civil 3D Project Templates"
CleanFolder sysdrive & "\Civil 3D Projects"
End If

wscript.echo "info: " & counter & " applications removed"
wscript.echo "info: completed at " & Now

'----------------------------------------------------------------
' function: check if reg key exists under Uninstall tree
'----------------------------------------------------------------

Function IsInstalled(keyname)
Dim basekey
basekey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
If RegKeyExists(basekey & keyname & "\") Then
IsInstalled = True
End If
End Function

'----------------------------------------------------------------
' function: return True if registry key exists
' EXAMPLE: If RegKeyExists("HKLM\Sofwtare\ACME\TestKey\Value1") Then
'----------------------------------------------------------------

Function RegKeyExists(key)
Dim bKey
On Error Resume Next
bKey = oShell.RegRead(key)
If err.Number = 0 Then
RegKeyExists = True
End If
End Function

'----------------------------------------------------------------
' function: run MSIEXEC to uninstall a GUID-based app
'----------------------------------------------------------------

Sub Uninstall(key)
oShell.Run "msiexec.exe /x " & key & " /qn", 7, True
End Sub

'----------------------------------------------------------------
' function: macro to check for app and remove it
'----------------------------------------------------------------

Sub CleanApp(name, keyname)
wscript.echo "info: searching for " & name
If IsInstalled(keyname) Then
wscript.echo "info: removing " & name
Uninstall keyname
counter = counter + 1
Else
wscript.echo "info: " & name & " is not installed"
End If
End Sub

'----------------------------------------------------------------
' function:
'----------------------------------------------------------------

Sub CleanFolder(path)
Dim retval
If oFSO.FolderExists(path) Then
On Error Resume Next
retval = oFSO.DeleteFolder(path, True)
If err.Number = 0 Then
wscript.echo "info: folder deleted = " & path
Else
wscript.echo "warn: folder not deleted = " & path
End If
Else
wscript.echo "warn: folder not found = " & path
End If
End Sub

'----------------------------------------------------------------
' function:
'----------------------------------------------------------------

Function ScriptPath()
ScriptPath = Replace(wscript.ScriptFullName, _
"\" & wscript.ScriptName, "")
End Function

Uninstalling AutoCAD LT 2011 with SCCM 2007

Autodesk makes a pretty bold effort to get their products blasted onto desktops in large quantities.  It's not a perfect effort, and requires some hand-holding and customization here and there, but it's bold.  However, the uninstall effort is non-existent.  After all, why would they want to help you remove their products?  You can do that via Add or Remove Programs, right?  Yeah.  Sure.  On 5,000 computers by tomorrow.  Good luck with that.

Fear not.  They do leave enough crumbs behind to allow you to whip out your scripting dog and follow the scent back home to a clean desktop configuration.  Ok, cleanER more than clean.  Here's a script that you can call from SCCM to remove AutoCAD LT 2011.  I prefer to wrap the call inside a .BAT or .CMD script so I can pipe the echo statements to a client-side log file for troubleshooting.  But you can do whatever you like.

To wrap inside a .BAT/.CMD script, try this…

cscript <path>\uninstall_2011_acadlt.vbs >%TMP%\acadlt2011_uninstall.log


(where <path> is the UNC path to where you share the script file)



BEGIN VBSCRIPT…



'****************************************************************
' Filename..: uninstall_2011_acadlt.vbs
' Author....: David M. Stein
' Date......: 08/16/2010
' Purpose...: uninstall autocad lt 2011
' SQL.......: N/A
'****************************************************************
Option Explicit

wscript.echo "info: initialized " & Now
wscript.echo "info: script executed from " & wscript.ScriptFullName

Dim oShell, oFSO, progfiles, sysdrive, counter : counter = 0

Set oShell = CreateObject("Wscript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

progfiles = oShell.ExpandEnvironmentStrings("%programfiles%")
sysdrive = oShell.ExpandEnvironmentStrings("%systemdrive%")

wscript.echo "info: product installation was found."

CleanApp "Autodesk Material Library 2011", "{9DEABCB6-B759-4D52-92F8-51B34A2B4D40}"

CleanApp "AutoCAD LT 2011", "{5783F2D7-9009-0409-0002-0060B0CE6BBA}"

CleanApp "AutoCAD LT 2011 Language Pack - English", "{5783F2D7-9009-0409-1002-0060B0CE6BBA}"

CleanApp "Autodesk Design Review 2011", "{8D20B4D7-3422-4099-9332-39F27E617A6F}"

If counter > 0 Then
CleanFolder progfiles & "\Autodesk\AutoCAD LT 2011"
Else
wscript.echo "warn: no applications were removed"
End If

wscript.echo "info: " & counter & " applications removed"
wscript.echo "info: completed at " & Now

'----------------------------------------------------------------
' function: check if reg key exists under Uninstall tree
'----------------------------------------------------------------

Function IsInstalled(keyname)
Dim basekey
basekey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
If RegKeyExists(basekey & keyname & "\") Then
IsInstalled = True
End If
End Function

'----------------------------------------------------------------
' function: return True if registry key exists
' EXAMPLE: If RegKeyExists("HKLM\Sofwtare\ACME\TestKey\Value1") Then
'----------------------------------------------------------------

Function RegKeyExists(key)
Dim bKey
On Error Resume Next
bKey = oShell.RegRead(key)
If err.Number = 0 Then
RegKeyExists = True
End If
End Function

'----------------------------------------------------------------
' function: run MSIEXEC to uninstall a GUID-based app
'----------------------------------------------------------------

Sub Uninstall(key)
oShell.Run "msiexec.exe /x " & key & " /qn", 7, True
End Sub

'----------------------------------------------------------------
' function: macro to check for app and remove it
'----------------------------------------------------------------

Sub CleanApp(name, keyname)
wscript.echo "info: searching for " & name
If IsInstalled(keyname) Then
wscript.echo "info: removing " & name
Uninstall keyname
counter = counter + 1
Else
wscript.echo "info: " & name & " is not installed"
End If
End Sub

'----------------------------------------------------------------
' function:
'----------------------------------------------------------------

Sub CleanFolder(path)
Dim retval
If oFSO.FolderExists(path) Then
On Error Resume Next
retval = oFSO.DeleteFolder(path, True)
If err.Number = 0 Then
wscript.echo "info: folder deleted = " & path
Else
wscript.echo "warn: folder not deleted = " & path
End If
Else
wscript.echo "warn: folder not found = " & path
End If
End Sub

'----------------------------------------------------------------
' function:
'----------------------------------------------------------------

Function ScriptPath()
ScriptPath = Replace(wscript.ScriptFullName, _
"\" & wscript.ScriptName, "")
End Function


I'll post another version of this for AutoCAD Civil 3D 2011 sometime soon.

Saturday, August 14, 2010

Packaging & Deployment Autodesk 2011 Products with System Center Configuration Manager 2007

That may be one of the longest titles I've used yet.  Phew!  My fingers hurt already.

So, my current job has me packaging (actually, more correctly: re-packaging) software applications for mass deployment in a WAN environment.  This time around I'm using Microsoft System Center Configuration Manager 2007 (aka "SCCM" or some prefer "ConfigMgr", whatever).  It's a real mixed bag of experiences and results with all the various MSI and non-MSI applications we deploy.  Messy, painful stuff, but it has to be done.

Because there is a known issue with pushing the AdminImage bundle of DirectX 9.0c within the deployment installer with SCCM, you have to package (or run) the DirectX bundle separately and ahead of the actual product installation.  If you don’t, the retarded result will be it fails but returns a "successful" code to SCCM and it appears to have installed correctly, when it didn’t.  Even the client and network logs won’t clearly state that a missing DirectX install caused it to fail and will look as if it worked just fine.  The only physical trace of the failure will be in the Windows Application event log.

In addition, if you don’t have Internet Explorer 7 or later installed on your Windows XP clients, it will abort the installation of Design Review 2011 without causing the entire package to fail.  So the package will still return a "successful" result to SCCM, even though only Civil 3D 2011 or AutoCAD 2011, etc. is actually installed.  So be careful to lay down IE7 or IE8 prior to deploying the full package if you intend to include Design Review 2011.

So, what about Direct X 9.0c?

The problem is many people are confused to death about how vendors use DirectX installers.  There is no "one" DirectX 9.0c.  It’s an API framework.  The vendors use it to develop their own custom bundles to get their applications to work with the DirectX layer on the client.  The proof is to look at the DirectX folder tree under different Autodesk AdminImage deployment shares and compare the contents.  No two will be identical.  For example, the contents under 3DS Max 2011 and AutoCAD Civil 3D 2011 are entirely different.  The only common pieces will be DXSETUP.EXE and a few DLL files.  The end result is that you need to run the appropriate DirectX 9.0c installation for each product.  You can’t run just one bundle for all products.  It won’t work.  It doesn’t matter how many DirectX 9.0c bundles you have already installed for whatever products are on the clients already, you have to install the one for the product it goes with.

For more wonderful sleepy-time reading on DirectX go to http://msdn.microsoft.com/en-us/library/ee416994(v=VS.85).aspx

I see so many admins deploying Inventor, Mechanical, and expect 3DS Max to install fine without also installing the DirectX that comes with 3DS Max (when they try to automate an unattended deployment, that is).  If you’re doing "manual" installations this is not an issue because the installation wizard walks through and takes care of whatever it needs along the way.  But when you push a silent installation through SCCM, it won’t push DirectX with it.  Doh!!

(Dear Autodesk: It would be nice if you could develop a universal DirectX bundle for all your products to share and make it a prepared MSI installation as well.  Thanks!)

Step 1 - Package or Prepare the DirectX bundle

I use Wise Package Studio and create a new MSI package for the installation.  I add the DirectX folder contents from the AdminImage\support\DirectX folder on the deployment share into the WINDOWS\TEMP folder in the package.  Then I go to the MSI Script tab and edit the "Execute Deferred" tab to insert an "Execute Program from Installation Files" action just above "InstallFinalize".  Configure it to execute the "DXSETUP.EXE" from the files collection in the package.  Set the arguments to "/SILENT".  On the Properties tab, set the In-Script option to "Deferred execution - System Context" and set Processing to "Synchronous, ignore exit code"
Save the package and compile it to a name like "Civil3D2011_DirectX9"
Now you should have an installer named "Civil3D2011_DirectX9.msi" that you can deploy silently using /qn or whatever you prefer.

Step 2 - Create the SCCM deployment for the DirectX Package

Prepare and Package, Program and Advertisement for the DirectX installer you created to target the computers which will get the Autodesk product it goes with (e.g. AutoCAD Civil 3D 2011).  You don't need to add any special command line parameters to this package since they are done inside the Wise package (e.g. "/SILENT") so you can deploy it silently using msiexec.exe /i <packagefile> /qn or whatever.  Advertise the package to your target collection and test with a few computers (direct membership is easiest here).

Step 3 - Create the SCCM deployment for the Autodesk Product

Prepare the Package, Program and Advertisement for the Autodesk product as outlined in their deployment documentation.  In most cases the program statement will execute the AdminImage "SETUP.EXE" using the /W /Q /I parameters followed by the .INI file for the deployment and the language parameter.  So if you created a deployment named "2011network" and your deployment share is on server "Server1" under a shared folder named "Apps\Autodesk" it might look like this…

\Server1\Apps\Autodesk\Civil3D2011\AdminImage\setup.exe /W /Q /I \Server1\Apps\Autodesk\Civil3D2011\AdminImage\2011network.ini /Lang en-US

Deploy to your test collection and fine-tune as necessary.  I always use "Whether or not a user is logged on" and "suppress program notifications" since we deploy unattended to everything.

IMPORTANT: Be sure to first make sure the DirectX package deploys successfully before you deploy the rest of it.  If you don't, the Autodesk deployment will fail but will still return "Successful" to SCCM.  The same is true for Design Review failing within the package because a client doesn't have IE7 yet.  It will still say everything deployed successfully.  This is boneheaded and seriously flawed, but it has been reported to Autodesk so time will tell how they handle this.

MORE: I have also asked Autodesk if they would consider developing a single, universal DirectX package for all of their products and provide it in MSI form so that it can deploy with their AdminImage bundles through tools like SCCM.  It would also reduce the stress packagers and admins already endure on a daily basis.

Step 4 – Drink

As if you need an excuse to drink. Go for it. You deserve it. Autodesk and SCCM have delivered you to the doorstep of insobriety so you might as well take advantage of the opportunity

Glass_of_beer_with_bottles_in_the_background[1]

Tuesday, May 11, 2010

Autodesk: Summed Up in a Sentence

So, I figured it was time to do a check-up with our friends at Autodesk regarding our never-ending hair-pulling with packaging their products for mass deployment.  We’ve been doing it our own way for several years (building the admin deployment image, then calling the individual pieces with msiexec and transforms, etc. and installing patches, etc.).  So I submitted a support request asking what the supported method is for performing an “unattended / silent uninstall of AutoCAD 2010 or Inventor 2010”.  We actually bundle more than that into each deployment payload, but I just wanted those two since they’re the primary culprits.

The response?   “We support uninstalls using Add / Remove Programs.  We do not support unattended installs.  Below is a link to a discussion thread that may help…”

So there it is.  Autodesk does not support unattended uninstalls.  This means when you have to remove it from 10,000 computers, they expect you to walk around to, or remote into, each computer and uninstall them one by one.  Given that NO enterprise environments will ever entertain such an insane idea, this indirectly means Autodesk does not support enterprise environments.

In case you’re wondering: NO. running the msiexec /x with the GUID’s in the registy does not perform a clean or complete uninstall.  The language packs, add-ons, hotfixes, and the extras that the SETUP.EXE module performs are all difficult to reproduce with a single package that produces identical results on 10,000 computers.  We’ve done a really good job ourselves, but it sure would help to get some buy-in from Autodesk.  Especially for the incredible amount of money we pay for “support” services.

Maybe it’s just me, but this just seems amazing.  I hate to think what the other competing vendors will say when they hear this.

Now, to be fair, Autodesk responded to my previous blog post about lack of support and have sent us a survey and invite to a customer council initiative.  We’re still waiting for the first real meeting to see where this is going, but we did have a few preliminary interview sessions for them to gather some key points.  Those went very well, and the people they chose to put on the case are very capable and friendly.

But, while we wait for the fruit of that effort to grow into something recognizable, this interim issue pops up like a mole in the midst of a perfectly manicured golf course.  Oh boy.

Monday, December 31, 2007

Windows Server: The Lazy Method

I'm a huge fan of automation. People typing things into forms repeatedly is to me what scratching nails across a chalkboard is to others. I despise it. It's an exercise in obsolescence. Filling out forms at doctor offices bothers immensely. Stupid. We live in an age where things like this could and should be made simpler and less prone to dumb mistakes and wasted time. How many more times do I have to write down my name, birth date, home address, phone number, insurance info, blah blah blah. Enough already!!! We're obviously still in the stone age.

2008: The Stone Age Continues.

Well, I will make a feeble attempt to save someone some unnecessary work. Here's a semi-compiled recipe for making a fully-unattended, automated, slipstreamed installation disk for Windows Server 2003 SP2. Y ou can use R2 if you prefer, doesn't matter. Some of this was taken from multiple sources, such as http://www.petri.co.il/ and elsewhere. Modified for my own benefit, hopefully yours as well.

Basic Steps:

  1. Make an ISO file from a Windows Server 2003 install disk
  2. Copy the i386 folder from the ISO (or install media) to a local folder
  3. Download and Extract Service Pack 2 to a different local folder
  4. Run the slipstream "update" utility to patch the i386 folder
  5. Add the i386 folder and other files back into the ISO image
  6. Add a WINNT.SIF unattend file to the ISO image
  7. Save the ISO image with a different name

Seven steps to freedom. Not quite, but it's better than nothing. So, let's get started. You'll need some sort of ISO management application to open, edit and save ISO files. I prefer UltraISO, but there are many others that work just as well (to some people).

  1. Open the ISO application and create a new ISO file from your Windows Server 2003 installation disk.
  2. Follow the directions at http://www.petri.co.il/windows_2003_sp1_slipstreaming.htm to slipstream i386 folder to Service Pack 2 (note: Substitute references to SP1 with Sp2 where appropriate).
  3. After you've added the files for SP2 back into the ISO, add a customized WINNT.SIF file (see below) to the I386 folder of your ISO image. Note that you should also make sure you copy the WIN51, WIN51IS, and WIN51IS.SP2 files to the root of the ISO image folder structure.
  4. Save the modified ISO image with a new name (avoid overwriting your original copy)

Now you're ready to either burn the new ISO to a disk, or simply mount it from any VMware or VirtualPC / Virtual Server, etc. guest machine to become the CD drive. Then you can boot, walk away and come back to find a fully installed, ready-to-use operating system. Simply rename it, install the latest patches, configure an IP address and you're ready.

This takes a LOT less time to create multiple servers than manually inserting a CD or DVD disk and walking through the install process. It also eliminates installing SP2 on each one. I think I once calculated this saved me almost two hours of time for each server I installed from a pre-configured installation source like the one described here.

Oh yeah, I almost forgot to include a sample WINNT.SIF file. Simply open this in Notepad and edit the items in red to suit your needs. Then save it before adding it to your ISO image. This will setup your server with a blank password on the Administrator account and automatically format the entire partition of whatever drive you install it upon.

Cheers! Happy New Year!

;SetupMgrTag
[Data]
AutoPartition=1
MsDosInitiated="0"
UnattendedInstall="Yes"
[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=No
TargetPath=\WINDOWS
Repartition=Yes
[GuiUnattended]
AdminPassword="*"
OEMSkipRegional=1
TimeZone=35
OemSkipWelcome=1
[UserData]
ProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
FullName="MY_NAME"
OrgName="MY_COMPANY_NAME"
ComputerName=WS2KSTDSP2
[LicenseFilePrintData]
AutoMode=PerSeat
[TapiLocation]
CountryCode=1
AreaCode=757
[Identification]
JoinWorkgroup=WORKGROUP
[Networking]
InstallDefaultComponents=Yes