Tuesday, November 1, 2005

Silent installation of Autodesk DWG TrueView

To install Autodesk DWG TrueView with a click on a button create a VBScript. Then you can just send a link to the file to the users or deploy it with other means. Download the free viewer and extract the zip file to a server location. Open Notepad and enter the following code and save the file with the vbs file extension.

on error resume next
Set WshShell = CreateObject("WScript.Shell")
runstring="msiexec /I ""\\server\SetupDWGTrueView2\DWGV.msi"" /qb! " & _
"INSTALLDIR=""C:\Program Files\Autodesk\DWG TrueView"" " & _
"ACAD_SILENT_LICENSE=YES"
WshShell.Run runstring,1,true
msgbox "Ready"

You have to correct the path to the msi file.
For complete options to use with msiexec command, see http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/msiexec.mspx.
Using VBScript it's also possible to prepare a profile in DWG TrueView. Make the changes in Tools>Options. Locate HKEY_CURRENT_USER\Software\Autodesk\DWG TrueView in the registry. Export it to a reg file and install that prepared profile for the end user. This includes any custom files like ctb, pc3, fonts etc.
You can also make sure that this happens if another user logs in on that PC. Otherwise that user will have the default profile.

Previous post on the release of DWG TrueView.

>>>Update

If the settings in Options should be distributed it should be taken in consideration that some paths are saved pointing to user locations like C:\Documents and Settings\jimmy.bergmark\Application Data. Therefore you have to just take some of the settings. (Update. See the usage of environment variables in the end of the post)

Below <<Unnamed Profile>> there can be several paths that have to be handled. I recommend that these are removed from the reg file or that you just keep those that you actually need to change. E.g.:

[HKEY_CURRENT_USER\Software\Autodesk\DWG TrueView\R2\DWGV-4001:409\Profiles\<<Unnamed Profile>>\General]
"PrinterConfigDir"="C:\\PHEM\\Autodesk\\AutoCAD\\16.2\\plotters"
"PrinterDescDir"="C:\\PHEM\\Autodesk\\AutoCAD\\16.2\\plotters\\PMP Files"
"PrinterStyleSheetDir"="C:\\PHEM\\Autodesk\\AutoCAD\\16.2\\Plot Styles"

For adding support paths I instead recommend that you copy what you need to the following paths. Typically you might want to add fonts, shapes, linetype files and so on.

C:\Program Files\Autodesk\DWG TrueView\Support
C:\Program Files\Autodesk\DWG TrueView\Fonts

>>>Update 2005-11-03 based on the comments of R.K. McSwain.

At his blog post he shows the usage of windows environment variables for the support file search path.
%ALLUSERSPROFILE% returns the location of the All Users Profile.
%APPDATA% returns the location where applications store data by default.
%PROGRAMFILES% returns a path like "C:\Program Files".

There is also another way to run the installation and to get all supporting installations installed if needed using setup.exe and run it in a silent mode. Change the setup.ini file and the following rows (changed text is bold):
SETUP_STARTUP_MESSAGE=NO
INSTALL_CMD_ARGS=/qb! /L*v %temp%\DWGVInstall.log INSTALLDIR="C:\Program Files\Autodesk\DWG TrueView" ACAD_SILENT_LICENSE=YES

>>>Update 2005-11-03 Added the arguments INSTALLDIR and ACAD_SILENT_LICENSE


Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner