Wednesday, April 27, 2011

Imaging Computers with MDT 2010 and AutoCAD 2012

Microsoft Deployment Toolkit (MDT) 2010 is a FREE product that is aimed at helping System Administrators prepare and deploy custom operating system installations (images).  I’m not going to explain MDT, WAIK or WDS here.  There are too many other sites, books, and videos that do a great job of that. I don’t need to add any more noise there.

 

If you have network license AutoCAD clients and a network deployment share, you already know how that can save time doing repeated installations.  You may also know how much it helps when pushing installations via SCCM 2007 (or similar products).  Maybe you’ve tried bundling AutoCAD into your operating system image process but are using Ghost or some other snapshot process and find it less than ideal.  Well, MDT not only provides an easier option, it eliminates much of the headache incurred with push installations.

 

For starters, MDT uses a sequential process to perform tasks (hence “task sequences”).  Rather than running entirely under an unattended SYSTEM context with no UI, it runs under a user context (typically), so most of the prerequisite tasks of the deployment work just fine (unlike trying to push with SCCM, where the .NET Framework 4, and DirectX component steps fail).  So you can run the default installation and simply add the "/W" parameter to use it with MDT 2010.

Caveats:

 

You may have better luck than I’ve had with using a “thin” image process and trying to install .NET Framework 4 as a task sequence package instead of going with a “thick” or “hybrid” client build*.  In my experience, the .NET 4 installation via MDT task sequence never works.   But you may be blessed.  My approach is to include .NET components in the base image via a reference capture.  It is crucial to have .NET 4 installed before attempting to install AutoCAD 2012 via an automated/unattended process or it will fail.

I only use network license deployments of AutoCAD when installing via SCCM or MDT.  I do not ever recommend installing standalone/individual licenses

 

Steps:

  1. Build your AutoCAD 2012 deployment share ON the server where the MDT package will refer clients to (this works much better than building it elsewhere and then moving it and editing the deployment configuration INI files)
  2. Configure permissions on the deployment share to suit the user context of the MDT installation (if needed)
  3. Right-click the AutoCAD 2012 installation shortcut in the UNC folder (e.g. Acad2012.lnk), select Properties
    1. Copy the “Target” string contents
    2. Click Cancel to close the properties dialog form
  4. Open the MDT Workbench, expand the Deployment share, select Applications
    1. Add a new Application to the MDT workbench deployment group
    2. Option:  Application without source files or elsewhere on the network
    3. Properties:
      • Publisher: Autodesk
      • Application Name: AutoCAD
      • Version: 2012
      • Language: (leave blank unless you really want to enter it)
    4. Details:
      • Command Line: “setup.exe” (for now)
      • Working Directory: Browse to the UNC share path (do NOT choose from drive letter!) make sure to specify the AdminImage sub-folder in the path (e.g. “\\ ServerName\Acad2012\AdminImage”)
      • After created, click Finish
    5. Double-click the AutoCAD 2012 entry in MDT
      • Click the “Details” tab
      • Replace the “Quiet install command” text with the string copied in step 3/a (example below).  Be sure to replace <uncpath> with your actual UNC path.
        • Example: <uncpath>\AdminImage\setup.exe /W /qb /I <uncpath>\AdminImage\<deployment>.ini
      • Click OK
    6. Right-click the Deployment Share in MDT Workbench and select “Update Deployment Share”

Assuming the rest of your MDT deployment share is configured, and you've already generated a suitable Boot WIM and Boot ISO file set, you should now be ready to start deploying AutoCAD 2012 with your images.

 Notes:

1.       If you discover (like I have) that you also need to install the DirectX components ahead of the AutoCAD deployment installation, you can add the Acad2012DX.msi package I’ve posted and set a Dependency within the AutoCAD 2012 application entry so it runs the DirectX installer first.  If you do this, click “Hide this application in the Deployment Wizard” from within the MDT application properties for the Acad2012DX application item.

2.       A return code of 259 from the AutoCAD installation can be ignored.  I have not seen, heard or experienced any detrimental effects after that has occurred.

3.       Because there is NO OPTION to disable desktop shortcuts for Design Review 2012 or Inventor Fusion 2012 via the Deployment Wizard configuration, you will have to resort to some trickery if you are required to keep shortcuts OFF of the standard desktop.  My trickery is to add DEL commands to a script that wraps the main installation.

4.       If you choose to enable the network log option, keep these points in mind:

a.       The UNC path to the logs needs to have appropriate ACL and Share permissions granted to allow the remote installation context to make updates to the folder contents (log file)

b.      It tracks the entire deployment bundle, but won’t be updated on the network share until the end of the installation process.

c.  If the connection fails before the installation completes, the only trace of a partial installation will be in the client logs.

d.  The network log is cummulative.  It grows with each client installation.  You may want to back it up, rename or delete it occassionally to recover space.

5.       Why does Design Review 2012 get a “Autodesk” prefix, while Inventor Fusion 2012 does not?  Consistency is important.

 

*terms borrowed from Johan Arwidmark and Mikael Nystrom of TrueSec (www.truesec.com)  - geniuses on the topic of Windows deployment automation

Assumptions:

·         MDT 2010 Update 1 with WAIK 7

·         32-bit Windows 7 client Deployment Image with .NET 4 included (sysprep’d from ref computer)

·         New install (not a refresh, upgrade or replacement)

Script Code:

Paste the following code into Notepad…

 

@echo off

TITLE Installing AutoCAD 2012

CLS

echo installing AutoCAD 2012...

SETLOCAL

SET XLOG=%TMP%\Adsk2012_Setup.log

echo %DATE% %TIME% installing autocad 2012 from network deployment >%XLOG%

rem ------------------------------------------------------

rem beware of word-wrapping below.  should be on one line...

rem ------------------------------------------------------

\\SERVERNAME\Acad2012\AdminImage\setup.exe /W /qb /I \\SERVERNAME\Acad2012\AdminImage\ACAD2012.ini /language en-us

rem ------------------------------------------------------

echo %DATE% %TIME% cleaning up desktop shortcuts... >>%XLOG%

del "%public%\Desktop\Autodesk Design Review 2012.lnk" /f /q

del "%public%\Desktop\Inventor Fusion 2012.lnk" /f /q

echo %DATE% %TIME% desktop shortcuts removed >>%XLOG%

ENDLOCAL

 

Edit the code to replace SERVERNAME and other info to suit your needs.  Save the Notepad file as setup.cmd somewhere on the MDT server (e.g. E:\Apps\Scripts\Acad2012\setup.cmd)

 

Import into MDT 2010 deployment share:

Right-click Applications, select New Application

Select type: “Application with source files”

Specify the properties (publisher, product, version)

Select the setup.cmd file (click Browse)

Confirm, import and click Finish

 

Open the Application properties, copy the “Application GUID” value to the clipboard

 

Open Deployment Properties, click Rules tab

 

Add to [Default] section…

 

; autocad 2012 custom deployment

Applications001={paste the application GUID here}

If you already have other ApplicationsXXX entries, just insert it after the highest number and assign the next sequential number (e.g. Applications011={guid} )

Useful Links on MDT 2010:
Post a Comment