Sunday, September 25, 2011

Acad 2012 DirectX - The Final Chapter

I know that I said I was done with this topic, but someone hit me up over the weekend with a desperate request for help and I couldn't say no.  As always, I prefer to share answers on the blog rather than by e-mail because it [A] helps more people at one time and [B] avoids repeating the same answer over and over.  This might go a bit deep, but hopefully it serves to help someone out there to get over this hump with a little less effort.

The Better Way

If you have InstallShield, here's how to do this in the simplest and most effective way:

  1. On a clean reference computer (virtual machine) install the Remote Repackager
  2. Start the Repackage Wizard and select "Snapshot" mode, using multiple steps
  3. When the capture is done, click Finish
  4. Copy the "DirectX" folder from the "3rd Party" sub-folder of your AutoCAD 2012 network deployment into the C:\Windows\Temp folder of the reference computer (making C:\Windows\Temp\DirectX)
  5. Open the folder and launch DXSETUP.exe and complete the process to "finish"
  6. Re-run the Repackage Wizard in snapshot mode to capture the delta state info
  7. Save the output to C:\Packages on the reference computer
  8. Copy the output up to your InstallShield developer share so you can edit it further

When you open it in Repackager, exclude all the junk that relates to "per-user" stores (HKCU, User Profile, etc.) and exclude anything not related to your DirectX installation (background scans, scheduler services, etc.)  Save the output to a new folder (e.g. "Project")

Open the .ism output from the "Project" folder in InstallShield Editor.

Set all the desired properties (title, subject, comment, etc.), there's a lot of stuff to manipulate, so unless you need all the nitty-gritty details I'll skip over them for now.

Build the project into an .MSI package

Run the MSI Validation and clean up any ICE references that matter (ignore ICE27, for example - but don't ignore ICE18, and so on).  Build again, and repeat the Validation until all is good.

You should now have a .MSI installer

TESTING

Once you have your shiney new .MSI installer, test test TEST TEST TEST TEST it until you feel good it's working like it should.  By TEST I mean install it on a new computer, along with .NET 4.0, and then target that computer with the AutoCAD 2012 network deployment using Configuration Manager 2007 or Altiris, etc.  If it works fine and the application launches without errors, you're good.  DO NOT - I REPEAT - DO NOT look at the Configuration Manager advertisement report for the "Success" and call it a "win".  That's NOT good enough.

DANGER ZONE

This is where we separate the men from the boys (or more apropos: we separate the daring idiots from those that prefer to keep their job).

WARNING: The rest of this article is UNSUPPORTED and potentially RISKY.  Always make a backup of your entire AutoCAD network deployment share before making any manual changes.  This information is NOT supported or condoned by Autodesk, its resellers or anyone on this planet.  I do not guarantee this will work for you and there is NO WARRANTY provided, either explicitly or implicitly, for any purpose or use whatsoever.  I accept NO LIABILITY or responsibility for any consequences that may arise from your use or adaptation of this information for any purposes.  In short: YOU ARE ON YOUR OWN - YOU ACCEPT ANY AND ALL RISK from this point on.  Results may vary.  Batteries not included.

Place the new Acad2012DX.msi file in a folder under your AutoCAD 2012 network deployment share.  You can drop it in the "DirectX" folder actually.

Open the deployment .INI file and locate the [DIRECTX] key.  It should look something like the example shown below.

[DIRECTX]
PLATFORM=ALL
PRODUCT_NAME=DirectX Runtime
EXE_PATH=3rdParty\DirectX\DXSETUP.exe
EXE_PARAM=/silent
IGNORE_FAILURE=YES
DISKCOST=50000000

Change the values beneath it to suit the new .MSI installer, as shown in the following EXAMPLE...

[DIRECTX]
PLATFORM=ALL
PRODUCT_NAME=DirectX Runtime
EXE_PATH=3rdParty\Directx\Acad2012DX.msi
EXE_PARAM=/quiet /norestart
LOG=%tmp%\Acad2012DX.log
IGNORE_FAILURE=YES

Save the file and test a deployment on a computer that has .NET 4.0 but has not had AutoCAD 2012 installed prior to your testing. 

NOTES

I have not provided any guidance for getting .NET 4.0 to install with the AutoCAD deployment bundle (via a Configuration Manager 2007 unattended deployment), because I feel it's bad to try to do it that way.  I recommend deploying .NET 4.0 as a separate package/advertisement, in advance of deploying AutoCAD 2012.  The only reason I bother with DirectX like this is because it's a custom DirectX installation (from Autodesk, not me), so it fits more logically with the AutoCAD deployment, than as some sort of general Windows platform update.  Basically, you would never deploy this without AutoCAD 2012, while .NET 4.0 on the other hand would be.

I hope this wraps this boring, ugly, depressing saga up with no hanging threads.

Drop a comment (reply) here if you have any helpful advice for making this work better/faster/easier than I've described.  We'd love to hear it.  I'd love to put the final nail in this coffin and move along actually.

Post a Comment