Advanced Architectural Desktop Installation Secrets Matthew A. Stachoni – Bernardon Haber Holloway Architects PC & BHH|Tait Interiors LLC

BD34-1 Does installing Architectural Desktop across your company have you flustered? Do you need to incorporate your company's standards on top of Architectural Desktop? What about company and user customization? We will cover advanced ADT installation topics in depth and step by step. You will learn some industry-standard (and not so standard) ways of installing and configuring ADT. You will understand the inner workings of the Network Deployment Wizard, as well as tips for avoiding the pitfalls. We'll cover how to easily centralize ADT content on your servers. Learn how to plug your own customization into ADT in an effective way, and learn the inner secrets to migrating your users (and their stuff) forward to new versions safely.

Key Topics • Defining your final installation condition, or “Point B” • Multi-Seat Standalone Deployments for the Enterprise • Inside the Network Deployment Wizard • IT and CAD management topics which dictate Deployment techniques • Advanced ADT Deployment techniques in a highly customized corporate CAD environment • Inner secrets of an Architectural Desktop User Profile • Hacking DLL resource files to bend ADT to your will • Automating installations of ADT with a complete user environment

Target Audience CAD Managers and IT folks who are charged with installing and configuring Autodesk Architectural Desktop across your company

About the Speaker: Matt is currently the CAD and IT manager for the three offices of Bernardon Haber Holloway Architects PC and their affiliate Interior Design firm, BHH|Tait Interiors L.L.C. Matt has been working with and customizing AutoCAD since 1987 and has managed Architectural Desktop in architectural firms since Release 1.0. He has previously done work for the State of Delaware, Massachusetts General Hospital's Planning Department, and several other architectural and interior design firms in Delaware and Boston.

More AU 2006 class information at www.autodesk.com/auonline

Advanced Architectural Desktop Installation Secrets

Table of Contents

TABLE OF CONTENTS...... 2 1 INTRODUCTION ...... 3 2 STARTING AT THE END: POINT B ...... 5 3 ARCHITECTURAL DESKTOP DEPLOYMENTS ...... 7 4 CAD MANAGEMENT ISSUES THAT DRIVE DEPLOYMENT DESIGN...... 9 5 PREFLIGHT STEPS BEFORE CREATING A DEPLOYMENT ...... 12 6 CREATING A DEFAULT DEPLOYMENT ...... 14 7 MODIFYING THE DEFAULT DEPLOYMENT ...... 17 8 INSTALLING THE DEFAULT DEPLOYMENT ...... 19 9 CORPORATE ADT CUSTOMIZATION STRATEGIES ...... 20 10 HACKING ADT DLLS FOR FUN AND PROFIT...... 30 11 CREATING YOUR CORPORATE DEPLOYMENT ...... 37 12 INSTALLING THE CORPORATE DEPLOYMENT ON YOUR TEST PC...... 41 13 CREATING A TEMPLATE ROAMABLEROOTFOLDER...... 46 14 INSIDE AN ARCHITECTURAL DESKTOP USER PROFILE ...... 53 15 CREATING A PROTOTYPICAL USER ENVIRONMENT...... 56 16 SET UP THE FOR DEPLOYMENTS AND INSTALLATION...... 62 17 CREATING INSTALLATION BATCH FILES...... 63 18 INSTALLING ADT 2007 ON CLIENT MACHINES...... 73

THANK YOUU ...... 75

2 Advanced Architectural Desktop Installation Secrets

1 Introduction

Architectural Desktop (ADT) is that certain kind of application that straddles the line between a traditional, standalone desktop program and a more enterprise-centric or "client-server" type of application. ADT is of course built on an AutoCAD core, and AutoCAD's roots are firmly steeped in the early years of the microcomputer, developed before local area networks were common. As AutoCAD/ADT developed along with the local area network (LAN), considerations were - and are - being made to put more of the application's support functionality on the server to be shared across all users. In addition, the requirements of the Windows XP logo certification specifically dictate how a program's core, support and user-specific files are to be installed on a computer. However, ADT is not a true Enterprise application with a full server-side component. It's really a heavy-duty desktop program which references many support files, which can be held locally or on a server. Many of these support files are normally considered “global” across the company and managed by the CAD Manager, but many are meant to be personal, customized by the end user. Understanding what ADT's support files do, who can change them, and where they need to be located is the first task in designing an effective Deployment and Installation procedure. A normal desktop app is meant for a single person to use on a single PC and, out of the box, ADT is no exception. It usually has little interaction with a server, except to edit document files that are located there. However, an application’s user-specific and support files are held locally, which limits the ability for the user to "roam" between machines and increases the chances of data loss in case of a hardware failure, because in both cases a user would have to build up all of their personal settings and support from scratch again. The problem is that there is a huge number of support files associated with Architectural Desktop, but being a desktop application, there is no managing “back end” to control them. That is the main responsibility of the CAD Manager when developing your ADT Deployment and installation protocols. While most of the program is indeed kept locally on your machine, more and more of the program's support structure is better kept on a server, so it may be centrally managed by a CAD Manager and instantly available to users - wherever they may be.

Class Notes The content provided herin is the result of many years’ worth of managing ADT in a multi-office environment, over all releases of the program. There are many ways of managing your ADT users and controlling Corporate deployments and installations. Thus, much of what follows is going to be very specific and probably a bit opinionated in nature, and may run across the grain from the ways you currently install and manage ADT. And that’s…OK! I would never assume to have the best answers to everything, and I will make every effort to explain concepts from a CAD Managers viewpoint such that you understand where I’m coming from. However, these techniques have been tried and tested across my company with great success for several releases now, and that they do indeed work. The nature of ADT is such that you can take with you that which you think will work for you. During class I will be using an example set of corporate customization for demonstration purposes only. It will not be covered in detail as part of the class. Rather, its structure and organization is provided only as a springboard for you to consider. Feel free to adapt it to your particular Deployment strategy. It’s probable that you already have your own customization back end, and can easily adjust the concepts shown here to work in your particular situation. Note Some of the advanced topics described here are not supported by Autodesk, and you should read and understand all of the content in this handout before attempting anything that could adversely affect your organization, your users, and, as a result, your personal health and well being. Safety First!

3 Advanced Architectural Desktop Installation Secrets

Although the amount of material presented in this class is massive, there are a number of things we will specifically not cover: • Network licensing installations • Installations through Windows' Active and , SMS or other enterprise-wide IT infrastructure application • Specific CAD Customization (VisualLISP or VBA routines) above and beyond Deployment and software installation

Technical Skills Required To get the most out of this class content, some advanced technical, CAD and IT skills should already be in hand. We will be employing the following skill sets in this class: • Designing Corporate ADT Deployments • Understanding of ADT support files: What they do, where they go • Intelligently handling your users’ support files • Integrating a centralized CAD Customization system on top of ADT • Registry handling, .REG and .ARG profile files compared • Using DOS command-line batch file scripting to automate installation tasks

Terms Used in this Class Generally, anything enclosed in percent signs (e.g., %UserName%) refers to a Windows which can be referenced in this discussion. These can be seen by issuing the SET command at a DOS prompt. Anything in brackets <> indicates an ADT specific folder as indicated below: BHH-T: This is a shortcut my company uses to refer to all Corporate ADT customization, and I will use this in this class and handout. Substitute your own company's initials. : Refers to the AdminImage folder used to house all of your Deployments’ source files. In this class we will use C:\ADT 2007 Install\AdminImage to initially develop the Deployments. %UserName% or : The currently logged-on Windows User name. %AppData%: The root of the current user's Application-specific settings, usually at C:\Documents and Settings\%Username%\Application Data\. or RoamableRootFolder: The root folder under which ADT stores all of its user-centric support files. The default location is %AppData%\Autodesk\ADT 2007\Enu\, or, as expanded, C:\Documents and Settings\%Username%\Application Data\Autodesk\ADT 2007\enu. : This is where ADT stores its per-user but non-roamable support files, that is, those files that would not “roam” with the user under Windows Roaming Profiles. Its location is %UserProfile%\Local Settings\Application Data\Autodesk\ADT 2007\enu. An example of data held here are your autosave files. %AllUsersProfile%: Root of all files and settings which are global across all users on a single machine. Default location is C:\Documents and Settings\All Users\. : Computer-wide ADT support files which are held in %AllUsersProfile%\Application Data\Autodesk\ADT 2007\Enu\. HKCU: Shortcut for the HKEY_CURRENT_USER section of the Registry, which holds all of the Windows and application settings for the currently logged on user.

4 Advanced Architectural Desktop Installation Secrets

2 Starting at the End: Point B

Given that we are not dealing with a case of automated “pushed” installations through Group Policy or other Managed Software initiative, we are most concerned with sitting at a user’s machine and installing a completely preconfigured deployment of Architectural Desktop, and doing it in the most painless way possible. The first step in developing a Deployment and Installation procedure is to stop and think a moment about where you want each of your users to be after you are done, and have handed off the keys to the PC over to them. Under normal conditions, installing ADT is only part of the process. You’ll probably still need to fire it up and make extensive changes to the configuration (user profile), such as connecting it to your centralized customization system, setting up access to Corporate Tool Catalogs, installing standard Tool Palettes, configuring CUI workspaces, templates, plotters, plot styles, and so on. This final condition, with everything tweaked out to perfection, is what we’ll call Point B. There may be a hundred ways of getting from Point A to Point B, but if Point B is a moving target, those hundred ways can turn into a million. However, if Point B is a well defined situation, then you can break down all of those required steps to get there into a manageable series of procedures. That is what this class is all about – establish Point B and the steps it takes to get there. You will want to spend a good amount of time preparing the pre-configuration of your ADT installation before you even touch the user’s machine. If you invest the time up front developing a robust ADT installation protocol, then you will spend MUCH less time doing so after it is installed. You do not want to have to perform the same 20 lengthy operations on 30 different machines. Instead, configure everything correctly in the development process, and only have to do some little things across your 30 workstations. Remember that computers are meant to follow instructions. Write a set of intelligent instructions and they will do what you want in a dependable, predictable fashion.

Point B Defined After Architectural Desktop is installed, you want every user’s machine to be configured in exactly the same way. The procedures described in this class lead to the following end-user experience: 1. Architectural Desktop 2007 with Service Pack 1 is installed, along with the latest version of the DWF Viewer, the DWGTrueConvert utility, and any add-ons desired. This is taken care of by creating a Corporate Deployment. 2. ADT’s installation includes some modified DLL files which provide larger dialog boxes for more comfortable use. 3. Each user has a default ADT environment that is completely preconfigured in the following manner: • Each user has their own personal ADT User Profile which is named after their Windows logon name. The user’s desktop ADT 2007 icon has been modified to start ADT with this custom user profile loaded. • The user profile is configured to automatically connect to and load any centralized Corporate customization you have prepared. Support paths are configured which point to Corporate servers, with access to standard central Plotters, Plot Styles, Templates, and so on. • Each user has a Main CUI that is named after their Windows logon name. They have a specially prepared Enterprise CUI which consists of the ADT CUI, along with a Corporate CUI, ACAD, Express Tools, and ancillary ADT CUIs as Partials CUIs. • The user’s Workspace is populated with a common set of standardized Tool Palettes that are linked to a centralized set of Corporate Tool Catalogs. These Catalogs and Palettes contain

5 Advanced Architectural Desktop Installation Secrets

company specific toolsets for easy access to Corporate ADT Standards such as your AEC Styles, Block Libraries, and so on. 4. The user’s set of ADT “application data” support files – located in what is called the RoamableRootFolder – lives on a server instead of the individual machine. All of the user’s personal ADT environment and customization is held there, which allows users to transparently “roam” from one PC to the next with their personal ADT workspace intact, without the IT overhead of implementing Windows Roaming Profiles.

ADT Installation Procedure After you decide what Point B is, you then work somewhat backwards to achieve that goal. The next step is to design a painless installation process. Ideally, you want to automate the process to go from any given condition on a user’s workstation to having ADT 2007 installed, fully configured, and ready to go. When sitting at a user’s machine, you want your perfected automated installation procedure to do the following four things automatically: 1. Prepare the system for ADT by uninstalling any previous versions of Architectural Desktop and related software, then perform any system optimization improvements, such as defragmenting the hard drive or deleting Registry items that get left over from an ADT uninstallation. Create all drive mappings to central server resources that are required by your Deployments and Corporate ADT 2007 customization system. 2. For the user on this machine, create a new, server-side RoamableRootFolder (the user’s ADT support files) from a preconfigured prototype template folder. This RoamableRootFolder contains a preconfigured ADT user profile which connects to your standardized Corporate CAD environment, as well as a template CUI file that will become the user’s Main CUI. It also includes all of the required Corporate Tool Palettes in the default Workspace. Part of the automated installation process will be to make the required edits to these files to “home” them to that particular user’s Windows login name. 3. Install Architectural Desktop 2007 with all the correct components, bells and whistles, in a completely hands-off mode. No entering of serial numbers, no selecting of features to install, and so on. Includes the latest version of the DWF Viewer (as of this writing, DWF Viewer 7 with Service Pack 1), as well as other required Autodesk related additional software, such as the DWGTrueConvert utility. 4. Install a new desktop icon that launches ADT with the preconfigured User profile, as well as copy over any program DLLs which have been hacked modified for comfort.

All of these steps dovetail with each other, and must be done in a particular order for everything to work without error. For example, when the new RoamableRootFolder is created, part of this setup process is to properly personalize it to the current user’s Windows logon name. When ADT is installed and run, the profile which is loaded will then properly refer to the Users name in many locations. Taken together, these four steps ensure that the only thing we have to do after everything runs is fire up ADT to load the user’s profile and make sure everything works, which takes about 3 minutes per user. The rest of this paper will discuss in detail the process of getting to Point B and creating that scripted installation procedure.

6 Advanced Architectural Desktop Installation Secrets

3 Architectural Desktop Deployments

Deployment Overview An Architectural Desktop Deployment is a combination of a single Administrative Image - a collection of the ADT program installation files – with a particular set of instructions for installing and configuring Architectural Desktop. Taken together, a Deployment makes the process of installing ADT a single-click, hands-off affair. You do not have to enter in any serial numbers, select details of your installation, or anything. From the Administrative Image, just select the particular Deployment you wish to install, walk away, and 10 minutes later you have Architectural Desktop installed. It’s not completely configured, of course, but it is installed. You use the Architectural Desktop 2007 Deployment Wizard to step through the process of creating the Administrative Image and Deployment instructions package, hereafter referred to as simply the Deployment. The Deployment Wizard is a standalone application that you install once, on a single test PC, to create your various deployments. It is also version specific; you cannot use the ADT 2007 DW to deploy ADT 2006 and vice versa (not that you would want to). It’s important to note that you have only one Administrative Image of installation files, but you can have an unlimited number of Deployments. Each Deployment installs ADT from the installation files, but just gives the installation a particular set of instructions for doing so. The Deployment Wizard sets up this collection of files at \\AdminImage, where is a folder on your server that you specify in the Deployment Wizard. In the case of this class, we will set up a Deployments on a local PC for testing purposes. A Deployment’s instructions for installing ADT are held in two files: .ini and .mst. Each Deployment requires both the .ini and .mst files for it to work. For each Deployment that you create, the Deployment Wizard creates a shortcut at the root of your folder which will launch the deploy.exe with that particular deployment. It simply launches the \deploy.exe program with a deployment name as an argument to install that particular deployment, e.g. \deploy.exe “CompanyName” will install ADT using the “CompanyName” Deployment which you created earlier. The deploy.exe program hands the installation of ADT off to msiexec.exe, which is the program which handles the standardized installation of all Windows applications. All Windows applications (which meet XP logo requirements) use msiexec to handle the installation of a program’s applications, features and components. It should be noted that most of the problems you will encounter with installing your Deployments are keyed to issues with msiexec.exe.

.Ini The .ini file is a basic set of instructions that specifies to the msiexec program what separate software packages to install, in what order to install them, and what msiexec installation parameters to use, e.g. perform a quiet installation, don't reboot, etc. The .ini file is a simple ASCII text file which can be altered to suit. This directs the installation and installs prerequisite components in addition to ADT: Updated Windows Installer .NET Framework 2.0 (32-bit) DirectX 9.0 runtime Microsoft Data Access Components (MDAC) 2.7 DWF Viewer 6.5 Architectural Desktop 2007 Service Pack 1 (as added by the Deployment Wizard) Flash Player 8 Note: No specifics about the ADT installation itself are included. That’s the job of the MST file.

7 Advanced Architectural Desktop Installation Secrets

We are going to edit the .INI file after the Default Deployment is created to adjust what and how components are installed.

.mst MST files are called Transform files. They are used to customize program installations which use Windows Installer (MSI) technology. MSI files are “installer” databases that explain the structure of the application being installed: features, components, Registry settings, and so on. ADT’s installer (ADT.MSI) has information regarding the installation of ADT, plus Express Tools, Metric/Imperial content, Tutorials, and so on. An MST file is a collection of changes to be applied to the MSI installer database when it is installed. MST files do not alter any source files (i.e., anything under \AdminImage). The changes solely affect the installation process itself. Thus, you can have one or more MSTs which install from the same ADT source, but with different configuration settings. MST files are not readable or otherwise editable outside of the Deployment Wizard.

Autodesk's view of a typical ADT Deployment and client installation In Autodesk’s world, deploying and installing ADT could not be easier: • Prepare a shared network folder for the Deployment • Install/run the Deployment Wizard to create your Corporate Deployment • Install ADT 2007 on all of your workstations • ??? • Profits!

Real world ADT Deployment and client installation process • Conduct basic IT tasks to prepare for the Deployment creation • Create a Default Deployment for testing and study • Install the Default ADT Deployment on your test PC • Study default Deployment target folders and support files • Design, prepare, test and migrate your existing Corporate Customization for ADT 2007 • Create a custom Corporate Deployment, which points to your corporate customization • Install your Corporate ADT Deployment on your test PC • Run ADT, using the default "Architectural Desktop - Imperial" user profile • Set up a prototypical ADT user environment by tweaking your initial user environment, including additional Options settings, Tool Palettes, configuring your CUIs, and so on. • Somehow distribute that default environment to your users as defined by our definition of “Point B.” • Create batch file scripts for installing ADT • Install ADT on the PC. • Profits! *whew*

Comments: All of the above steps are separate but related tasks that need to be accounted for in time and effort. Although it may seem to be a huge job, don't shortstop the Deployment development process in a rush to install the software on the desktop. The more users you have, the more an extensive Deployment development effort will pay off. The more you can do in this early process, as a one-time-only task, the less post-installation work you have to do at the individual machine for each user. Additionally, pre-staging your user environment in this manner means that any issues your users will have later on with the program - e.g., trashed Palette groups - can easily be remedied without a complete reinstallation of the software. Simply copy over your prototype user environment using batch file scripting described later.

8 Advanced Architectural Desktop Installation Secrets

4 CAD Management Issues That Drive Deployment Design

ADT Usage / Environment Considerations Before you start down the path of creating deployments, you need to answer the following basic questions that dictate the path taken: • Is ADT to be installed, configured and used as Out Of The Box (OOTB) as possible? • Is your ADT heavily customized at the user and/or Corporate level? • Is there centralized CAD management? How much is “enforced” vs. what is kept “loose?” • What components of your particular system are version specific? What are not? • What are you going to migrate forward to new releases? How are you going to do that?

Understanding ADT Component and Support File Scope ADT is made up of a set of core program files and around a billion Support Files, such as your CUI files, hatch pattern definitions, and so on. Every files used by ADT can be classified by its Scope, that is, under what purview does it fall under. There are three scopes for ADT support files: Local, Corporate, or User. Local Scope These are the files that are minimally required for ADT to run; e.g. acad.exe, .DLL files, and so on. These are always held locally on each machine as part of the installation process. These files include everything located under C:\Program Files\Autodesk Architectural Desktop 2007 and C:\Program Files\Common Files\Autodesk. The general rule of thumb is that these local files are not to be customized by the end user or the CAD Manager. These files can and should be considered "disposable,” because the core application needs to be easy to wipe off and reinstall easily without a data loss penalty to the end user. Corporate Scope These are the collection of support files which need to be centrally managed and shared among all users in your company. This includes all Corporate CAD customization and any shared Out of the Box (OOTB) ADT content that comes with the software. It’s under at least some CAD Manager control, and may be made Read-only to normal users. As such it is almost always located on a server, which is backed up regularly, has full time UPS protection, and so on. Autodesk provides an initial set of shared content, which is by default located at %AllUsersProfile%\Autodesk\ADT 2007\enu. In a networked environment, this would be located on a server, usually mapped to a globally constant drive letter (e.g., J:\), which points to a server share, e.g. “\\LocalServerName\CAD Support 2007\” From an CAD Manager’s standpoint, ADT’s out-of-the-box AEC Content components are often configured to be installed on a server as part of a Corporate ADT Deployment in the Deployment Wizard. In this class, we will put all of ADT’s AEC content on the server; however, you can decide what is to be centrally located on more granular level as seen in the Deployment Wizard as covered later. User scope These are those support files which are supplied to the user for their own use and customization. This would include CUI files, toolbar icon bitmaps, a personal Tool Catalog Library, tool catalog(s), tool palettes, dictionary, etc. The location for such user-centric support files is called the RoamableRootFolder in ADT’s parlance, and is by default located at %AppData%\Autodesk\ADT 2007\enu. As noted earlier, it is possible to configure this (post-Deployment Wizard) to live on a server. It would then be backed up, under UPS protection, and users are now fully "roamable" across machines.

9 Advanced Architectural Desktop Installation Secrets

Scope Notes Individual files belong to one and only one Scope. For example, a particular CUI file is considered either user-specific or Corporate (shared), but not both. Your final ADT Working Environment is the union of all Local, Corporate and User program and support files.

IT Considerations for Deploying and Installing ADT

Deployment Wizard Technical Requirements The Deployment Wizard can create a Deployment either on a network server or on a local machine. (Autodesk’s documentation states it must reside on a network server, but this is not the case as you will see later). In either case, for the Deployment Wizard to work you must have a valid network connection and a TCP/IP address, even if creating a Deployment on a local PC. You cannot create a Deployment without it. For most this is not a problem, although if you are in a Starbuck’s somewhere creating a deployment on your laptop without access to a wireless connection, you would be in trouble. You do not need an Internet connection for Deployment.

Referring to Network Resources in your Deployments: During the course of creating deployments you will often reference shared network resources. There are various ways of doing this, and each one has their good and bad points: • Using UNC Paths Referring to network resources by UNC paths (e.g., \\ServerName\Share\PathToFile) may be used, but this has problems. Foremost, it is inflexible, in that you must be in constant contact with the particular servers at both Deployment development and installation time. Additionally, UNCs will be coded into the installation and resultant profiles and Tool Palettes. This "hard coding" to a specific share on a specific server may cause issues in the future if your IT infrastructure changes. For example, if you move all of your AEC content to a new server with a different name, and all of your existing links to this content will break and will be almost impossible to fix without a lot of work. • Using drive letters for network locations. This is where you map a drive letter to a server share, e.g. J:\ = “\\ServerName\CAD Support 2007\.” Logical drive letters can map to any \\server\sharename at any time. Knowledgeable IT folks can generally move things around at the back end without adversely affecting the end user or installed programs, as they can remap drive letters for you automatically with login scripts. This is the most common method used today and the one we will use in our Deployments. • 3rd solution : Windows Distributed (DFS) Distributed File System is a server technology which ‘virtualizes” server storage completely within Windows’ . To the end user, a link to a server resource can be seen as simply another folder off of the C:\ drive. Nothing is affected if back-end data is moved from server to server, because the server links are always updated transparently through Active Directory and DFS to find their destination location. From an IT standpoint, DFS also provides server-to-server data mirroring and synchronization possibilities.

Local Area Network speeds • Slow speeds/high latency can adversely affect your normal ADT program speed depending on how much is stored on your servers, in opening remote CUIs, refreshing palettes, and so on. • Gigabit speeds are affordable and are really a minimum standard you should be operating under. However, you need all Gigabit components in the electron path for it to work: NICs, switches (not hubs), patch panels, Cat5e wiring minimum, etc.

10 Advanced Architectural Desktop Installation Secrets

Windows Components Required by ADT 2007 • ADT 2007 installs the 32-bit version of Microsoft .NET Framework 2.0 The Microsoft .NET Framework is a Windows software component which provides pre-coded solutions to common programming requirements, and manages the execution of programs written specifically for the Framework. As such, more and more development is being done using the .NET platform in an attempt to simplify the development process and provide a safer environment under which to function.

ADT uses the .NET Framework in several places, the CUI editor being the most notable. However, some of your existing applications may not work well with .Net 2.0; this requires testing before your final ADT 2007 rollout.

.NET 2.0 notes for 64-bit Windows XP users: ADT 2007 Deployments install the 32-bit version of .NET 2.0, which is incompatible with the 64- bit version of Windows XP (XP x64). You will need to download and install the 64-bit version of .NET before installing ADT 2007 for ADT to work on your XP x64 bit system. If the installer sees .Net 2.0 installed (32- or 64-bit), it will not install over the existing one.

As you will in the following section, we can modify the Deployment to install different components that what is normally supplied. You may want to create a Deployment that installed the X64 version of .NET 2.0. The instructions given for editing your Deployment .INI file will most likely apply to substituting the x64 version of .NET; however this is untested by the author at this time. • 6 Internet Explorer 7 was released earlier this year, but as of this writing IE 7 breaks some things in ADT, for example, how the Content Browser visually displays. Refer to the thread at http://discussion.autodesk.com/thread.jspa?threadID=521696 for more information. As of this writing a patch is in the works, and can even be added to your deployments with little effort.

Dealing with General Deployment Flakiness As mentioned previously, an ADT Deployment installation can be fraught with hardship due in large part to the dependence on the Installer technology and all that that entails. In particular, you may see installations fail for apparently no reason. While there are actual reasons why Deployments fail, they can be obtuse and time consuming to troubleshoot.

To aid in ensuring an installation success, first exit all running applications, and clear out your %TEMP% folder before installation (usually located at C:\Documents and Settings\\Local Settings\Temp\).

To determine a starting point for troubleshooting, open the \Log\ log file that is created whenever a deployment is installed. This log tells you which components installed and their installation status.

There will also be a very verbose log file created in the %TEMP% folder as well. If you have a deployment installation error out, look in this file for an 4-digit code such as “Error ####,” then perform a Google search on "msiexec #### error code"

When all else fails, try recreating the Deployment from scratch. Deployments don’t seem to like being edited over and over again – they seem to get “tired” and tend to stop working after so many edits.

11 Advanced Architectural Desktop Installation Secrets

5 Preflight Steps Before Creating a Deployment

Prepare a Clean PC for Creating and Testing your Deployments • This is for Deployment creation, configuration and testing purposes only; it does not have to be a screamer 3D machine, only one that meets the minimum ADT system requirements for installation. • Ideally, this is a spare, non-production machine, with a fresh installation of Windows XP OS with Service Pack 2. Make sure it is without any previous version of ADT or Autodesk software installed. To minimize potential conflicts, only common applications used in your organization, e.g. Microsoft Office should be installed. • Internet Explorer 6 with Service Pack 2 is required. At the time of this writing, IE 7 is not supported. • Ensure that all critical Windows Updates are installed. If you have the .NET Framework 1.1 installed, ensure you have updated to its Service Pack 1. • Make sure you have all of the latest drivers for your system installed, particularly the video driver. ADT 2007’s new graphics kernel makes strong demands on your video card, and graphics anomalies can happen even if you aren’t doing any 3D work. Check out Autodesk’s certified graphics hardware database at http://usa.autodesk.com/adsk/servlet/hc?os=WinXP&siteID=123112&catID=6711614&id=6711 853&linkID=2475161&is_results=1 • Disable all Anti-Virus software. • Tune your system for peak performance. Defragment the hard disk, disable all extraneous XP visual effects, screen savers, and so on. In particular, check your startup condition using the .exe utility to see what starts when you boot up and log onto your machine, and stop the automatic loading of any programs. You want the machine as clean running as possible. • In Internet Explorer, Tools, Internet Options > Advanced tab, Security, uncheck the “Check for Publishers’ Certificate revocation” checkbox. Refer to http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=4366058&linkID=2475323 • If you can, install a dedicated screenshot program like SnagIt to record all of your progress.

Copy the Entire ADT 2007 DVD to a Local or Network Shared Folder • Copying the entire DVD to a local/network drive will improve performance in creating Deployments and removes the hassle of dealing with a separate DVD. • Examples of a folder structure: Local: C:\AppImages\ADT 2007\ Server: \\ServerName\PCSetup\Apps\CAD\ADT 2007 Image\

Prepare Either a Local or Network Deployment Location Folder • For this class we will use a local folder, C:\ADT 2007 Install\ as an AdminImage root folder. Since you will be creating multiple Deployments, and installing ADT multiple times, having it reside local is faster than a server-side deployment. You are also able to test Deployments on a machine that is away from your servers and users, minimizing any potential damage you may cause. After all testing is complete, you can copy the Deployment to a server share and edit the deployment’s .ini file to point to that location. • If using a server for deployment storage, create a share that all users have read access to, e.g. \\ServerName\PCSetup\Apps\CAD\ADT 2007 Install\ • Create an Admin folder at the root of this Deployment folder for holding additional files, e.g. C:\ADT 2007 Install\Admin

12 Advanced Architectural Desktop Installation Secrets

• Add \Screenshots, \Notes, and \Deployment Backups subfolders to this \Admin folder. As you work through your Deployment creation, take screen shots of all dialogs, take notes of all settings, and back up Deployment .ini and .mst files for safe keeping.

Create a Local or Domain "Dummy" User Account for Installation and Testing • Give it local Administrative rights on your test PC. • Give it a 'unique' name. In this class we will use a username of 'Zaphod' for reasons which will quite possibly become clear later.

Install the Deployment Wizard to your Test PC • Run the \AppImages\ADT 2007\Setup.exe program to launch the Architectural Desktop 2007 Media Browser, which is your storefront for accessing all installation materials. • Go to Install > Multi-Seat standalone Deployment > Install to install the Deployment Wizard.

Download New Versions of ADT Components Put these in C:\AppImages\ for storage as described below: • ADT 2007 Service Pack 1: Download from http://images.autodesk.com/adsk/files/adt2007swlsp1enu.exe Extract the MSP file from the EXE by typing the following command at a DOS prompt: \\ /e \.msp Example: c:\AppImages\ADT 2007 SP1\adt2007swlsp1enu.exe /e c:\AppImages\ADT 2007 SP1\adt2007swlsp1enu.msp • DWF Viewer 7: DwfViewerSetup.msi is downloadable from http://www.autodesk.com/global/dwfviewer/installer/DwfViewerSetup.exe Note: This link actually downloads the DwfViewerSetup.Msi file, not the EXE. Place in \AppImages\DWFViewer7. • DWF Viewer 7 Service Pack 1: Download from http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=8200645&linkID=820063 9. Place in \AppImages\DWFViewer7 • Additional applications: Download any additional apps you wish to include in the Deployment process, e.g. DWGTrueConvert, available from http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=8077767. Place in \AppImages\DWGTrueConvert

Create a Batch File to Uninstall ADT and Related Components for Deployment Testing • Create a C:\ADT 2007 Install\Admin\Scripts folder. Create a batch file called "uninstall2007.cmd" as follows: rem UNINSTALLADT2007.CMD rem Uninstall routine to uninstalling Autodesk 2007 and related apps

rem Uninstall DWF Viewer 7.x Msiexec.exe /x{9A346205-EA92-4406-B1AB-50379DA3F057}

rem Uninstall Autodesk TrueConvert msiexec.exe /x{5783F2D7-0221-0409-0000-0060B0CE6BBA}

rem Uninstall ADT 2006/7 Msiexec.exe /x{5783F2D7-5004-0409-0002-0060B0CE6BBA}

defrag c: -v

13 Advanced Architectural Desktop Installation Secrets

6 Creating a Default Deployment

Overview As the first step, we will create a Default Deployment - with no customization - as a preliminary step to understand the Deployment process. This is used to help create the Corporate Deployment later on. This Default Deployment also provides the necessary resource files for editing and customizing ADT before the Corporate Deployment can be installed.

Default Folders as Seen in Deployments = Roamable Root Folder = %AppData%\Autodesk\ADT 2007\enu = %AllUsersProfile%\Autodesk\ADT 2007\enu = C:\Program Files\Autodesk Architectural Desktop 2007 = %Temp% = %UserProfile%\Local Settings\Temp = %UserProfile%\Local Settings

Preparation Prepare your test system as described in Section 4

Run the Deployment Wizard • Create a "Default" Deployment used as a baseline at C:\ADT 2007 Install\AdminImage • Use all default settings, without any customization tweaks for almost all dialogs. • Record each dialog box by taking screen shots. Store them at C:\ADT 2007 Install\Admin\Screen Shots

Default Deployment Wizard Dialogs Step by Step 01 Welcome • Create an Administrative Image 02 Create Administrative Image • MSI File: C:\AppImages\ADT 2007\Install\ADT.msi • Administrative Image Location: \\127.0.0.1\C$\ADT 2007 Install • Apply a Service Pack: C:\AppImages\ADT 2007 SP1\adt2007swlsp1enu.msp • Do not check "Group Policy Objects will be used too distribute this Deployment" (GPO deployments are not covered in this class material, but Autodesk University class materials on GPO deployments should be available at AU Online). • Notes: In this case, the MSI points to local copy of the DVD on the hard drive under AppImages. AdminImage can be local or server side; We will do this locally then copy it over later.

The Deployment Wizard cannot point to a local C:\ path; you must use a UNC name equivalent. Point this to \\\C$\, or alternatively \\127.0.0.1\C$\. ‘\\127.0.0.1’ is the TCP/IP name resolution for the local PC. "C$" is an administrative share for the local C:\ drive available to local administrators only. 03 Create or Modify a Deployment • Create a Deployment called "Default"

14 Advanced Architectural Desktop Installation Secrets

04 Write to a Log • Create network and client logs, at \Log. This is useful for troubleshooting installation problems and to verify installation success. 05 Select Installation Type • Select Standalone Installation (Network Installations are not covered in this class) 06 Client Installation Location • Accept the default, C:\Program Files\Autodesk Architectural Desktop 2007. • Clients will run in silent mode (checked). • Note: There’s really no good reason to modify the base installation folder; you’ll rarely ever need to visit this for anything (unlike the old days). 07 Client Setup Type • Custom 08 Select Features • This is the only customization we will do to this deployment. • Select all components to install; CAD Manager preference as required by your company. 09 Content and Support File Configuration • Accept defaults, but note the default paths. • Some paths point to and are meant for that user only. • Some paths point to and are meant to be shared among all users on that PC. (This is the “Corporate” scope shared ADT content we will deal with later.) • Default Paths:

Group Name Mode Points to Which is actually Menus Default \Support %AppData%\Autodesk\ADT 2007\enu\support Plotters Default \Plotters %AllUsersProfile%\Autodesk\ADT 2007\enu\Plotters Plot Styles Default \Plot Styles %AllUsersProfile%\Autodesk\ADT 2007\enu\Plot Styles AEC Styles/DC Default %AllUsersProfile%\Autodesk\ADT 2007\enu Content Tool Catalogs Default \Tool Catalogs %AllUsersProfile%\Autodesk\ADT 2007\enu\Tool Catalogs Templates Default \Template %AllUsersProfile%\Autodesk\ADT 2007\enu\Template Layer Standards Default \Layers %AllUsersProfile%\Autodesk\ADT 2007\enu\Layers Drawings Textures Default \Textures %AllUsersProfile%\Autodesk\ADT 2007\enu\Textures AEC Details Default \Details %AllUsersProfile%\Autodesk\ADT 2007\enu\Details

ADT Tutorials Default \Tutorials %ProgramFiles%\Autodesk Architectural Desktop 2007\Tutorials

10 Profile Configuration • Accept defaults. • Check the "Create AutoCAD Profile and display a shortcut on client desktops" if desired (not demonstrated here). 11 Search Paths and File Locations • Use Application Defaults. • Hit "Modify Defaults" to examine default paths and settings.

15 Advanced Architectural Desktop Installation Secrets

12 Specify Settings Leave all of these settings alone. Note: Some of these "defaults" are WRONG: They differ from what appears in the default “Architectural Desktop – Imperial” profile (under Options, Files tab) as follows: • Support File Path: Note that the Deployment Wizard (DW) does not include \Layers in the support path as is in the actual installed condition. • Customization File > Main Customization File: DW: \Support\ACAD Actual: \Support\ADT DW: Does not include the option path for custom icons used in CUIs • Printer Support File Path: DW: Points to Actual: Points to • Template Settings: DW: Points to Actual: All templates are placed in Note: Even if you specify a CTB set of templates, you will still probably get the STB set instead in the default profile. • Tool Palettes File Locations: DW: \Support\ToolPalette Actual: \Support\WorkspaceCatalog (Imperial) Note: This is probably a holdover from AutoCAD. The potential problem here is that if you modify any one of these settings, the Deployment reads the results from the complete dialog box set of settings, and you may end up with the wrong CUI or things installed in incorrect folders. 13 Install Additional Files Accept the defaults for any following dialog boxes unless otherwise noted. 14 Serial Number 15 Personal Information 16 Live Update 17 Customer Error Reporting • Don't include machine name in error report (unnecessary) • Decide whether to allow users to receive notifications (not recommended, but CAD Manager's option) 18 Disable DC Online • CAD Manager option; may be disabled later; possible resource hog 19 Subscription Center Access • Allow (CAD Manager option) 20 Register Today 21 Setup Confirmation 22 Validating Deployment progress

16 Advanced Architectural Desktop Installation Secrets

7 Modifying the Default Deployment

Overview Once created, we can now modify the Default.INI file to adjust what components are installed by the Default Deployment. We can update components, such as the DWF Viewer, and have the Deployment install that update. In addition, we can include external software to be installed at the same time.

Notes on Modifying Deployments Outside of the Deployment Wizard • All edits are made to the .ini file (e.g., “Default.ini”) • Back up your initial .INI file before making any edits! • Leave the MST alone (you can't change it outside of the Deployment Wizard anyway) • You can comment out lines or portions of lines from being carried out using the ';'. This is helpful in testing the installation of a single program. You can also use ;...; to comment out a portion of a line • The first section [SETUP] drives the installation process • Applications to be installed are defined by this line: SETUP_PRODUCT_NAMES=MSI DOTNET DOTNETLANG DIRECTX MDAC VIEWER FLASH ADT SP1 • Applications on this line are listed in order of installation • Each of these Product Names refers to a separate section seen below. • Each successive section in brackets indicates a program to install with their own installation parameters. • Other applications which use the MSI installer technology uses this type of .INI file

Add DWF Viewer 7 to the Deployment The original DWF Viewer supplied with ADT 2007 is 6.5. We’ll change this to 7.0. 1. Copy the new Version 7 "DWFViewerSetup.msi" file to \\Support\aev folder 2. Delete the existing .exe file (which is version 6.5) 3. Open \AdminImage\default.ini in Notepad or other text editor 4. Go to the [VIEWER] section: [VIEWER] PRODUCT_NAME=Autodesk DWF Viewer INSTALL_CMD=support\aev\DWFViewerSetup.exe INSTALL_CMD_ARGS=/u2 /q2 /b0 INSTALL_IGNORE_FAILURE=YES

And change it to this: [VIEWER] PRODUCT_NAME=Autodesk DWF Viewer INSTALL_CMD=support\aev\DWFViewerSetup.msi INSTALL_CMD_ARGS=/quiet /passive INSTALL_IGNORE_FAILURE=YES This sets up the installer to install the DWF 7 Viewer silently.

Add DWGTrueConvert utility to the Deployment 5. Expand the compressed downloaded .exe to AdminImage\Support\DWGTrueConvert

17 Advanced Architectural Desktop Installation Secrets

6. Remove files from the CDROM1 folder (put all files at root of DWGTrueConvert) 7. Examine the AdminImage\Support\dwgtrueconvert\setup.ini file. Note the structure and syntax is the same as in our Deployment default.ini 8. In the Default.ini file, [SETUP] section, change this line: SETUP_PRODUCT_NAMES=MSI DOTNET DOTNETLANG DIRECTX MDAC VIEWER FLASH ADT SP1 to SETUP_PRODUCT_NAMES=MSI DOTNET DOTNETLANG DIRECTX MDAC VIEWER FLASH ADT SP1 DWGTRUECONVERT 9. Add this to the end of the .ini file (copy/paste from the setup.ini and edit as follows): [DWGTRUECONVERT] PRODUCT_NAME=DWG TrueConvert™ 2007 INSTALL_ROLLBACKABLE=YES INSTALL_CMD=support\dwgtrueconvert\DWGTrueConvert.msi INSTALL_CMD_ARGS=/quiet /passive /L*v "%temp%\DWGTrueConvert Install.log" INSTALL_UNDO_CMD=DWGTrueConvert.msi INSTALL_UNDO_CMD_ARGS=/qb! INSTALL_HIDE_WRAPPER_UI=YES 10. Note: Make sure there is a line space between this and the section above

Add DWF Viewer Service Pack 1 to the Deployment 1. Copy "DWFViewer7_SP1.exe" to the \\Support\aev folder 2. In the Default.ini, [SETUP] section, add DWFSP1 to the SETUP_PRODUCT_NAMES line, e.g.: SETUP_PRODUCT_NAMES=MSI DOTNET DOTNETLANG DIRECTX MDAC VIEWER FLASH ADT SP1 DWGTRUECONVERT DWFSP1 3. Add this to the end of the .ini file: [DWFSP1] PRODUCT_NAME=DWF Viewer 7 Service Pack 1 INSTALL_CMD=support\aev\DWFViewer7_SP1.exe INSTALL_CMD_ARGS=/s/v/qn

Fix the path reference to ADT 2007 Service Pack 1 1. Modify the ADT Service Pack 1 entry to make it relative to the AdminImage folder. Verify that the adt2007swlsp1enu.msp file is located at the root of the AdminImage folder. It should have been placed there by the Deployment creation process. 2. Modify the SP1 section as follows (using ';' to comment out the original lines): [SP1] PRODUCT_NAME=Service Pack ;; Deployment Wizard puts the SP1 at the hard coded location ;; INSTALL_CMD=\\DELLM60\C$\ADT 2007 Install\AdminImage\adt2007swlsp1enu.msp ;; This line makes it relative to \AdminImage INSTALL_CMD=adt2007swlsp1enu.msp INSTALL_CMD_ARGS=/qb!-

18 Advanced Architectural Desktop Installation Secrets

8 Installing the Default Deployment

1. Log in as dummy user 'Zaphod' with local admin rights. 2. In Windows Explorer, navigate to the \\Log folder and keep it open during installation. 3. Open the \ADT 2007 Install folder in a second Explorer window. 4. Double-click on the "Default" shortcut to install the "Default" ADT 2007 Deployment. 5. After installation (success or fail), review the \\Log\Default.log to check for any installation problems. 6. Check Add/Remove Programs to ensure that DWF Viewer 7 and DWGTrueConvert were installed. 7. Fire up ADT and look around. Always confirm you can install a basic, no frills ADT installation using a Default Deployment before proceeding further, to isolate any problems early. You need to make sure you have this working before proceeding further.

Reasons for Deployment Failures The reasons why a particular Deployment fails to install completely can be anywhere from patently obvious to absolutely madding to figure out. Errors in Deployments almost always point to a problem in the execution of the msiexec.EXE program, which controls all Windows software installations. Some tips to help ensure great success are: 1. Make sure any drives referenced in the Deployment are mapped correctly. 2. Examine the installation log files. Look for a 4-digit error code in the Log files to search for msiexec error codes. Google “msiexec error ####” as a starting point. 3. Examine the .ini file and ensure all paths to all applications are correct. If there are any relative paths they should be from the root. 4. For each application, study the command arguments which are passed through the msiexec program. You can usually find these by issuing ‘ /?’ at the command prompt. 5. One thing I found out is that Deployments can fail if any network drives that they refer to (as configured inside the Deployment Wizard, e.g. in the “Specify Settings” or “Content and Support File Configuration” dialogs) are set using the SUBST command instead of a NET USE command. For a Default Deployment, you should not be referring to any network drives, but in the case of your Corporate Deployment this may become an issue.

19 Advanced Architectural Desktop Installation Secrets

9 Corporate ADT Customization Strategies

Overview This section covers some key CAD and customization management strategies which dovetail into the ADT Deployment process to create a robust Corporate Deployment and installation process. Our goal here is to design a server-side Corporate customization structure which will serve all users and aid in future Deployment development. While we won’t cover the specifics of the Customization system shown here, this section is provided to serve as an example for incorporating back-end customization into our Corporate Deployment. You can use this information as a springboard to gather ideas for your organization.

General Information At this point, the Default Deployment has been created and installed on your test PC. Now we can design and develop a server-side structure for holding resources we will make available across the company. For demonstration purposes we will use a standardized network drive letter, J:\, for all users to find our central corporate Customization, regardless of server or office. For developing customization on a local computer (before being copied it to a server), connect the drive letter to a local folder resource instead of a server using the ‘net use’ commands as follows. Server example: net use J: "\\ServerName\cad support 2007" Local example: net use J: "\\127.0.0.1\c$\cad support 2007" Tip: Don’t use the SUBST command for this (e.g. SUBST J “C:\Cad Support 2007”), because of technical issues with Deployment installations. Refer to the Microsoft KB article at http://support.microsoft.com/kb/888019.

Organization of Server-Side Resources There are three main categories of ADT-related data that you will centralize on your server(s): Corporate customization and content • VisualLISP programming / VBA utilities / 3rd party apps • Corporate Content: Block libraries, AEC Styles, Layer Standards, CAD Standards Files, etc. • Corporate Tool Catalogs which contain palettes of tools that reference Corporate content • Enterprise / Corporate CUIs • Standard SHX fonts (TTF fonts must be installed on each machine) • Plotters/PMP files • Plot Styles • Templates • CAD Manual / Online help ADT Content • Out of the box content that is shared between all users (Styles, AEC Content, etc.) • Much of this content may be copied to the Corporate customization folders and modified, e.g. Templates, Plot Styles, using the OOTB content as a strong starting point. User Customization • RoamableRootFolder: All support files which are completely under the User's domain, which is by default located locally at %AppData%\Autodesk\ADT 2007\enu. We will later copy this to the server and make the required changes to make it work from there. This includes the User’s ADT Profile, CUI, VisualLISP/VBA programs, and so on. • User Tool Catalog(s) which will be available in the user’s Tool Catalog Library.

20 Advanced Architectural Desktop Installation Secrets

Existing Customization Migration Strategies Most offices that have been using ADT for any length off time already have a set of server-side resources set up for holding common, shared content and other files. Upgrading to ADT 2007 usually means migrating this stuff forward to the new release. However, the Deployment development process takes time, so you need to have time to test your customization in the new release before you inflict ADT 2007 on your users. You will need to have a strategy in place to keep existing users on previous releases happy and functional until the big day. Start by creating a new server share with an empty set of folders for holding your Corporate ADT 2007 customization. This will develop into a parallel branch of your existing customization for ADT 2007. Example: \\ServerName\CAD Support 2007\. If developing on a local system, you can create it there, e.g., at C:\CAD Support 2007\, then copy it to the server at deployment time. An example file structure for storing your Corporate customization will be shown later for discussion purposes. Map a drive letter (J:\) to this share, as discussed above. Leave any of your existing ADT customization alone. All further development from here on must not affect anyone still using 2006, so it’s a good idea to just freeze all further ADT 200x development and work on ADT 2007 only. After the Corporate Deployment is created and installed for testing, start copying over small parts of your existing customization to this new folder tree, e.g. Plotters, Plot Styles, VisualLISP routines, catalogs, and so on. Test and certify things bit by bit until everything is good to go. Update / streamline your existing code base. This is a great time to rethink some programming and customization strategies, drop legacy things that aren't needed, and develop new things. If you have a Corporate CUI (in addition to the ADT CUIs), create a new blank Corporate CUI, and transfer only needed things from the previous Corporate CUI. This should cut down on the bloat that usually happens with CUI files. Copy over your existing set of Content, such as AEC Styles, Dynamic Block libraries, and so on. Due to the nature of the under-the-hood changes made to ADT 2007, it is a good idea to go into the central Styles drawings that store your AEC Styles and test how they work in 2007. It may even be advisable to recreate your styles from scratch in 2007 for the best possible compatibility moving forward.

Version Specific Items Knowing what can be brought forward unchanged from previous releases is very important in your overall strategy. Version specific things ADT 2007 OOTB content ADT 2007 CUIs In-house VLisp/VBA programming (Must be fully tested for each release) Existing block libraries can be reused but may be resaved in the new dwg format DWG files which house corporate AEC styles; Save and retest under 2007 What is probably not version specific? Existing Plot Style tables (.CTB, .STB) Existing Plotter Configuration files (.PC3/.PMP) if using System Printer drivers SHX/TTF Fonts Corporate Tool Catalogs User's Tool Catalogs

21 Advanced Architectural Desktop Installation Secrets

Develop a Centralized Tool Catalog Strategy Content Browser and Catalog Library Basics • Each user has their own personal Tool Catalog Library (TCL). Its default physical location is \Autodesk\My Content Browser Library\contentbrowserlibrary50.cbl. This location is unchangeable (as far as I know) and is version specific (ADT 2006’s TCL was named contentbrowserlibrary47.cbl) • The Tool Catalog Library provides pointers to Tool Catalogs which are stored elsewhere. It does not contain the Catalogs or the data they contain themselves. The OOTB Tool Catalog Library points to several premade Tool Catalogs which are installed by ADT. • Upon installation, each user’s Tool Catalog Library also includes a starter empty "My Tool Catalog" catalog, which resides at \Autodesk\My Content Browser Library\MyToolCatalog.atc by default. User Tool Palettes • Users will normally create their own set of tools and organize them into palettes. These are not part of the Corporate domain. • Users can (and should) publish their palettes/tools to their own personal Tool Catalog. However, instead of having this Catalog stored locally, under My Documents, it will live on a server, at or near the user’s server-side RoamableRootFolder, for portability. The primary concept here is that any user-specific ADT data is not held locally, but is stored and accessed on the server. If this Catalog is on the server, it makes it easy to copy palettes and their tools from one machine to another and forward to new releases. If it is held locally, it could be lost forever if the hard drive eats it, or the person moves to another machine (and does not have a RoamableRootFolder on the server). Develop Corporate Content, Tool Catalogs and Palettes 1. Create a central folder structure for holding Corporate Content and Tool Catalogs. Examples will be shown later in this section. 2. Develop your company’s standard content in these Content folders. This content is in addition to the stock AEC Content that comes with ADT that will also be on the server. This is your Corporate content, which will be carried forward to new releases. 3. As part of this process you will create drawings which will serve as libraries for your global content. Such drawings can contain Blocks, Details, Layers, AEC Styles, and a whole host of AEC data types which can be imported into your working drawings. 4. During development, create Tools for your content, organize them into Tool Palettes, and organize your Palettes into Groups in your personal development Workspace. Create these Groups as you want your users to see them in their Workspaces. 5. In Content Browser, create a series of Corporate Tool Catalogs which also are held in your Corporate CAD Customization folder tree. 6. In your Catalog(s), create Categories for content which mirror the Tool Palette Groups you created. When dragged from the Content Browser into a Workspace, these Categories become Palette Groups again. 7. Drag and drop Tool Palettes from your Workspace Groups into your Corporate Tool Catalogs’ Categories in the Content Browser. For example, if you have created a Group called “Corporate Wall Styles” which contain two Palettes for Residential and Commercial Wall Styles, create a Category in your Catalog which is also called “Corporate Wall Styles,” and drag those two palettes to that Category. 8. Make sure these Corporate catalogs can update on the users' PCs when changes are made. Check the properties of the catalogs to say "Link items when added to workspace"

22 Advanced Architectural Desktop Installation Secrets

9. For each Corporate Catalog you create, export Registry (.REG) files which will later add links to these Catalogs to a user’s Catalog Library. Hold +Right Click on your Corporate Tool Catalog(s) and select "Convert to Registry File" from the context menu to export this .REG file. 10. These .REG files will be used during the installation procedure to import links to these Catalogs into each user’s Content Browser Library. Save these .REG files to a central location in your deployment tree, e.g. \Install\.

Workspaces and Tool Palettes Workspace Basics Autodesk confusingly uses the word ‘Workspace’ in two separate but distinct contexts. It first generically terms the entire state of the User Interface (the display of your menus, toolbars, palettes and so on) as “The Workspace.” The second context is more specific, as a Named Object in a CUI file which is part of your UI environment. Although these two things sound like they might deal with the same thing, they are in fact very different. Named Workspaces stored inside CUIs are meant to store the configuration of your various menus, toolbars, and dockable windows (including all palettes) in an ostensibly “task specific” state. You may have several Workspaces, one each for doing 2D plans, 3D modeling, documentation, and so on. The idea is that you can bind up a particular UI configuration to better support these individual tasks. How well you can use this feature is up to you, as it varies from one person to another (in my experience, people usually just do all of their work in a single Workspace and enable/disable UI elements as required). From a CAD Manager’s perspective, this is important in 2007 because there are four new Workspaces (Design, Document, Detailing and Visualization) in the default ADT CUI. Of course, your users will assuredly start poking around in these Workspaces to see what they do. If you have a Corporate CUI added to your system which includes your custom menus and toolbars, you will need to account for this, or they will disappear when a user selects a different Workspace, leading to yet another support phone call to you. Another solution would be to create a Corporate Workspace in your Corporate CUI, and make a default ‘User’ Workspace during development that uses this. We will do this later, in Section 15. The difference between a CUI Workspace and “The Workspace” as it refers to the entire UI is differentiated mainly in how they deal with Tool Palettes. A CUI Workspace does not really take Palettes into account; it simply lists them under a generic “Dockable Windows” node and allows you to set the default palette which will be displayed, where they display, dockable status, etc. However, a user’s current environment Workspace does in fact include Tool Palettes in more exacting detail: your Tool Palettes’ contents, their properties, what Tool Palette groups you have, are they linked to a central location, what image appears for each tool, and so on. This is important mainly in where ADT stores this information. CUI Workspaces are defined in the CUI files themselves. You have editable Workspaces available in your Main CUI; as you customize your Workspace in the CUI editor you make changes to these CUI files. Tool Palettes Basics Tool Palettes are each defined in separate ‘.ATC’ files (one per Palette) and are stored in the location defined by the User Profile’s Files>Tool Palettes File Locations setting. By default, at \support\WorkspaceCatalog (Imperial). There is a subfolder for Palettes, and a Palettes\Image subfolder for their images PNG files. As such, each user has their own individual set of Tool Palettes separate from every other user. If a Palette is “linked” from a Catalog to the Workspace, the ‘master’ Palette’s .atc file is stored where the Catalog is stored (on the server, usually), and then it and its images are copied to the Tool Palettes File Locations folder when it is refreshed by the user. It is important to understand that all Palettes are always held locally; they never reference to server locations, but are copied to the local PC when refreshed.

23 Advanced Architectural Desktop Installation Secrets

However, sometimes the images don’t quite make it, and the Palette shows a blank white box instead of the tool image (this was a real problem under ADT 2006). This can be solved easily by manually copying the entire \Images folder from the server to your Palettes\Images folder. This is often faster than manually refreshing each and every Tool Palette, especially if you have a lot of palettes that need updating. Tool Palette Groups and User Profiles Your Tool Palette Groups – which defines how your palettes are organized in your user interface – are pretty important. A lot of work goes into organizing the numerous amount of palettes in any particular Workspace. Groups are defined in a special file at \Support\ Profiles\\profiles.aws. This file is updated each and every time you gracefully exit ADT. If you’ve ever had your Palette Groups mysteriously disappear, it is often because the write process was interrupted on exit – which can happen for any number of reasons. When ADT is re- launched, if that profile.aws file is corrupted or not present, ADT will dutifully create a new one. Unfortunately, there is no backup process for AWS files, so it builds a new one based on the Palettes you have in your Tool Palettes File Locations storage folder, but sans Palette Groups. The moral of the story here is simple: once you get your palettes and groups defined just the way you like them, back up your profiles.aws file. This is actually easily done through the Profiles tab in the Options dialog box in several ways. First, you can export your user profile to an .ARG file. As part of the export process, ADT tags on the contents of profiles.aws (and FixedProfile.aws) to the end of the file. Thus, if your groups mysteriously disappear and your .ARG profile is up to date, you can restore it by restoring your profile. Second, you can back up your profile by simply hitting the “Add to List” button in the Profiles tab with your “good” User Profile set current. This copies your current User Profile to a new name and also creates a new \profiles.aws file. If you hose your Palette Groups, you can simply copy the \profiles.aws file to your Profiles\folders and all will be good. Third, if you write VBA/VLisp applications for your users, code that backs up your current User Profile to an ARG file is pretty easy and should be part of your programming catalog. Note that you cannot restore an AWS file programmatically (while ADT is active), because there is no facility to re-reading an AWS file to update the current Workspace and ADT writes a new AWS file on exit. The best you can do is instruct your users how to restore AWS files manually outside of ADT. Initialize a Default User Workspace As part of your Corporate Deployment development and testing, while logged in under the ‘Zaphod’ dummy user, you will create a default initial user environment Workspace which includes all of the Tool Palettes - both ADT and any from your Corporate Tool Catalogs - that you want each user to be presented with when they first launch ADT. 1. After you have created your server-side Corporate Tool Catalogs and populated them with tools as per the previous section, delete any Palettes and Groups that you’ve created in your Workspace as part of the development process outlined above. Get back to the default ADT Groups of Design, Document and Detailing as a starting point. 2. I-Drop the Tool Categories from your Corporate Catalogs to create Groups in your prototypical Workspace. If you have many Categories/Groups to import, use CTRL to select multiple categories and I-Drop all of them to your Workspace in one shot. 3. Key concept: These palettes and groups will be copied along with the rest of the 'Zaphod' prototype template RoamableRootFolder as part of your final installation process, which will be automated through scripting (described later). Thus, everyone will start off with the same Tool Palette configuration.

24 Advanced Architectural Desktop Installation Secrets

Develop a RoamableRootFolder Strategy As mentioned previously, the RoamableRootFolder holds all user-centric ADT support files. Its default location is %AppData%\Autodesk\ADT 2007\enu (for English installations). These support files include: Tool Palettes and their images \profiles\\profile.aws (Tool Palette Groups) User's personal CUI CUI bitmap images Custom dictionary Acad.pgp Personal programming and customization (lsp/vba) It provides a convenient holding area for the user’s Profile (.arg file) when exported from ADT. It is possible to put the RoamableRootFolder on your server! Pros of leaving it local (at %AppData%\Autodesk\ADT 2007\enu): • Slightly better performance • It’s "Autodesk certified" Out of the Box (OOTB) behavior Cons of leaving it local: • There is a philosophy that states that all user customization is actually corporate data which is valuable. Lots of time and effort (= company money) goes into creating this data by individual users and it should be housed someplace safer than an individual’s PC. • Workstations are usually not backed up nightly; a dead HD drive can a user’s ADT settings and customization. • Problems with these files are often a primary reason to need to reinstall ADT, losing everything in the process. • It’s not able to easily automatically copy this to other PCs (termed “Roaming”). Copying this data from machine to machine to accommodate “manual” roaming is confusing, more overhead and prone to accidents. • It is not as easily managed as is a network source when something goes horribly wrong. Pros of storing it on a server: • User ADT data is now immune from dead PCs or HD corruption; it is backed up and protected. • As long as a user’s system is configured to point to this server location (as described later), combined with easy exporting and importing of .arg profile files, automatic “roaming” of an ADT user is transparent. • It can be copied to servers in other offices for even greater flexibility. • It is easily managed from a remote location. • You can keep a master “setup” RoamableRootFolder on a server and update it as necessary, and create new user RoamableRootFolders from it easily. Cons of moving it to a server: • It is somewhat harder to set up initially, but this becomes a non-issue with scripted installations, as described later. Section 13 of this document deals with creating a template RoamableRootFolder, and Section 17 deals with copying this folder for other users when installing ADT. Note: Dealing with the RoamableRootFolder in this manner is purely optional but will be followed through in the rest of the material.

25 Advanced Architectural Desktop Installation Secrets

Develop a Main / Enterprise CUI Architecture How you configure your CUIs is part and parcel of the installation development process. You want all users to be presented with the same CUI setup. Our prototypical setup for our Main and Enterprise CUIs is described here. Main CUI Configuration • The Main CUI is meant to act as the user’s personal CUI, as it is completely editable at all times. We will create a Main CUI and name it after the user, e.g. , 'Zaphod.cui' • It is located at the user's server-side RoamableRootFolder, at J:\users\\ADT 2007\support\.cui • There will be no partial CUIs to start with. However the user is free to make them later if desired. • During development of this template CUI, create a default Workspace also named after the username. Users can add their own Workspaces later if desired. Note: Workspaces can be used in a primary Enterprise CUI, but not any Partial Enterprise CUIs. Enterprise CUI Configuration • An Enterprise CUI is built on a set of primary CUI and partial CUIs: ADT.CUI ; Primary Enterprise CUI - bhh-t.cui ; Corporate CUI implemented as a Partial CUI - adtdesign.cui ; Default Partial CUIs under ADT.CUI - adtdocument.cui - adtcadmanager.cui - adt3dsolids.cui - acetmain.cui ; Express CUI (if installed) Using ADT as an Enterprise Primary CUI ADT.CUI includes ready-made Workspaces which can be used to create user-specific workspaces later. However, you cannot use a Workspace from any “Partial” Enterprise CUI, e.g. the BHH-T Corporate CUI. However, you can import Workspaces from any Partial CUI into your Main (user) CUI using the Transfer tab. BHH-T.CUI – Corporate CUI This CUI includes your Corporate toolbars, pulldown menus, shortcut menus, and so on. Depending on how much you customize ADT for your company, you may or may not have developed such Corporate UI elements. General CUI Handling and Organization • ADT’s OOTB CUIs are installed in the user’s RoamableRootFolder, and by default the ADT CUI will be our Main CUI. We will develop the Enterprise CUI configuration, as part of the development process, as our Main CUI (remember that Enterprise CUIs are locked up by design). We’ll later reconfigure it as an Enterprise CUI in the template User Profile. • We’ll use our Default and/or Corporate Deployments to gain access to the OOTB (Out Of The Box) CUI files. • All Enterprise (ADT + BHH-T) CUIs will be finally located at J:\BHH-T\CUI. • We’ll start the Main .CUI as a clean, empty file. We can migrate legacy user CUI elements using the CUI Transfer tab as part of the per-user installation procedure – or, better yet, provide instructions for doing this and leave it to the user. Just make their old CUIs available. In this manner they can transfer their personal toolbars, shortcut menus to their new CUI. If your users have their own CUIs from 2006, they can probably just reuse them unmodified; however, using the Transfer tab from the old CUI to the new will usually result in a cleaner CUI file.

26 Advanced Architectural Desktop Installation Secrets

Why not use ADT as the Main (User) CUI? The ADT CUI (and its partials) is ADT release-specific in terms of menus, commands, and features it contains. Configured as a Main CUI, it is completely editable by end users. Once you move to a new version of ADT, you necessarily get a new ADT.CUI, and a user would need to either transfer settings from the old CUI or lose them completely. Thus, we want to limit user-made changes to only the Main .CUI for ease of portability to new releases. That way, we can plug the User’s Main CUI on top of the Enterprise CUI which will come from the new release and keep that CUI from being edited. In this way, we are not editing ADT version specific files.

Develop a CAD Administrator Environment Part of your CAD system should include a CAD Administration customization set of data which is separate from your Corporate customization for mainstream post-installation development. We as CAD Managers need a way to ensure that we have the freedom to innovate and create new customizations for our users, but without torpedoing said users in the process. The way we do this is to separate our always-in-development CAD Administrator’s set of customization files – e.g., VisualLISP/VBA programming source code - from the mainstream, tested and stable Corporate Standard customization system that your normal users access. For discussion, we will refer to the Corporate side as "BHH-T," and the Admin side as "Admin." The Admin side has the following features: • Admin stuff is always in development, and used daily by the CAD Manager (you). The CAD Manager's profile points to these Admin folders in Options > Support Files path. • It includes source code to lsp/vba files, secured away from user access. • It has a customizable version of your Enterprise CUIs (when configured in a profile as a Main CUI). • Once your source code and customization is tested, it can be compiled and copied to the Corporate customization folders when complete.

27 Advanced Architectural Desktop Installation Secrets

Resultant Sample Corporate Customization Folder Layout: Based on of all of the things mentioned in this section, a sample server-side Corporate Customization set of folders would look something like this:

28 Advanced Architectural Desktop Installation Secrets

Folder Notes General This folder tree is ADT 2007 specific; any changes here would not affect current ADT 2006(-) users because their central customization is held in a different share on the server. This way we can freely develop here without affecting anyone else. \Admin This is the CAD Admin root folder for your development set of customization. The CAD Manager's (your) user profile points to these folders instead of J:\BHH-T folders. Stuff is tested, compiled, and copied to same folder under the J:\BHH-T tree; thus, trashing something here won't affect a normal user. \BHH-T This is the root folder for all corporate customization used by normal users. Its subfolders may be made read-only to all users except CAD Managers \Admin\Bin Root for your CAD Admin customization files (i.e., stuff that is not content) \BHH-T\Bin Root for Corporate customization files (not Content) \Bin\Apps Compiled VLXs, LSP routines, and/or 3rd party plugins \Bin\CUI Holds Enterprise CUI + Partials (ADT, BHH-T, ACAD, EXPRESS) \Bin\Resources Additional support resource files used by customization. Includes shared custom hatch patterns \Bin\VL Projects Holds VL Project (.prj) files used to compile corporate LSP files to VLXs. CAD Admin access only. \Bin\Sourcecode LSP / DCL /VBA source files. CAD Admin access only. \ADT 2007 Folders for OOTB shared ADT content created by the Deployment Wizard. Referenced by Tool Palettes vis-à-vis the Deployment. Created by the DW, but some stuff is often copied to the Corporate BHH-T folder for customization, such as Plotters, Templates, and so on. \Users\ The folder tree that stores all user-specific files, for all users. \ADT 2007 is the RoamableRootFolder for that particular user. We will be developing ‘J:\Users\Zaphod\ADT 2007’ as the template prototypical folder which will be used to create all other users’ folders. You can create a \ADT 200x folder holds any 2006 (or previous) user customization (e.g. CUI and associated BMP files) which will want to be transferred over. You will need to decide which files (if any) will need migration at installation time.

29 Advanced Architectural Desktop Installation Secrets

10 Hacking ADT DLLs for Fun and Profit

(Well, maybe not so much on the profit part, but still a rockin’ good time)

Overview Often times when using ADT (or any other program, for that matter) it will be the little things that drive you nuts. In particular, one of the biggest annoyances are too-tiny dialog boxes that were designed for a least-common denominator screen resolution of 800x600. Of course, no one has run with a screen resolution of 800x600 since, oh, 1994 or so. In the case of ADT, the biggest offender of this is the Options dialog box, which is made worse by the large number of tabs that populate it. Additionally, the Options dialog has this weird design quirk that allows only some dialog components (called Controls) to stretch along with the outer window, e.g. the Files Tab's tree view. However, the treeview controls in other tabs such as AEC Project Defaults does not, which is annoying because the contents of those controls is usually a very long file path which is simply too long to use comfortably due to all of the scrolling involved. But luckily we can change this, through a technique called Resource Hacking. In modern programs, most of the resources that make up dialog boxes and other UI elements are held in .exe (executable) or .dll (dynamic link library) files. Resources in these files dictate the size and spacing and often the behavior of these controls. Fortunately, these can be altered to more suit our liking. Obligatory Safety Warning: Resource Hacking can be a fun exercise and, when done correctly, can greatly enhance the productivity of your application. However, with great power comes great responsibility; you CAN royally screw things up VERY easily. To ensure your safety, you must follow these simple rules:

1. Always back up the files you are altering, in a location nowhere close to the source. 2. Repeat Rule #1. 3. This stuff isn’t sanctioned by Autodesk, so making a support call due to a borked dialog box is probably not going to get you very far, outside of a suggestion to completely reinstall ADT. 4. If you mention my name in regards to the aforementioned borked dialog box, I will deny any and all knowledge.

Preparation At this point we have a Default Deployment installed on our test machine. We can modify some of these DLLs, then copy these out so we can install them later when we install our Corporate Deployment and our final installation. To make the recommended changes as described below, copy the following DLLs from the Installation Folder to \Admin\_DLL Originals subfolder, for safekeeping: acadres.dll AcTcUiRes.dll AecDcArch50enu.dll AecProject50enu.dll Next. download and install the "Reshack" program, available at http://www.angusj.com/resourcehacker/ There are other Resource Hackers out there that may offer more features, such as being able to search for resources across multiple DLLs. I know this one is fairly simple to use, and will demonstrate it in class. I have no affiliation with anyone involved in making this program.

30 Advanced Architectural Desktop Installation Secrets

Using ResHacker for Basic Dialog Box Editing ResHacker is a freeware little program that will open a DLL resource file, display all of the resources that the DLL provides, allow you to edit those resources, and compile the resource script back into the DLL which can be used by the program. In ResHacker, resources are categorized in a tree view by type: Registry, Cursor, Bitmap, Icon, Menu, Dialog, and so on. Inside of each resource type are numbered parts which correspond to some program element (dialog box) which can be altered to suit. In general, to edit a particular Dialog box, you perform the following steps: • Back up a copy of the original files to a safe place. This really cannot be stressed enough. • Open the EXE or DLL file in the program's installation folder in ResHacker. Note: You cannot edit and save DLL resources while ADT is running. In ADT you will only be editing DLL files. • You can open the tree view of Dialog Boxes and view the dialog resources, listed by an ID number. If the program is small, it will be easy to find. However, in ADT, you have zillions of dialog boxes, in zillions of resource DLLs. • If you don't know the number ID of a particular Dialog, you can find it by performing a search on a textual element of a control inside the dialog box. It helps to fire up the dialog box in ADT to look for something to search by, otherwise you would be in for a long day indeed. • Hit the "Show Dialog" button to display the dialog box as it is. • The right-hand pane shows the properties of each control in the dialog box. You can edit these values directly to change the width, height, and/or location of the controls in the dialog; use the Compile Script button to see the changes go into effect. In the Dialog Box itself, you can click on the control, and in the right hand pane, the control will highlight with a red dot. • You edit the dimensions of the controls in two ways. You can drag the handles of the dialog itself and its controls to move and resize them directly. You can use the arrow keys to move controls in strict X/Y directions one pixel at a time. Note that the coordinates and width/height parameters will change as you make the graphical edits. • You can also edit the width, height and location of the controls in the right hand pane as well. Notice what values change in the control's parameters. Most controls list 4 numbers, which are the X and Y position of the upper left corner, and the width and height of the control, respectively. • NOTE: There is no UNDO for control edits; if you mess something up you will need to reload the DLL without saving. • When satisfied with your edits, hit the Compile Script button to show the changes to the visible dialog. • File > Save to save the changes to the DLL file. • Check the results in ADT by firing up the particular dialog box. Close ADT. • Repeat the above steps to fine tune things if needed.

31 Advanced Architectural Desktop Installation Secrets

Problem Dialogs in ADT Options > AEC Project Defaults:

Egads. As you can see, the treeview control which holds the listings for the paths is WAY too small. What’s worse is that as you enlarge the Options dialog box, the control does not grow to fit – you’ll always need to use the scroll bars.

32 Advanced Architectural Desktop Installation Secrets

This is what can be improved via Resource Hacking:

Much better. We'll enlarge the whole dialog to make it easy to use without scrolling. Other specific dialogs we will fix in this section: Options > AEC Content We’ll lengthen the Edit boxes to show the complete paths for DesignCenter Content and Tool Catalog Root Path Tool Palettes > Customize The dialog is simply too small to be usable with all of the palettes and groups that can be housed here.

33 Advanced Architectural Desktop Installation Secrets

Specific Helpful Dialog Box Modifications Options > AEC Project Defaults Resource File to edit: AecProject50enu.dll Dialog Resource : 24398 : AEC Project Defaults Modification Description : Increase the size of dialog box and tree control to show expanded tree and all default paths at one time The new dialog box data is given below (note: watch for Word Wrap):

24398 DIALOGEX 0, 0, 600, 380 STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD CAPTION "" LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US FONT 8, "MS Shell Dlg" { CONTROL "&Select paths, file names and file locations:", 24813, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 7, 7, 285, 10 CONTROL "Tree1", 24778, "SysTreeView32", TVS_HASBUTTONS | TVS_LINESATROOT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 19, 486, 259 , 0x00020000 CONTROL "&Browse...", 24776, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 510, 19, 72, 14 CONTROL "A&dd...", 24775, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 510, 40, 72, 14 CONTROL "&Remove", 24777, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 510, 61, 72, 14 CONTROL "Static", 24809, STATIC, SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE | WS_GROUP, 7, 298, 285, 31 CONTROL "Show &Project Browser at startup", 24799, BUTTON, BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 280, 139, 14 CONTROL "New Sheet Set Template:", 30000, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 14, 351, 82, 8 CONTROL "Create", 30001, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 193, 348, 50, 14 CONTROL "Sheet Set Template", 30032, BUTTON, BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 7, 335, 285, 37 }

Options > AEC Content Resource File to Edit : AecDcArch50enu.dll Dialog Resource : 19209 : AEC Design Center Content Modification : Increase length of edit boxes to show complete default paths for AEC DesignCenter Content Path and Tool Catalog Root Path.

19209 DIALOGEX 0, 0, 515, 142 STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD CAPTION "" LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US FONT 8, "MS Shell Dlg" { CONTROL "AEC DesignCenter Content &Path:", 19288, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 7, 7, 220, 8 CONTROL "", 19207, EDIT, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 7, 19, 436, 14 CONTROL "&Browse...", 19200, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 452, 19, 54, 14 CONTROL "&Display Edit Property Data Dialog During Tag Insertion", 19202, BUTTON, BS_AUTOCHECKBOX | BS_LEFT | BS_TOP | BS_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 7, 39, 220, 12 CONTROL "&Tool Catalog Content Root Path:", 19321, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 7, 55, 220, 8 CONTROL "", 19323, EDIT, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 7, 67, 436, 14 CONTROL "&Browse...", 19322, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 452, 67, 54, 14

34 Advanced Architectural Desktop Installation Secrets

CONTROL "Detail Component Databases:", 19317, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 7, 91, 121, 13 CONTROL "Add/Remove...", 19318, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 145, 89, 68, 15 CONTROL "Keynote Databases:", 19319, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 7, 111, 107, 13 CONTROL "Add/Remove...", 19320, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 145, 109, 68, 15 }

35 Advanced Architectural Desktop Installation Secrets

Container for Customize Tool Palettes Dialog Box Resource File to Edit : Acadres.dll UI Element : Container for Tool Palettes Customize UI Dialog Resource : 5549 : Customize Modification : Increased width and height to allow child dialog to show all palettes (see AcTcUiRes:Dialog:139)

5549 DIALOGEX 0, 0, 374, 411 STYLE DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_CONTEXTHELP | WS_EX_CONTROLPARENT CAPTION "Customize" LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US FONT 8, "Microsoft Sans Serif" { CONTROL "&Close", 5516, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 250, 380, 50, 15 CONTROL "&Help", -7866, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 310, 380, 50, 15 CONTROL "Tab1", 1537, "SysTabControl32", TCS_TABS | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 5, 360, 366 }

Customize Tool Palettes Dialog Box Resource File to Edit : AcTcUiRes.dll UI Element : Tool Palettes Customize Dialog Resource : 139 : Tool Palette and Groups list Modification : Increase height of dialog to list more groups and contents

139 DIALOGEX 0, 0, 374, 411 STYLE DS_CONTEXTHELP | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT CAPTION "" LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US FONT 8, "MS Shell Dlg" { CONTROL "&Palettes:", 1047, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 0, 5, 96, 10 CONTROL "", 1063, "SysTreeView32", TVS_HASBUTTONS | TVS_EDITLABELS | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 0, 15, 175, 378 CONTROL "Palette &Groups:", 1066, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 190, 5, 145, 10 CONTROL "", 1062, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 190, 15, 175, 378 CONTROL "Current Palette Group:", 1064, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 0, 400, 85, 10 CONTROL "", 1065, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 94, 400, 206, 10 }

Incorporating DLL hacks into your Deployment Because the Deployment Wizard will not allow you to replace program files, we will need to create a batch file which will copy the DLLs over from the Deployment source location to the Installation folder, after the Deployment has been installed. Because we are wrapping the Deployment launch in a batch file to begin with, we can include this as part of the process. Refer to Section 17, Creating Installation Batch Files, for more information. Once you have your modified DLL files perfected, copy these modified versions to your Deployment folder, e.g. \Admin\_Modified DLLs. Remember that you must have your default DLLs backed up as well (we used

36 Advanced Architectural Desktop Installation Secrets

11 Creating Your Corporate Deployment

Corporate Deployment Basics In this section we will create a customized Deployment for installing ADT to our workstations. Our Corporate Deployment Name shall be BHH-T (you would substitute your own corporate name). This is the same process as creating the Default Deployment, but we are going to change certain settings to point to our Corporate folder tree on the J:\ drive which holds our centralized ADT content and all corporate customization. This by design also creates a customized version of "Architectural Desktop - Imperial" profile from which we can further modify to create a default template User Profile. The Corporate Deployment created is only able to do a few things, because it is limited by what the Deployment Wizard allows. As much as the Deployment Wizard includes the facility to set settings which would otherwise need to be done post-installation, these options are severely limited. Secondly, and unfortunately, some of the settings which can be explicitly set in the Deployment Wizard do not actually make it to the default “Architectural Desktop – Imperial” user profile. As limited as it is, this Corporate Deployment serves a couple of important purposes: First, as we are configuring it, it copies all ADT’s Out of the Box (OOTB) content to a server location, specifically at J:\ADT 2007\ as part of the Deployment creation process. Secondly, when ADT is installed it creates Catalogs and Palettes for users which point to the server locations for this content.

Initial Corporate Customization Considerations After this Deployment is created (and described in the next section), we will copy certain folders and files from the J:\ADT 2007 folders to our J:\BHH-T folder tree for further customization for our company. We are simply using this set of OOTB files as a starting point to creating our own Templates, Plotters, and Plot Styles. Of course, if you already have these items customized for your company, you can most often copy them forward into this new folder system. However, be aware that Autodesk often makes changes to these files with each release, especially Templates. And with all of the underlying changes made to AEC objects in general, it might be wise to take ADT 2007’s supplied files and recreate your company’s drawing templates from them, instead of reusing templates from 2006 or earlier. This is perhaps also particularly true for AEC Styles, because ADT’s OOTB styles have all of the latest features and enhancements built into them. If you migrate your pre-2007 styles forward, you may have issues with using them. We will then do all of the other pre-installation tasks we need to set up our users with a preconfigured working environment.

Uninstall the ADT 2007 Default Deployment On your test machine, use the batch file as detailed in Section 5 to uninstall all ADT 2007 components to begin fresh.

Run the Deployment Wizard – Dialog boxes step by step 01 Welcome Create an Administrative Image 02 Create Administrative Image Same as Default Deployment 03 Create or Modify a Deployment Create the new Deployment called "BHH-T" 04 Write to a Log

37 Advanced Architectural Desktop Installation Secrets

Same as Default Deployment (the log file will be “BHH-T.log”) 05 Select Installation Type Same as Default Deployment 06 Client Installation Location Same as Default Deployment 07 Client Setup Type Custom 08 Select Features Same components as Default Deployment 09 Content and Support File Configuration Here is where you specify the desired locations for all of ADT’s supplied content on your network: Group Name Mode Points to Menus Default %AppData%\Autodesk\ADT 2007\enu\support Plotters Shared J:\ADT 2007\Plotters Plot Styles Shared J:\ADT 2007\Plot Styles AEC Styles/DC Content Shared J:\ADT 2007\ Tool Catalogs Shared J:\ADT 2007\Tool Catalogs Templates Shared J:\ADT 2007\Template Layer Standards Drawings Shared J:\ADT 2007\Layers Textures Shared J:\ADT 2007\Textures AEC Details Shared J:\ADT 2007\Details ADT Tutorials Shared J:\ADT 2007\Tutorial

Leave the “Modify Content Browser Library File” box unchecked. This will instruct the Deployment Wizard to place the ADT content files on the specified server resource. In addition to copying over all specified ADT Content to the server, it adjusts the resultant default Tool Catalogs and Support Paths to point to these server locations when it would otherwise normally point to a local folder. It also adjusts other settings in the default profile to logically point here, which is a nice change over previous versions. Notes: • You’ll receive a Warning Dialog: "You have selected a local or mapped drive for menus. Clients must map identical paths or the Deployment will fail." Check the "Don't show this dialog again" box and continue on. You must make sure all users have the requisite access to these server resources using the same drive letter before ADT is installed on their PCs. • This data is copied to the server only once, at the end of the Deployment creation process, not as part of an ADT installation on a user’s machine. Likewise, an uninstallation of ADT on a user’s PC will not remove this server-side content, for obvious reasons. • Leave the Menus setting alone. No matter what you specify here, your CUIs are always installed in your default RoamableRootFolder and are pointed to in the default Profile. Since we are creating our own set of CUIs later, putting them on the server here serves no purpose. • If you edit the Deployment numerous times, you can instruct the Deployment Wizard to not write over these folders again and again, and to not show the annoying dialog box over and over again. This is another very welcome improvement over the 2006 Deployment Wizard.

38 Advanced Architectural Desktop Installation Secrets

10 Profile Configuration Accept defaults as per Default Deployment. We will take care of our profiles later. 11 Search Paths and File Locations Hit "Modify Defaults" to change support paths 12 Specify Settings Support File Search Path This is where you can initially plug into your back-end server and customization system which will be reflected in the default “Architectural Desktop – Imperial” user profile. Here’s an example of the Search Path that works with the customization layout specified previously:

J:\bhh-t\bin\apps ; Corporate/3rd party files J:\bhh-t\bin\cui ; Corporate CUIs J:\bhh-t\bin\resources ; Corporate resource files J:\bhh-t\bin\resources\Pats ; Corporate/centralized hatch pattern files \Support ; Default RoamableRootFolder’s Support folder J:\bhh-t\bin\fonts ; Corporate SHX font files \Support ; Default Support files path \Fonts ; Default Fonts path \Help ; Default Help files \Express ; Default Express Tools (if installed as an option) \Support\Color ; Default Color books Note how our Corporate customization folders are located at the top of the Support Path, so they will be searched first. For example, if you have a common “acad.lsp” and “acaddoc.lsp” file which loads a customization system which sits on top of ADT, put it in the \Apps folder and it will be the one used by all users, no matter if there are other same-named LISP files in other support folders.

Note: Some of these folders are “generic” for a reason, because these paths are variable. Don’t “expand” these folders with the actual path; leave them as written with the <>. ADT will fill these in with the correct paths on installation. Customization Files Main CUI = \Support\adt.cui Enterprise CUI = Custom Dictionary File \Support\sample.cus Font Mapping File \Support\acad.fmp Printer Support File Path Printer Configuration Search Path J:\ADT 2007\Plotters Printer Description File Search Path J:\ADT 2007\Plotters\PMP Files Plot Style Table Search Path J:\ADT 2007\Plot Styles Color Book Locations \Support\Color \Support\Color Data Sources Location \Data Links

39 Advanced Architectural Desktop Installation Secrets

Template Settings Drawing Template File Location J:\ADT 2007\Template Sheet Set Template File Location J:\ADT 2007\Template Default Template File Name for QNew J:\ADT 2007\Template\AEC Model (Imperial STB).dwt Default Template for Sheet Creation and Page Setup Overrides J:\ADT 2007\Template\AEC Sheet (Imperial STB).dwt Tool Palettes File Locations \Support\WorkspaceCatalog (Imperial) Texture Map Locations J:\ADT 2007\Textures J:\ADT 2007\Textures\Bump J:\ADT 2007\Textures\Cutout

Notes: Note that many of these paths are modified from the defaults; mostly this is because the defaults that are given in the Deployment Wizard are wrong, as specified in Section 6. Another weird things is that if you plan to use CTB plot style tables instead of STBs, and substitute those CTBs in the Template section above, be aware that you will still probably get STBs in your default ADT user profile when you first fire up ADT. This is probably due to the fact that you must first configure ADT to use CTBs in Options > Plot and Publish > Plot Style Table Settings before CTBs can be used. Or not.

13 Install Additional Files 14 Serial Number 15 Personal Information 16 Live Update 17 Customer Error Reporting 18 Disable DC Online 19 Subscription Center Access 20 Register Today 21 Setup Confirmation 22 Validating Deployment progress All of these dialogs are the Same as Default Deployment Once you review the settings and hit Finish, the Deployment will copy over all of the OOTB ADT content to the server locations as specified under J:\ADT 2007\.

Modify the BHH-T.INI file The BHH-T.INI file is created with the standard settings, so we need to copy the modifications we did in the Default Deployment to this one. 1. Rename BHH-T.ini to BHH-T_ORIG.ini for safekeeping 2. Copy the Default.ini file to BHH-T.ini 3. Edit BHH-T.ini in Notepad, and perform a Search and Replace to replace "Default" with "BHH-T" 4. Delete BHH-T_ORIG.ini

40 Advanced Architectural Desktop Installation Secrets

12 Installing the Corporate Deployment on Your Test PC

This step will serve several purposes: (1) Test whether our Corporate Deployment actually works (hey, it’s not a given); (2) provide the necessary files to then create our Corporate versions of Templates, Plot Styles, and so on; and (3) to provide us with a default, OOTB “RoamableRootFolder” from which we can create a prototype for all of our users.

Pre-installation Setup At this point you may or may not have any Corporate customization on your servers from previous releases which is to be used in 2007. To start things off with a clean slate, we will first create the J:\BHH-T folder tree which will be used to house this customization as we progress through development, as per Section 9. It is usually best to start off with these folders completely empty, then fill them with files as they are properly migrated from previous releases. This way you can customize and test each bit of your customization individually. Note that the J:\ADT 2007\ folders were created as part of the Corporate Deployment process.

Install ADT 2007 "BHH-T" Deployment 1. Log onto your test PC as your dummy user 'Zaphod.' Make sure you have all required drive letters mapped as you reference in the Corporate Deployment. 2. It is highly recommended that you clean out your “Temp” folder before proceeding. You can get there quickly in Windows Explorer by simply entering %TEMP% in the Start > Run box. 3. In Windows Explorer, navigate to the \\Log folder and keep it open during installation. If you have any pre-existing “BHH-T.log” file, delete it. 4. Open the \ADT 2007 Install folder in a second Explorer window, and double-click on the "BHH- T" shortcut to install the "BHH-T" ADT 2007 Deployment. This launches the deploy.exe program with the BHH-T.mst transform file. 5. After the installation completes, reboot your PC. Then check the “Add/Remove Programs” applet to ensure that ADT 2007, Service Pack 1, DWF Viewer 7 and DWGTrueConvert were installed.

Post Installation System Check Once ADT is installed on your test PC, it is a good idea to examine the log files that are created. The AdminImage\Log folder contains the basic log file for the Deployment’s individual components as specified in the .ini file. However, there are additional log files under your %TEMP% folder which give great detail about what is installed and how it was done. If you experience errors in your deployment (which is not an uncommon occurrence), check the .LOG files in this folder for sources of errors. At the very least you should be able to find a 4-digit msiexec error code which will help in troubleshooting.

Copy ADT-Supplied Files to Your Corporate Customization Folders 1. Navigate to J:\ADT 2007 2. Copy folders with files that you will want to customize for your company, such as \Plotters, \Plot Styles, \Layers, and \Template, to the required folders under J:\BHH-T. 3. As you develop your customization to work with ADT 2007, you will modify these files instead of ADT’s OOTB files, and point your Support Paths to use these folders instead of ADT 2007.

41 Advanced Architectural Desktop Installation Secrets

Copy Your Modified DLL Files If you modified any DLL files after you installed your Default Deployment, as described in Section 10, copy them from \Admin\_Modified DLLs into your ADT 2007 installation folder. Otherwise, you can create them now, after properly backing them up, of course.

Run ADT 2007 once "as is" At this point, the BHH-T Corporate Deployment of ADT was installed on the test PC under the 'Zaphod' user name. Fire it up by launching it from the desktop icon. Select the “Design” Workspace as the default, and go through/dismiss the New Features Workshop to get to the command line. It will create an “Architectural Desktop – Imperial” user profile which uses the settings from the Corporate Deployment. This first run is also required to fully load the Express Tools’ "acetmain.cui" file (if installed) as a partial CUI into the ADT.cui (which is configured as your Main CUI). Go through the initial steps of selecting your Workspace (e.g., 'Design') and viewing/dismissing the New Features Workshop. After you get to the command line, verify that Express is provided as a menu pulldown. This step also creates the MNR files for all of the CUIs used in the default Workspace in your current RoamableRootFolder.

Examine Your Default Options > Files Paths One of the first things you should do is go to Tools > Options > Files to see how your Corporate Deployment settings mapped to your initial working environment. As described in this handout, the default profile will have the following configuration configured:

42 Advanced Architectural Desktop Installation Secrets

43 Advanced Architectural Desktop Installation Secrets

Note the following things: 1. Your custom Corporate support folders are added to the front of the Support Files path. 2. J:\ADT 2007\Layers was added to the Support Path (even though it was not listed in the default Deployment Wizard settings dialog box) 3. Anything that pointed to in the Deployment Wizard maps to your default RoamableRootFolder at ..\Application Data\Autodesk\ADT 2007\Enu. 4. Go to Options> AEC Content, and you should see this:

Your support paths for AEC Content and Tool Catalogs are also homed to the J:\ADT 2007 folders as you specified in the Deployment Wizard. 5. Detail Component Databases and Keynote Databases are also similarly mapped to the correct files on J:\ADT 2007:

44 Advanced Architectural Desktop Installation Secrets

6. The default AEC Project Defaults tab (using a modified DLL to show everything):

Before proceeding further, let’s do two things. First, go to Options > Profiles and hit the “Add to List” button, to make a backup copy of your current User Profile (Architectural Desktop – Imperial). Name it something obvious, like “ADT Backup.” Secondly, in the Profiles tab, Export your current profile to an .ARG file at a safe location, outside of the Installation folder, e.g. in your My Documents folder. Lastly, shut down ADT before proceeding further.

45 Advanced Architectural Desktop Installation Secrets

13 Creating a Template RoamableRootFolder

RoamableRootFolder Overview As mentioned throughout this paper, the "RoamableRootFolder" is a special folder which houses all of your user support files for ADT. It normally resides at C:\Documents and Settings\\Application Data\Autodesk\ADT 2007\enu, or %AppData%\Autodesk\ADT 2007\enu for short. In the program’s installation directory (C:\Program Files\Autodesk Architectural Desktop 2007\) there is a special hidden folder called “UserDataCache” which contains all of the files required to create a default RoamableRootFolder. By design, a new RoamableRootFolder is created whenever someone fires up ADT on a machine for the first time (i.e., does not have an HKCU\Software\Autodesk\AutoCAD\... key in the Registry). This section will discuss how to move your initial OOTB RoamableRootFolder file to the server, and to make the necessary Registry edit to make ADT respond to that folder. Then we will modify this folder to create the prototypical template we will use for all users in your organization. These steps are to be performed directly after you install the BHH-T Corporate Deployment on your test machine and have verified that everything had installed correctly. Note: The steps outlined in this section are sequential and must be followed in the proper order. It assumes that the previous steps taken and paths used are in place.

Save a Copy of your Registry Settings Because we are going to start mucking around with the Registry to properly bend ADT to our will, it is imperative that we have backups of our current, “safe” configuration to be able to restore to this point in case something terrible happens. If you’ve never edited the Registry before, make sure you follow the instructions here closely. The Registry Editor is a heartless beast, whose settings take effect immediately - with no room for error. It’s entirely possible to mess up your system faster than you can say the four-letter word of your choice you will undoubtedly shout right after you realize what you have just done. At this point, everything is correct per the installation of our Corporate Deployment, which makes this an opportune time to make a Registry backup. Follow these instructions: 1. Shut down ADT and all running applications. 2. Go to Start > Run and type “Regedit” in the box and hit OK. The Registry Editor starts. 3. In the left hand pane, navigate to the following key (Registry keys look like folders in Explorer): HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409. This is the Registry key that contains ALL of your user’s personal settings for Architectural Desktop 2007. This Registry key’s information is a superset of your current ADT user profile (Architectural Desktop – Imperial). In other words, all of your ADT user profiles are held under this larger key (in the \Profiles subkey). 4. Highlight this main key, go to File > Export, and save this key as “ADT Corporate Deployment Default.Reg” to a safe location. Make sure Export Range is set to “Selected branch.”

Copy the Default RoamableRootFolder to the Server In Windows Explorer, navigate to your standard RoamableRootFolder, located at %AppData%\Autodesk\ADT 2007\Enu, that was created from the BHH-T Corporate Deployment. Copy this folder to J:\Users\Zaphod\enu, and rename \enu to \Zaphod. This new folder will become the new RoamableRootFolder and be the source for a template for setting up all future users. We will be tweaking our user profile and saving changes to this new server location.

46 Advanced Architectural Desktop Installation Secrets

Rename and Export Your User Profile 1. Launch ADT. 2. Go to Options > Profiles. 3. Highlight the “Architectural Desktop – Imperial” profile, and hit the “Add to List” button. This creates a copy of this profile for our modification. 4. Name this profile “Zaphod” and hit OK. You can alternatively add a description. Note: Do not set this profile to be Current. 5. User profiles can be exported to .ARG files. Hit the Export button, and export this Zaphod profile to J:\Users\Zaphod\ADT 2007\Support\Zaphod.arg. 6. Delete the Zaphod profile. See the notes below for the reasons for doing this. 7. Exit ADT.

Rename your Original RoamableRootFolder To ensure that our settings are working, rename the original %AppData%\Autodesk\ADT 2007\ENU folder to “ZZ_ENU.” Note: Do not start up ADT again until the next steps are completed.

Set RoamableRootFolder Registry Value This step is critical to this process. We will remap ADT to use the new network-based RoamableRootFolder at J:\Users\Zaphod\ADT 2007\. What happens is that our User Profile always reference a single RoamableRootFolder Registry Key which specifies a particular path - the default being %AppData%\Autodesk\ADT 2007\enu\. Refer to the next section on ADT User Profiles for more information. Make sure you are out of ADT, and fire up the Registry Editor (Regedit.exe): 1. Navigate to HKCU\Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409 (the ADT 2007 key) 2. In the right hand pane, double-click on "RoamableRootFolder" value. 3. Revise it to say J:\Users\Zaphod\ADT 2007\ (note the trailing slash) You can also do this at the command line or through a batch file (all characters are to be entered literally on one line): reg add HKCU\Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409 /v RoamableRootFolder /t REG_SZ /d "J:\users\%username%\ADT 2007\\" /f

Edit the Architectural Desktop 2007 Desktop Icon’s Properties Next, we will right-click on the ADT 2007 desktop icon to edit its properties. In the Target box, edit the Profile used as follows (with changes shown in bold): "" /ld "C:\Program Files\Autodesk Architectural Desktop 2007\AecBase50.dbx" /p "J:\Users\%username%\ADT 2007\Support\%username%.arg" In the Start In box, set it to "J:\Users\%username%\ADT 2007\Support\" Note: Make sure all paths are enclosed with double quotation marks as shown above. Notice how we are using Windows’ Environment Variables. This will now start ADT using the %USERNAME%.arg file, which expands in this case to our ‘Zaphod.arg’ profile file that we created and exported earlier. In the icon’s Properties, any Windows Environment variables specified will be expanded as required, so putting in “%username%” will put in the current user’s Windows login name, regardless of whoever is logged in.

47 Advanced Architectural Desktop Installation Secrets

This is a system wide change because the desktop icon is installed in \All Users\Desktop folder, not in your personal Desktop folder. Anything in All Users applied to all users on that particular PC, so this single change makes it work for all users on this system.

Manually Deleting Your ‘Zaphod’ User Profile in the Registry In the previous steps, after you exported the ‘Zaphod’ profile to Zaphod.ARG, I had you delete the user profile before exiting ADT. The reason for doing this is so that you do not have a preexisting ‘Zaphod’ profile in your Registry when you launch ADT using the modified desktop icon, as described below. However, if you did not delete the Zaphod profile (or you have a corrupted user profile which is causing problems), you can delete it manually using the Registry Editor. Follow these instructions: 1. Launch the Registry Editor. 1. You are probably already at the proper ADT Software key, but if not navigate to HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409\Profiles. 2. Highlight the ‘Zaphod’ key in the left hand side, right-click, and select “Delete.” If you do not have such this key, do nothing and exit the Registry Editor. 3. Note: Changes to the Registry are immediate and unforgiving. There is no Undo. Make sure you have highlighted the correct Registry key before deleting it.

Why Delete the Zaphod User Profile? The reason you delete the Zaphod user profile from the Registry has to do with the differences between what is in the Registry vs. what is in the .ARG profile file. This is fully described in detail in the next section, “Inside an Architectural Desktop User Profile,” but in short, the Registry generally points to absolute paths. However, in many cases, an ARG profile file points to “logical” paths; that is, in many cases it points to a folder path which is actually defined in one place elsewhere. This is the case with RoamableRootFolder, which is referenced throughout an ARG file as “%RoamableRootFolder%” instead of pointing to a specific location. For example, the .ARG file specifies the “Custom Dictionary” setting as "%RoamableRootFolder%\support\sample.cus" instead of a hard-coded path. The value of “%RoamableRootProfile%” is defined at the RoamableRootFolder key we changed previously in the Registry. When a new ARG profile file is imported (via the /P switch in the desktop icon), ADT parsed it by combining the RoamableRootFolder setting we set earlier with the rest of the path, to its fully expanded path. Again, Section 14 will show you how this works at a more detailed level. Thus, we just need to make sure all references to %RoamableRootFolder% in the .ARG file are now properly expanded to the correct folder (J:\Users\Zaphod\ADT 2007\) in the Registry when the .ARG file is re-parsed and entered into the Registry. This effect will become clear in the following steps.

Fire up ADT 2007 Finally, the moment of truth. If you’ve done everything correctly up until now, the following things will happen when you fire up ADT from the revised desktop icon: 1. ADT will load the J:\Users\Zaphod\ADT 2007\Support\Zaphod.arg” file you exported earlier to create the ‘Zaphod’ user profile. 2. Any place in the Zaphod user profile which references %RoamableRootFolder% will instead home to this new folder instead of at the local %AppData% folder 3. You will see the effects of this in the Options > Files Dialog box.

48 Advanced Architectural Desktop Installation Secrets

Effects of Changing the RoamableRootFolder Under Options > Files, you can see the effects of our Registry RoamableRootFolder change:

49 Advanced Architectural Desktop Installation Secrets

Notice how every instance of our old RoamableRootFolder at “C:\Documents and Settings\Zaphod\Application Data\Autodesk\ADT 2007\enu\” has been automatically and effortlessly replaced by our new RoamableRootFolder at “J:\Users\Zaphod\ADT 2007\.” Great Success! Note: All references to “..Zaphod\Local Settings\Application Data\...” are fine. The “\Local Settings” folder is meant for data that is not to “roam” with the user and can be left alone.

50 Advanced Architectural Desktop Installation Secrets

Modify the New RoamableRootFolder

Deciding Support File Scope Once our new RoamableRootFolder is in place, we need to look at the files contained within it and decide which should be Local, Corporate, or User controlled. This folder is to house all User-scope files. However, some of the files installed in this folder are actually more Corporate in nature, based on how we are going to set up CUIs and other resources that we intend to customize on a global scale. Additionally, some of the files here could be considered to be Local in scope, that is, they are not customized by the end user, yet aren’t customized as a single standard across the company. However, we will consider them to be Corporate in nature, and we’ll move as much of this to the J:\BHH-T\Bin\ folder tree as specified below, as these are the first folders in the search path. That is, they will be searched through before the program installation folders when needed. This should improve performance. Because we have previously set up our Corporate Customization folders at J:\BHH-T\, and included them in the Support Path in the Corporate Deployment, we can move files from the RoamableRootFolder to these locations easily. Corporate Scope: These are files which may or may not get centrally customized but will be made available across the company. Move these files to J:\BHH-T\Bin\Resources: acad.dcl ; Standard DCL for Acad dialogs base.dcl ; Prototype for all other DCL elements doshelp.dcl ; Additional DCL files used by different bits of ADT ase.dcl rendcomm.dcl render.dcl viewslid.dcl gdt.shx ; Misc. font files ltypeshp.shx simplex.shx mini.lli ; Landscape libraries render.lli mini.mli ; Render Material Libraries render.mli acad.lin ; Standard & possibly customized linetypes acadiso.lin acad.pat ; Standard & possibly customized hatch patterns acadiso.pat acad.unt ; Unit conversion definitions bigfont.ini ; Code page file for Bigfont.shx Inches.pss ; Plot stamp files mm.pss Sitename.txt ; Site name database for Rendering \Pats ; Move to j:\bhh-t\bin\resources\pats to share between users

User Scope: Folders and all subfolder content to remain at J:\Users\Zaphod\ADT 2007: acfields.fdc ; Fields catalog acad.fmp ; Font mapping file acad.mln ; Multiline definition file

51 Advanced Architectural Desktop Installation Secrets

Commands.atc ; Tool catalog package containing commands Shapes.atc ; Tool catalog package containing dimension commands mtextmap.ini ; Maps SHX and PFB fonts to TTF fonts for the MText editor support.cdc ; DesignCenter preview cache file AEC DWF List.ppl ; Defines what AEC objects are exported to DWF CachedDetailComponent.xml CachedDEtailComponentTool.xml \AuthorPalette ; Palettes which appear in the Block Editor \Color ; User specific color books \Help \Icons ; Custom icons which you make for your own CUI (yay!) \Profiles ; Holds all tool palette UI and group information \RegisteredTools ; Holdover from AutoCAD? \RegisteredTools-AutoCAD ; Holdover from AutoCAD? \ToolPalette ; Holdover from AutoCAD? \WorkspaceCatalog (Imperial) ; Holds all Tool Palettes and Images Sample.cus ; User's custom dictionary Custom.cui ; Delete this – we’ll create a prototype ‘Zaphod.cui’ later. Zaphod.arg ; Your prototypical User Profile which will be modified later. CUI Files By default, all of ADT’s OOTB CUI files are installed in your RoamableRootFolder, which has now been copied and set to reside at J:\Users\Zaphod\ADT 2007. The ADT.CUI is currently our Main CUI as specified in the new Zaphod profile. However, these are going to be configured to be part of our Enterprise CUI and put in the J:\BHH-T\CUI folder (and not editable by end users). We will take care of this later, so for now leave these files alone: *.CUI, *.DLL, *.MNL, and *.MNR.

52 Advanced Architectural Desktop Installation Secrets

14 Inside an Architectural Desktop User Profile

Overview ADT User Profiles are collections of settings that govern how much of ADT looks, acts and feels. It controls almost all of the parameters that determine how ADT functions at the fingertip level, and determines how ADT interacts with any centralized customization. Each user has their own set of ADT User Profiles they can use, and each user can have more than one ADT User Profile. You might use multiple profiles if you are using a third party application, or wish to run ADT as plain AutoCAD, or want to switch between a CAD Admin type of user and a normal, pedestrian, mere-peon type of user. Profiles are keys held in the Registry, located at HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409\Profiles\ with a subkey for each Profile name. If you are using a multi-user system, each logged-on user account has their own set of completely independent user profiles to use. All of your users’ profiles may all be named the same, but each profile one is separate and unrelated to any others. An .ARG file is an ADT User Profile file as exported from the Options > Profiles dialog. It is a simple ASCII text file, editable in Notepad or any other text editor. As seen in the previous section, you can specify an ARG file to use with ADT by editing the target line in the desktop icon's properties, using the /p "" switch in the command line.

Profile Loading Rules The rules regarding how User Profiles are used by ADT are pretty simple, but should be understood: 1. When ADT is launched from the desktop icon, where a profile name is specified using the /P switch, ADT will first to check to see if that profile name is present in the Registry, and if so will use that. 2. If the profile does not exist, ADT will search the path given by the /P switch to find the .arg file, and if found, load that profile, and parse it to create the Registry entry. 3. If the specified profile file is not found, ADT will create one using Defaults. However, these “defaults” are not as specified from whatever Deployment was used. In fact, the profile created is pretty messed up. Remember when I said that the default paths in the Deployment Wizard > Specify Settings dialog box were “incorrect?” Well, ADT will create a new profile using these messed up settings, which means nothing will actually work, because ADT never installed files to the paths it is referencing in the newly created goofed up profile. The safety tip here is to always export your profile out to an ARG file for operations. 4. If ADT is launched by other means, e.g. double-clicking on a drawing file, the last-used profile will be loaded.

Differences Between an .ARG file and a Registry .REG File If you’ve ever looked at both an .ARG and a .REG file in a text editor, they look identical. But upon closer examination, the two are actually different things. In a Registry file, all paths are explicitly expressed. However, in many cases, the paths referred to in the .ARG file are "environment variables" defined by ADT which are parsed by the program when it is imported. The classic example we’ve already seen is where "%RoamableRootFolder%" is referenced in the .ARG file. This is the folder as pointed to by another Registry setting, located at HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409\RoamableRootFolder.

53 Advanced Architectural Desktop Installation Secrets

Thus, the path to your RoamableRootFolder is not hard coded. This means that if you change this value, ADT will then use that location when referenced by %RoamablerootFolder% in the profile. Notice that the definition of RoamableRootFolder is per Windows User (that is, inside the HKCU\Software\Autodesk\ key) but this is outside of the scope of any single AutoCAD User Profile. That means that this setting (as is any setting outside of the AutoCAD Profile) is global to the user regardless of current profile loaded. Thus, any changes that need to be made outside of the Profile scope need to be made either inside of ADT or manually edited via the Registry Editor or a batch file. The following is a portion of the default "Architectural Desktop - Imperial" ARG file as exported using the Profiles tab of the Options Dialog Box. In particular, this is a portion of the \General key:

REGEDIT4 : [HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409\Profiles\Architectural Desktop - Imperial\General] "DatabaseWorkSpacePath"="%RoamableRootFolder%\\Data Links" "PlotLogPath"="%LocalRootFolder%\\" "AlternativePageSetUpsTemplate"="C:\\Documents and Settings\\All Users\\Application Data\\Autodesk\\ADT 2007\\enu\\Template\\Aec Sheet (Imperial Stb).dwt" "ACAD"="%RoamableRootFolder%\\Support;%RoamableRootFolder%\\Support\\pats;%InstallFolder%\\Support;%InstallFolde r%\\Fonts;%InstallFolder%\\Help;%InstallFolder%\\Express;%InstallFolder%\\Support\\Color;C:\\Documents and Settings\\All Users\\Application Data\\Autodesk\\ADT 2007\\enu\\Layers\\;" "ToolPalettePath"="%RoamableRootFolder%\\Support\\WorkspaceCatalog (Imperial)" "ColorBookLocation"="%InstallFolder%\\support\\color;%RoamableRootFolder%\\support\\color;" "ACADHELP"="%InstallFolder%\\Help\\adt2007.chm" "RegisteredToolsPath"="%RoamableRootFolder%\\Support\\RegisteredTools\\" "ACADDRV"="%InstallFolder%\\drv" "ACADLOGFILE"="%LocalRootFolder%\\acad.log" "PlotToFilePath"="%UserProfileFolder%\\My Documents" "ProfileStorage"="%RoamableRootFolder%\\Support\\Profiles\\Architectural Desktop - Imperial\\Profile.aws" Compare this to the same key exported from the Registry as a .REG file: Windows Registry Editor Version 5.00 : [HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409\Profiles\Architectural Desktop - Imperial\General] "DatabaseWorkSpacePath"="C:\\Documents and Settings\\Zaphod\\Application Data\\Autodesk\\ADT 2007\\enu\\Data Links" "PlotLogPath"="C:\\Documents and Settings\\Zaphod\\Local Settings\\Application Data\\Autodesk\\ADT 2007\\enu\\" "AlternativePageSetUpsTemplate"="C:\\Documents and Settings\\All Users\\Application Data\\Autodesk\\ADT 2007\\enu\\Template\\Aec Sheet (Imperial Stb).dwt" "ACAD"="C:\\Documents and Settings\\Zaphod\\Application Data\\Autodesk\\ADT 2007\\enu\\Support;C:\\Documents and Settings\\Zaphod\\Application Data\\Autodesk\\ADT 2007\\enu\\Support\\pats;C:\\Program Files\\Autodesk Architectural Desktop 2007\\Support;C:\\Program Files\\Autodesk Architectural Desktop 2007\\Fonts;C:\\Program Files\\Autodesk Architectural Desktop 2007\\Help;C:\\Program Files\\Autodesk Architectural Desktop 2007\\Express;C:\\Program Files\\Autodesk Architectural Desktop 2007\\Support\\Color;C:\\Documents and Settings\\All Users\\Application Data\\Autodesk\\ADT 2007\\enu\\Layers\\;" "ToolPalettePath"="C:\\Documents and Settings\\Zaphod\\Application Data\\Autodesk\\ADT 2007\\enu\\Support\\WorkspaceCatalog (Imperial)" "ColorBookLocation"="C:\\Program Files\\Autodesk Architectural Desktop 2007\\support\\color;C:\\Documents and Settings\\Zaphod\\Application Data\\Autodesk\\ADT 2007\\enu\\support\\color;" "ACADHELP"="C:\\Program Files\\Autodesk Architectural Desktop 2007\\Help\\adt2007.chm" "RegisteredToolsPath"="C:\\Documents and Settings\\Zaphod\\Application Data\\Autodesk\\ADT 2007\\enu\\Support\\RegisteredTools\\" "ACADDRV"="C:\\Program Files\\Autodesk Architectural Desktop 2007\\drv" "ACADLOGFILE"="C:\\Documents and Settings\\Zaphod\\Local Settings\\Application Data\\Autodesk\\ADT 2007\\enu\\acad.log" "PlotToFilePath"="C:\\Documents and Settings\\Zaphod\\My Documents" "ProfileStorage"="C:\\Documents and Settings\\Zaphod\\Application Data\\Autodesk\\ADT 2007\\enu\\Support\\Profiles\\Architectural Desktop - Imperial\\Profile.aws"

54 Advanced Architectural Desktop Installation Secrets

Notice the following things: The .ARG file references the RoamableRootFolder, ADT installation folder, and Local Root folder similar to "environment variables" by enclosing them in '%' symbols. This means they are actually pointing to the values associated with those variables without hard coding those values in, as they have with the "All Users" Application Data path as seen in the "AlternativePageSetups" value above. However, if you examine the exported .REG file, you will see all of these variables are expanded to their literal path. The Registry does not use environment variables. In most cases when an application sets Registry values that point to paths, it does so by looking up other Registry values for such things as the user’s My Document folder, the %Temp% folder, and so on. Like %RoamableRootFolder%, the .ARG file references several values that are given in other portions of the Registry under \Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409\. Specifically, the .ARG file uses these other "Registry references:" • %LocalRootFolder% maps to the path given by HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409\LocalRootFolder; • %InstallFolder% maps to the path given by HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R17.0\ACAD-5004:409\Location; • %TempFolder% maps to the path given by %Temp% environment variable; • %UserProfileFolder% maps to the path given by %UserProfile% environment variable.

55 Advanced Architectural Desktop Installation Secrets

15 Creating a Prototypical User Environment

At this point in the process, we have ADT set up to use our ‘Zaphod’ user profile, which is now correctly referencing a server-based RoamableRootFolder. Some of the major changes required to fully make this a user prototype are completed, but we still need to configure our CUIs, Content Library, Tool Palettes, and tweak the Options settings to make things perfect.

Target CUI Configuration The first thing we shall do is modify our stock ADT.CUI to include our Corporate CUI (BHH-T.CUI) as a partial CUI, create a new ‘Zaphod.CUI’ and configure it as the Main CUI, and move the Corporate CUIs to the server. This is how we decided to configure our CUIs per Section 9, Corporate ADT Customization Strategies on page 26. These are the current givens: • The ADT.CUI is configured as the Main CUI, and resides in the RoamableRootFolder. There is no Enterprise CUI configured. • There may or may not be an existing ‘Corporate’ BHH-T.CUI from a previous ADT Release. We will create a new, blank BHH-T.CUI. If there is an existing Corporate CUI, we will Transfer its contents into the new BHH-T.CUI. By doing this we can specify only those things which are to move forward, which can reduce CUI bloat. • There is no existing Zaphod.CUI. We will create one as well. The steps involved in creating your new CUI configuration are: 1. Launch ADT. 2. If not set already, set the Design Workspace to be current in the Workspaces toolbar. 3. Fire up the CUI editor. 4. Expand the “Partial CUI files” node. The ADT.CUI is shown with its partials: ADT_DESIGN, ADT_DOCUMENT, ADT_CAD_MANAGER, ADT_3DSOLIDS, and EXPRESS. 5. Go to the Transfer tab. 6. Under “Customizations in Main CUI”, in the drop-down box, hit New.

7. In the same drop-down box, hit Save As, and save it as “BHH-T” in the RoamableRootFolder’s \Support folder. You should be in that folder by default, and you’ll see all of the other CUIs located there. 8. Go back to the Customize tab. 9. Highlight the “Partial CUI Files” node, right-click, and select “Load Partial Customization File.” Select BHH-T from the folder. 10. Go back up to the ADT.CUI (select it from the drop down box) and expand the Partial CUI Files node. You will see BHH-T listed at the bottom. 11. Click on the BHH-T.CUI and drag it to the top of the list, above ADT_DESIGN. Now we will create the Zaphod CUI: 1. As before, go to the Transfer tab, and in the drop down, select New.

56 Advanced Architectural Desktop Installation Secrets

2. Select Save As, and save it as ‘Zaphod.CUI’ in the Support folder along with all of the other CUIs. 3. Hit Apply and OK to close out of the CUI editor. 4. You should see no changes to the ADT user interface environment.

Moving the CUI Files The Corporate CUI and their required ancillary files will now be moved to the final locations at J:\BHH-T\bin\cui. We can do this while still in ADT, and we will then configure the Options settings to point to these new locations. Using Windows Explorer, move the following files to J:\Bhh-t\bin\cui: acad.cui acad.mnl acad.mnr AcadSampleWorkspaces.cui acetmain.cui acetmain.mnl acetmain.mnr adt.cui adt.dll adt.mnl adt.mnr ADT3DSolids.cui ADT3DSolids.mnl ADT3DSolids.mnr ADTCadManager.cui ADTCadManager.dll ADTCadManager.mnl ADTCADManager.mnr ADTDesign.cui ADTDesign.dll ADTDesign.mnl ADTDesign.mnr ADTDocument.cui ADTDocument.dll ADTDocument.mnl ADTDocument.mnr AecArchXOE.cui AecArchXOE.mnl dbcon.cui ADTDesign.scr ADTDetailing.scr ADTDocument.scr ADTVisualization.scr BHH-T.cui BHH-T.mnr Note: Leave the Zaphod.CUI and Zaphod.MNR files in the Support folder.

Change the CUI Configuration in Options 1. Go to Options > Files tab 2. Expand the Customization Files > Main and Enterprise Files nodes. 3. In the Main Customization File entry, enter Zaphod (no path). 4. In the Enterprise Customization File entry, enter ADT (no path). 5. Hit OK to exit the Options dialog. You should see no change to the desktop. 6. Go back into Options, Customization Files node, and see that the files were searched for in the Support Files path, and that the full paths are entered:

7. Go to the Profiles tab, and Export the ‘Zaphod’ profile to ‘Zaphod.arg’ in your Support folder. Note: Any time you make a change to your prototypical user profile, export it to a file named ‘Zaphod.arg’ in the Support folder. Remember that as we go through these exercises to create a prototypical user condition, we are also building our ‘Zaphod.arg’ profile to be the template for all users, with the only difference between all of them being the user’s logon name.

57 Advanced Architectural Desktop Installation Secrets

Fix the Printer Support File Path In Section 12, p.39, we copied the default OOTB plotters and plot styles to our Corporate folders for further customization for the company. Now we will change the Options > Files > Printer Support File Paths to point to our plotters and Plot Styles to our J:\BHH-T folders, as follows: Printer Configuration Search Path: J:\bhh-t\Plotters Printer Description File Search Path: J:\bhh-t\Plotters\PMP Files Plot Style Table Search Path: J:\bhh-t\Plot Styles

Fix the Templates Support Paths Similarly, change the Templates support paths to point to BHH-T folders instead of the ADT 2007 defaults, i.e.. J:\BHH-T\Template. Change all of the Template paths to BHH-T instead of ADT 2007. Note: Similarly, you may create BHH-T\Textures folder as a repository for corporate textures for 3D work. You can then copy the OOTB textures from ADT 2007 to BHH-T and modify the support folders there as above. If you also use 3ds max and/or VIZ, you can copy bitmap files from those installation folders into your global Textures folder as well.

User Environment Workspace Design By default, all users will use a Workspace that is named after their username, which will have all of your UI elements in place – including menus from your Corporate CUI and the various ADT CUIs. Because of how ADT stores Workspaces in CUIs, however, you can edit Workspaces only in the Main (User) CUI. You can use a Workspace in the “primary” Enterprise CUI, but you cannot edit it. But, you can save any workspace that exists in the primary Enterprise CUI to a new Workspace in the Main CUI. This mechanism makes Workspaces kind of clunky to deal with. In particular, we want to do the following: 1. We want to have a BHH-T Workspace created available which will be properly set up with all default menus, toolbars and other UI elements in place, including any custom menus/toolbars/etc from the BHH-T CUI. We want this to be read-only for all users. 2. This “Corporate” Workspace will serve as a template for creating our user Workspace. 3. We want the Main CUI to have a Workspace which initially starts out as a copy of the BHH-T Workspace. Of course, this workspace will be modifiable by all users. But, if they goof it up, we have the Corporate read-only Workspace which can be easily re-saved as the User workspace in the Main (User) CUI. The logical place to store the BHH-T Workspace is in the ADT.CUI, because it’s the only place that satisfies our requirements to have an available read-only Workspace available to save as a Workspace in the Main CUI. Workspaces in “partial” CUIs are not available, unfortunately. Thus, we need to edit the ADT CUI. Note that this is the only change we will make to the ADT CUI, to minimize hassles with moving forward with new releases.

Create an Administrative Profile for Editing the ADT.CUI With our “Zaphod” user profile having the ADT CUIs configured as Enterprise CUIs, we have no access to modify these CUIs further. However, we will need to do so before rolling out everything to our users, to make the BHH-T CUI and particularly to migrate any previous Corporate CUIs forward into the new BHH-T CUI. So, we need to reconfigure the ADT CUI to be our Main CUI, with no Enterprise CUI. The best way is to create a copy of our current profile, and change the CUI configuration. 1. In the Options > Profiles dialog, highlight the “Zaphod” profile and hit “Add to list” to create a new copy. 2. Name this new profile “Admin.” Select it and hit the “Set to Current” button.

58 Advanced Architectural Desktop Installation Secrets

3. Go to the Files tab, Customization Files node, and set the Main CUI to ‘ADT’ and the Enterprise CUI to (hit the Remove button). 4. In the Workspaces tab, select the Design workspace from the drop down, which is from the ADT CUI. 5. Start the CUI editor. Note there is only one CUI listed – ADT. There is no Enterprise CUI. Furthermore, note that the Partial CUIs, including BHH-T.CUI, are still listed as partials. That is because partials are referenced under the primary CUI that uses them, whether they are Main or Enterprise. Now that they are part of the Main CUI, they are fully editable. 6. In the Profiles tab, export this profile to J:\Admin\profiles\Admin.arg. 7. For development purposes, you may optionally create a copy of your ADT 2007 desktop icon, substituting “admin.arg” instead of “%username%.arg” in the /P switch.

Customize your Corporate BHH-T CUI At this point, make any required changes to the Corporate BHH-T.CUI that need to be available to everyone when they start up ADT – adding menus, toolbars, and so on. Using the Transfer tab, you can copy elements from previous Corporate CUIs to your new (blank) BHH-T CUI if they are available. Remember that you don’t want to make any changes to the ADT CUIs because they will be obsolete upon the next release, where you will get new ADT CUIs and have to do all of this over again. If you want, you can copy elements from the ADT CUIs to your Corporate CUI easily, if needed, but beware – if you copy a toolbar, you also copy its commands to the new CUI, needlessly bloating the CUI and confusing your users. Limit your global changes to the Corporate (BHH-T) CUI. When finished, restore the Zaphod user profile to be current. Your changes to the CUI will be in effect but read-only.

Create Your Corporate Template Workspace Now that the BHH-T.CUI is populated with the menus, toolbars and other company-centric customizations, we need to wrap all of this up into a Corporate Workspace which will then be used to create a template User workspace for everyone. 1. Make sure your “Admin” profile is current, with ADT.CUI as your Main CUI with BHH-T and ADT CUIs as partials. 2. In the Workspaces toolbar, make the Design workspace current. In the Workspaces drop-down, hit Save As, and save it as “BHH-T” and make it current. 3. In the CUI editor, highlight the BHH-T Workspace. In the right hand pane, hit the “Customize Workspace” button. In the right hand pane, maneuver your various UI elements from the various CUIs around to create your prototypical environment. 4. If you need to add UI elements from the default ACAD CUI (e.g., the Draw/Modify pulldown menus) you can add the ACAD.CUI from the BHH-T\CUI folder.

However, note that adding the ACAD CUI will add in Shortcut Keys which will copy – and override - those available in ADT. It is recommended that you alter the ACAD shortcut keys to be different than the ADT-specific ones. For example, in the ADT CUI, CTRL+4 launches Content Browser; in ACAD it launches the Sheet Set Manager which you probably don’t use (in favor of Project Navigator). I recommend changing the ACAD shortcut keys which conflict to CTRL+SHIFT+#, because there is no conflict with ADT shortcut keys. 5. Exit the CUI editor when all of your menus are in place. 6. Move toolbars around adjust palettes as you wish. 7. In the Workspaces toolbar, hit “Save Current As” and save over the BHH-T Workspace.

59 Advanced Architectural Desktop Installation Secrets

Restore Your Zaphod Profile and Set the Zaphod Workspace 1. Go to Options > Profiles, select the Zaphod profile and hit “Set Current.” Your UI will change to reflect your Zaphod Workspace before all customizations. 2. In the Workspaces toolbar, select BHH-T from the list to make it current. Your UI should change to look like it did previously, with all Corporate menu and toolbars visible. 3. From the drop-down, select Save Current As, and select Zaphod from the drop down list.

Configure Your Personal Catalog Library Prototype In this step we will configure the Catalog Library to include links to your personal and Corporate Tool Catalogs. The personal Catalog will be a prototype for all users. 1. Hit CTRL+4 to bring up your Catalog Library. 2. Right-click on “My Tool Catalog,” and select “Rename.” Rename it to “Zaphod’s Tool Catalog.” 3. Right-click on “Zaphod’s Tool Catalog” and select “Publish My Tool Catalog.” a. Move it to a new location. b. Answer “Yes” to any warning dialog box. c. The new path shall be at “J:\Users\Zaphod\My Tool Catalogs\.” Create this folder if required. d. Set the root location of tool-dependent files, including drawings, to the same folder J:\Users\Zaphod\My Tool Catalogs. Make sure all check boxes are checked. e. Accept all defaults in the dialog box and hit Finish. 4. This creates a file called “MyToolCatalog.atc” and an \Images folder underneath of it. As you add Categories and Palettes, it creates \Categories and \Palettes folders as required. 5. You can add an image instead of the bland blue box. Add a small PNG file to the \My Tool Catalogs\Images folder, right-click on the default blank blue box, and hit “Specify Image…” and put a custom image in the box:

6. Add in your Corporate catalogs to the Library: Right-click in the Catalog Library, Add Catalog…, Add an Existing Catalog, and navigate to any existing ATC files which you have previously set up, e.g. J:\bhh-t\Tool Catalog Library\BHH-T Block Library\BHH-T Block Library.atc J:\bhh-t\Tool Catalog Library\BHH-T Content Library\BHH-T Content Library.atc 7. Ensure the Catalogs have "Link items when added to workspace" checked in their Properties. 8. Create .REG files to import these catalogs automatically via scripts:

60 Advanced Architectural Desktop Installation Secrets

a. Shift+R/Click on your “Zaphod’s Tool Catalog” and hit “Save the REG file” to J:\Users\Zaphod\My Tool Catalogs\AddMyToolCatalog.reg b. Do the same for your Corporate Catalogs, and save them to your \Install folder tree as described in Section 17.

Add your Corporate Palettes and Tools We’re almost home. The next step is to start dragging Categories from your Corporate catalogs onto your Tool Palettes, which create Palette Groups automatically. If you have many Categories/Groups to create, select multiple Categories from the Content Browser and iDrop them to your Tool Palettes to create all of the groups automatically. Organize your Groups as you would have your users see them when ADT is installed. To ensure none of this work goes wasted, Export your user profile to “zaphod.arg.”

Final Tweaking The last things we need to do before finishing up is to make any global changes you wish to have set in the Options dialog box. Some suggested settings are: 1. Display: Enable Layout and Model tabs; Uncheck “Create Viewports in new layouts” 2. Open and Save: If you are moving your whole company to 2007 in one shot (a good idea), make the default File Save in the 2007 format; otherwise, it might be wise to use 2004 format until everyone is on board to minimize file format conflicts. Note that some advanced 2007- centric ADT features will not work in the 2004 format, as 2007 is not as backwards-compatible as were previous releases. I also suggest setting Autosave to 15 minutes, and set Demand Loading of Xrefs to Disabled. 3. Plot and Publish: Set your default plotter to your primary (most commonly used) PC3 file, as well as setting your Plot Style table to your desired default. Note that if you use Color-based style tables, you will want to set your drawing Templates to CTB based files. - Uncheck “Automatically save plot and publish log” - Under “Plot Stamp Settings” > Advanced, uncheck “Create a Log file” - Depending on your particular setup, you may find checking “Hide System Printers” to be valuable in making sure people are using PC3 files to plot. 4. Under System > Performance Settings, you can tune how ADT works with your particular graphics card. If your users have high-end OpenGL cards, e.g. the nVidia Quadro FX series, you can probably set Hardware Acceleration to On – but make sure you test this before installing ADT company-wide. Refer to the Autodesk certified graphics card database to ensure how well your hardware will work with ADT. 5. User Preferences: Edit Scale List: I usually reverse the scales so it starts with 1’-0”=1’-0” at the top, and ends with 1/64”=1’-0” at the bottom. I also rename 1’-0”=1’-0” to “Full Scale” and 6”=1’-0” to “Half Scale.” Based on your environment you may also need to add Engineering scales (1:10, 1:50, etc) to your list. 6. If you are using CTB files, you will want to make sure your template settings for AEC Project Defaults mirror this. Note: All of these changes will affect all users when they first launch ADT. Make sure you are not adding too many of your own “CAD Manager Preferences” to this template profile that will cause 99% of your users to change to different settings. Now your prototypical user environment is complete, so export your profile to Zaphod.ARG one last time, and for good measure, save it (using Add to List) as “Zaphod – Backup,” and export that to an ARG file in a safe place, preferably under your Admin folder tree.

61 Advanced Architectural Desktop Installation Secrets

16 Set Up the Server for Deployments and Installation

Copy your Deployments and Customization to the Server If you’ve created local Deployments, you’ll need to rehome them to a server. Do this after you've done all of your testing, before you are ready to roll it out across the company. Move the entire "\ADT 2007 Install" folder structure to a shared server location, e.g. \\ServerName\PCSetup\Apps\CAD\ADT 2007 Install\. Edit the “Default.ini” and “BHH-T.ini” files to substitute the server UNC target location; for example: Substitute: \\ServerName\PCSetup\Apps\CAD\ADT 2007 Install

for all occurrences of \\127.0.0.1\C$\ADT 2007 Install If you developed your Corporate customization (the J:\ folder tree) locally, you will want to copy it to a server location and make that share available as your shared drive letter, e.g. net use J: \\ServerName\CAD Support 2007

62 Advanced Architectural Desktop Installation Secrets

17 Creating Installation Batch Files

Status at this point: • ADT 2007 is successfully installed on our test machine using the user 'Zaphod.' • The J:\Users\Zaphod\ADT 2007 folder is our RoamableRootFolder, and is perfectly set up for distribution with a Zaphod.CUI and Zaphod.ARG file. • Corporate Customization is in place, and is connected to via the ‘Zaphod’ user profile. • All required initial Corporate Tool Palettes are linked into the protoype Workspace. • There is a server-side Tool Catalog for the user’s palettes and tools. • Zaphod.Cui is the main CUI, ADT.CUI is our Enterprise CUI, which has BHH-T and ADTxxx CUis as partials.

Installation Procedure To make all of this successful, we need to perform the same, automated pre-and-post installation steps on every machine. That means we need to script the complete installation process using DOS batch (.cmd) files. This process includes four major tasks: 1. Prepare the machine for ADT 2007 • Uninstall any and all old versions of the software. • Clean out Registry settings and “dead” folders. • Defragment the hard disk. • Map the J:\ drive to the location where your Corporate customization sits. • Map the Z:\ drive to the server location where your ADT 2007 Deployment folder sits. 2. Create the new Users’ RoamableRootFolders • Copy the “J:\Users\Zaphod” folder to the current user (J:\Users\), including all subfolders and files. • Run through the “\ADT 2007” and “\My Tool Catalogs” subfolders’ contents, renaming files and performing Search and Replace functions on them to substitute the %UserName% for all instances of ‘Zaphod.’ THIS, by the way, was the reason we chose to use ‘Zaphod’ as the dummy user name. It is completely unique so as to make any search and replace functions work correctly. If your dummy user name was “Admin” or “Bob” or something more common, there’s a good chance you would inadvertently replace a portion of a word in those files incorrectly. 3. Install ADT on the PC • Go to the Z:\ drive, to the location that holds the Corporate Deployment files. • Install the Corporate Deployment to the PC. 4. Perform post-installation tasks • Set the “RoamableRootFolder” Registry setting to the User’s new RoamableRootFolder on the J:\ drive, e.g. J:\Users\\ADT 2007. • Copy over a refined Desktop icon that points ADT to launch with to the correct User Profile. • Copy any modified DLL files to the user’s ADT Installation folder. • Import the REG files to add your Corporate Catalogs to the user’s Tool Catalog Library • Import a REG file to add the user’s new server-side personal Tool Catalog from their \My Tool Catalogs folder. • Delete the map to the Z:\ drive • Fire up ADT and test everything

63 Advanced Architectural Desktop Installation Secrets

Set up Folders for Installation Scripting The next step is to create a folder structure to hold batch files which will be created and used to install Architectural Desktop 2007 on your users’ PCs. We will be creating these batch files in this section. Under the “\ADT 2007 Install” folder, create an Install subfolder. Under this, create the following subfolders, which will have batch files to do these tasks: \01PrepPC ; Prepare the PC for ADT 2007 installation \02CreateUser ; Create a new user RoamableRootFolder from the Zaphod template \03InstallADT ; Install and uninstall ADT 2007 \04PostInstall ; Make post-installation changes to the user’s system as required. We will create a series of “primary” batch files in the \Install folder, which will in turn call batch files in each of these subfolders to perform a set of tasks. All of this will be explained in detail in the next section.

DOS Batch File Concepts The batch files shown in this section are to be considered a starting point for you to take and modify as required. Obviously, they are tailored to the particular configuration of servers, drive letters, and so on. The main point illustrated here is how we break down the tasks required into small bits, and execute them one at a time to create a complete installation routine. Here are a few guidelines for writing batch files for your organization: • Mapa drive letter (Z:\ in this case) to the root of your ADT 2007 installation folder to establish a “home base.” All Deployments and batch files can work relatively from there. • Break each large task down into smaller, more modular tasks; create many tiny batch file scripts which do one thing each and call them from a larger batch file. This makes things easier to manage over time. You can fix partial things independent of others. • Liberally insert “pause” commands in your batch files to halt processing, to check the progress and look for fatal errors. • Take into account spaces in commands and parameters; e.g. the username may be more than one word. • Make use of comments using “rem.” Registry files use ‘;’ to indicate a comment.

Preparation • Create the following batch files discussed in the next few pages. • Put each of these in the ADT 2007 Install\Install folder as directed below. • Place your modified DLL files and Registry (.reg) files in \04PostInstall, so they will be incorporated in those batch files at that point.

64 Advanced Architectural Desktop Installation Secrets

Step 1: Prepare the Machine for ADT 2007

Basics of Scripting the Uninstallation of ADT and Related Applications To automate software uninstallation, follow this basic approach. With ADT 200x and other Adesk applications installed, search the Registry’s Software Uninstall key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.

Look for all Autodesk related applications you wish to uninstall via scripting. Most applications' installation settings are identified here by the GUID of the program, which is a long 32-character hexadecimal number in brackets which uniquely identifies the product to Windows. A sample Registry key looks something like this:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0134A1A1-C283-4A47-91A1- 92F19F960372}

You will see the details of each entry in the right hand pane, i.e., software publisher, application name, and so on, so it’s fairly easy to find the apps you are looking for. The first 8 digits usually signifies the company that produces the software; much of Autodesk's software starts with "5783F2D7." I've provided the complete keys for many of the applications you will probably need to uninstall below. For each application, get the "UninstallString" value and read the data. It will usually be of the form "msiexec.exe /i[GUID].” For each application, copy and paste this Uninstall string into the batch file. Change the "/i" to "/x" to uninstall the product. The ‘/i’ switch allows you to modify the product's installed components with an option to uninstall. ‘/x’ will simply uninstall it. Add "/q" to the line to make the process quiet with no user interaction. Uninstall these apps in this order: DWF Viewer 4/5/6.x All Object Enablers DWG TrueConvert Express Tools ADT 2004/5/6 Ensuring that ADT is the last thing to be uninstalled will usually ensure that the uninstallations proceed most smoothly. However, as with most Windows programs, the uninstallation process may still leave bits and pieces around which may interfere with future installations. To COMPLETELY uninstall old versions and leave no trace behind, you must also: • Uninstall ALL Autodesk applications • Remove the HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk key • Remove the HKEY_CURRENT_USER\SOFTWARE\Autodesk key • Remove "C:\Program Files\Autodesk Architectural Desktop 200x" • Remove "C:\Program Files\Common Files\Autodesk" • Remove "%AllUsersProfiles%\Applicaton Data\Autodesk" It may be recommended to leave the old %AppData%\Autodesk\\ENU alone for migration purposes if you have customization there. However, this may not work if you've cleaned the Registry of Autodesk keys as above. Finally, defragment the HD - always a good IT practice before installing large applications.

65 Advanced Architectural Desktop Installation Secrets

Step 1 Batch Files

Install\2007.01 PrepPC.CMD rem 2007.01 PrepPC.CMD rem Map Z:\; Uninstall 2006; clean up local PC system; map the J:\ drive if exist z: net use z: /d if exist z: z: /d net use z: "\\ServerName\PCSetup\Apps\CAD\ADT 2007 Install" z: Call "install\01PrepPC\01 Uninstall ADT 2006.cmd" Call "install\01PrepPC\02 CleanUpAdeskApps.cmd" Call "install\01PrepPC\03 MapJDrive"

Install\01PrepPC\01 UNINSTALL ADT 2006.CMD rem 01 UNINSTALL ADT 2006.CMD rem Uninstall routine to uninstalling Autodesk apps rem Modify for your particular version of ADT and installed apps rem Live Enabler msiexec.exe /x{0A7DF499-93A3-4631-9F08-BD05C7559845} "C:\Program Files\Common Files\Autodesk Shared\leRemove.exe\" -v 40 rem ABS 200x Object Enablers msiexec.exe /x{3733C422-5F7C-48C6-A548-BAAB52CED4F9} msiexec.exe /x{5A97C7DB-DB73-4C38-AAED-FC4E1D904FBA} msiexec.exe /x{7BE7D472-855E-42F8-8F5B-86736BAC3642} rem Land Desktop 2005 OE msiexec.exe /x{B683590D-C55F-426F-9443-D3B309B18E95} rem Batch Drawing Converter msiexec.exe /x{5783F2D7-0221-0409-0000-0060B0CE6BBA} rem CAD Manager Tools if installed msiexec.exe /x{5783F2D7-0111-0409-0010-0060B0CE6BBA} rem DWF Viewer 6.x C:\PROGRA~1\Autodesk\AUTODE~1\Setup.exe /remove /q0 rem DWF Viewer 7.x msiexec.exe /x{9A346205-EA92-4406-B1AB-50379DA3F057} rem Autodesk TrueConvert msiexec.exe /x{5783F2D7-0221-0409-0000-0060B0CE6BBA} rem ADT 2005 Express Tools msiexec.exe /x{5783F2D7-0311-0409-0000-0060B0CE6BBA} rem ADT 2005 msiexec.exe /x{5783F2D7-0304-0409-0002-0060B0CE6BBA} rem ADT 2006 msiexec.exe /x{5783F2D7-4004-0409-0002-0060B0CE6BBA} rem Defrag the disk defrag c: -v pause

66 Advanced Architectural Desktop Installation Secrets

Install\01PrepPC\02 CLEANUPADESKAPPS.CMD rem 01A CLEANUPADESKAPPS.CMD rem REALLY removes all traces of these Autodesk applications from your system! rem Warning! Danger! Very Destructive! Use with Care! regedit /s “install\RemoveAutodesk.reg” rmdir "%appdata%\autodesk" /s /q rmdir "%allusersprofile%\Application Data\Autodesk" /s /q rmdir "%ProgramFiles%\Autodesk Architectural Desktop 2006" /s /q rmdir "%ProgramFiles%\Common Files\Autodesk Shared" /s /q pause

Install\01PrepPC\REMOVEAUTODESK.REG Windows Registry Editor Version 5.00 ; Called from 02 CleanUpAdeskApps.cmd ; Removes Autodesk software keys from HKCU and HKLM [-HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk] [-HKEY_CURRENT_USER\SOFTWARE\Autodesk]

Install\01PrepPC\03 MAPJDRIVE.CMD rem 03MapJDrive.CMD rem Map the J:\ drive letter to the “CAD Support 2007” share rem Note: No error checking is included. J:\ must be present before proceeding. rem remove any existing mappings and remap to CAD Support share if exist j: net use j: /d if exist j: subst j: /d net use j: "\\ServerName\CAD Support 2007" pause

Step 2: Creating the new User RoamableRootFolder

Install\2007.02 CREATEME.CMD rem 2007.02 CREATEME.CMD rem Creates the currenly logged on user’s RoamableRootFolder if “%username%”==”Zaphod” goto wronguy goto go

: go z: cd install\02CreateUser 2007_CreateUser %username% goto end

: wronguy Echo You cannot be the ‘Zaphod’ user to do this goto end

: end echo Done! Pause

67 Advanced Architectural Desktop Installation Secrets

Install\2007.02 CREATEALLUSERS.CMD rem 2007.02 CREATEALLUSERS.CMD rem Pre-Installation Step rem Set up all users listed in users.txt (one user name per line) rem Allows multi-word user names z: cd install\02CreateUser For /f "delims=," %%i in (users.txt) do 2007_CreateUser %%i cd.. pause

Install\02CreateUser\2007_CREATEUSER.CMD rem 2007_CREATEUSER.CMD rem Usage: 2007_createuser rem Create User folder tree rem - Copies the "J:\Users\Zaphod\" folder tree to J:\users\. rem - Renames any "zaphod" files to %name% parameter rem - Find/replace 'zaphod' string to the %name% in certain files rem Establish the user name based on the passed parameter (may be two words) set name=%1 %2 if "%2"=="" set Name=%1 rem Copy the user template folder (includes \ADT 2007 and \My Tool Catalogs) xcopy "j:\users\zaphod" "j:\users\%name%" /E /I rem Rename files from 'zaphod' to rename "j:\users\%name%\ADT 2007\Support\zaphod.arg" "%name%.arg" rename "j:\users\%name%\ADT 2007\Support\zaphod.mnl" "%name%.mnl" rename "j:\users\%name%\ADT 2007\Support\zaphod.cui" "%name%.cui" rename "j:\users\%name%\ADT 2007\Support\zaphod.mnr" "%name%.mnr" rename "j:\users\%name%\ADT 2007\Support\zaphod.cus" "%name%.cus" rename "j:\users\%name%\ADT 2007\Support\zaphod.lsp" "%name%.lsp" rename "j:\users\%Name%\ADT 2007\Support\Support\Profiles\Zaphod" "%name%" rem Replace all occurances of 'Zaphod' in files with %name% call 2007_FindReplace %name% set name= echo Done. pause 2007_FINDREPLACE.CMD rem 2007_FINDREPLACE.CMD rem Usage: 2007_Findreplace rem Replaces all instances of the word 'Zaphod' with in specified files rem using the XCHANGECL shareware utility rem Also fixes a template .REG file to add a personal tool catalog rem to the user's Catalog Library rem NOTE: Watch for Word Wrap rem Establish the user name based on the passed parameter (may be two words) set Name=%1 %2 if "%2"=="" set Name=%1 set folder=j:\users\%Name%\adt 2007\Support rem Replace "zaphod" with in each of these file types xchangecl -C-B "%folder%\*.mnl" /zaphod/"%Name%"

68 Advanced Architectural Desktop Installation Secrets xchangecl -C-B "%folder%\*.lsp" /zaphod/"%Name%" xchangecl -C-B "%folder%\*.cui" /zaphod/"%Name%" xchangecl -C-B "%folder%\*.arg" /zaphod/"%Name%" xchangecl -C-B "%folder%\Profiles\%Name%\profile.aws" /zaphod/"%Name%" rem Fix ‘AddMyToolCatalog.reg’ to set the user’s Tool Catalog to the username xchangecl -C-B "j:\users\%Name%\My Tool Catalogs\AddMyToolCatalog.reg" /zaphod/"%Name%" rem Fix the user’s MyToolCatalog.atc file to reference the user’s name xchangecl -C-B "j:\users\%Name%\My Tool Catalogs\MyToolCatalog.atc" /zaphod/"%Name%" set Name= set Folder= echo Done. Pause

AddMyToolCatalog.REG REGEDIT4 ; This is a Prototype Registry file to add the user’s Tool Catalog to ; their Catalog Library. It is created by saving the catalog as a .REG file ; in the Content Browser.

; IMPORTANT: Place this file in J:\Users\Zaphod\My Tool Catalogs\. It will ; be copied to each user as part of CreateUser.CMD, and modified to have the user’s ; name in place of ’Zaphod’ before being imported into the Registry during Step 4.

; Watch for word wrap

[HKEY_CURRENT_USER\Software\Autodesk\Autodesk Content Browser\50\RegisteredCatalogs\{908D9886-3CB4-489F-AD28-42C2AB1A9D3D}-Catalog] "ItemID"="{908D9886-3CB4-489F-AD28-42C2AB1A9D3D}" "Url"="J:\\users\\zaphod\\My Tool Catalogs\\MyToolCatalog.atc" "DisplayName"="Zaphod's Tool Catalog" "Description"="" "Image"="J:\\users\\zaphod\\My Tool Catalogs\\Images\\me.png" "CoverPage"="" "Publisher"="" "ToolTip"="" "Type"=dword:00000002

69 Advanced Architectural Desktop Installation Secrets

Notes on 2007_CREATEUSER.CMD CREATEUSER.CMD is the main batch file which creates the user’s RoamableRootFolder from the ‘Zaphod’ template folder. It is called using a user’s name as a replaceable parameter in the form 2007_createuser e.g. 2007_createuser Bob Jones Or, more commonly, 2007_createuser %username% The first thing it does is to copy the entire ‘J:\Users\Zaphod\’ template folder to J:\Users\. This includes the \ADT 2007 and \My Tool Catalogs folders. Inside the ADT 2007 folder are files which are named “zaphod.*,” which were created as part of our development process (zaphod.cui, zaphod.arg, and so on). So, the next thing it does is renames those files to accordingly. Then, it calls “2007_findreplace.cmd,” passing the name parameter to that batch files, which replaces the ‘Zaphod’ string with that name in the file types listed. The next thing it does is to replace ‘Zaphod’ with the name parameter in two additional files to properly set up the user’s Tool Catalog Library: AddMyTooLCatalog.reg and MyToolCatalog.atc. The reason this batch file uses a parameter instead of simply “hard coding” the %username% environment variable is so that you can write something like CreateAllUsers.cmd, which can pass different names to the CreateUser batch file to automate setting up of more than one person at a time. That way you do not have to be logged in as the user to create the folders.

Notes on 2007_FINDREPLACE.CMD The 2007_FINDREPLACE.CMD batch file uses a 3rd party utility called “xchangecl.exe,” which is a shareware program for searching and replacing text in ASCII files. It is available at http://www.sadmansoftware.com/xchangecl/http://www.sadmansoftware.com/xchangecl/ There are lots of search-and-replace utilities available on the Internet. I am not affiliated with the authors of Xchangecl.exe in any way; I just found that this works very well for our needs here. You might also want to try “Wingrep” available at http://www.wingrep.com/download.htm. As shown above, I am using this utility to replace the word ‘Zaphod’ with the user name (passed as an argument to the batch file) in all MNL, LSP, CUI, and ARG files in the user’s RoamableRootFolder. This remaps the RoamableRootFolder’s contents to the username properly.

Notes on 2007.02 CREATME.CMD and 2007.02 CREATEALLUSERS.CMD 2007.02 CREATEME.CMD simple launches the CREATEUSER with the current user’s UserName as a parameter. It is used to create the RoamableRootFolder for the currently logged-on user as part of a complete installation process. 2007.02 CREATEALLUSERS.CMD is an optional batch file which allows you to create a RoamableRootFolder for ALL of your users in one shot. You do this by creating a “users.txt” file in the \02CreateUser folder, which has all of your users listed with one user per line. This batch file simply feeds each user name listed in the text file to the 2007_ CREATEUSER.CMD and thus the 2007_FINDREPLACE.CMD batch files, creating a RoamableRootFolder for each person and properly making the text substitutions.

Notes on AddMyToolCatalog.REG This is a prototype Registry file which is located at J:\Users\Zaphod\My Tool Catalogs, and copied to the user’s folder via CREATEUSER.CMD. When imported into the Registry, it will add the user’s Tool Catalog, which is located at J:\Users\\My Tool Catalogs\MyToolCatalog.atc, to their personal Catalog Libary. The FindReplace batch file replaces any instance of “Zaphod” with the user’s name, so their Content Browser Library will have it properly homed to their user path, and the catalog name will be their Windows login name.

70 Advanced Architectural Desktop Installation Secrets

Step 3: Installing ADT 2007

Install\2007.03 INSTALLADT.CMD rem 2007.03 INSTALLADT.CMD rem Install ADT 2007 with all the fixins z: call install\03nstallADT\InstallADT2007.cmd

Install\03InstallADT\INSTALLADT2007.CMD rem 2007.03 INSTALL ADT 2007.CMD rem Requirements: rem 1. You must be logged in as the primary user of the PC rem 2. The user’s RoamableRootFolder MUST have been created on J:\ rem 3. Z:\ maps to the root of the server’s ADT 2007 installation point rem If no user folder, bail if not exist "j:\users\%username%\adt 2007" goto noj z: if not exist AdminImage goto noz rem Delete any existing log files del adminimage\log\*.log rem Install ADT using the Corporate Deployment AdminImage\deploy.exe "BHH-T" rem Fire up the installation log notepad.exe adminimage\log\bhh-t.log pause goto end

:noj echo There is no J:\Users\%Username% folder - installation failed. echo Please create the Users folder first. goto end

:noz echo There is no Z:\ installation drive - installation failed. echo Please map the Z:\ drive accordingly. goto end

:End echo Done. pause

Step 4: Post Installation Tasks

Install\2007.04 POSTINSTALL.CMD rem 2007.04 POSTINSTALL.CMD rem Perform post installation updates z: cd install\04PostInstall call 01_SetRoamableRoot.cmd call 02_PostInstallTasks.cmd

71 Advanced Architectural Desktop Installation Secrets

Install\04PostInstall\01_SETROAMABLEROOT.CMD rem 2007_SETROAMABLEROOT.CMD rem Set the "RoamableRoot" path in the Registry for this ADT user as referenced rem by the user's ARG Profile rem This must be performed in the context of the currently logged-on user rem To be performed immediately after the installation of ADT 2007 rem You alo need to run this whenever you add a new user to a particular machine, rem because it is always specific to the user. rem Watch for Word Wrap reg add HKCU\Software\Autodesk\AutoCAD\R17.0\ACAD-5004:409 /v RoamableRootFolder /t REG_SZ /d "J:\users\%username%\ADT 2007\\" /f pause

Install\04PostInstall\02_POSTINSTALLTASKS.CMD rem 02_POSTINSTALLTASKS.CMD rem Assumes we are in the 04PostInstall folder rem Must be performed while logged in as the final user rem Replace the desktop icon copy /y "Autodesk Architectural Desktop 2007.lnk" "%allusersprofile%\Desktop\" rem Copy over the modified DLLs (better dialogs) copy /y "*.dll" "C:\Program Files\Autodesk Architectural Desktop 2007\" rem Import Corporate Block and Content libraries into current user's TCL regedit /s Add2007BlockLibrary.reg regedit /s Add2007ContentLibrary.reg rem Import the user's new personal Tool Catalog into their TCL regedit /s "j:\users\%username%\My Tool Catalogs\AddMyToolCatalog.reg" pause

Installation and Post-Installation Batch File Notes As you can see, the InstallADT2007.CMD batch file simply launches the deploy.exe file with the Corporate Deployment we created earlier. It also launches the log file created so you can ensure the installation worked before proceeding further. In the \04PostInstall folder, place all of your modified DLLs and ADT 2007 desktop icon to be copied to each user’s machine. Also place any .REG registry files here to add Catalogs as described in Section 15. After ADT is installed, there are only three tasks to complete: (1) Set the RoamableRootFolder setting in the Registry, (2) copy over additional DLL/icon files to the user’s PC, and (3) import the Corporate Tool Catalogs and the user’s Tool Catalog into their Content Browser Library. These are split into two separate batch files for flexibility. You can add additional .REG registry files to this folder which can further tweak ADT to your particular situation. With a proper knowledge of how ADT works at the Registry level, it is possible to make very detailed changes easily. For example, you can disable Communication Center, set grip colors (which for some reason aren’t stored in the user profile, which is weird) and other things. The easiest way to do these things is identify the particular key whose values you need to use, export that via the Registry editor, and re-import it using the “regedit /s” command as shown above.

72 Advanced Architectural Desktop Installation Secrets

18 Installing ADT 2007 on Client Machines

Overview Everything that we've been doing up until now has led to this point - actually installing ADT on our users' machines. The whole point of creating multiple deployments, installing it, testing it, tweaking it, uninstalling it, reinstalling it, tweaking it again, etc. has been to make THIS step as quick, painless, error free and above all predictable as possible. The scripts created in the previous section demonstrate how to write batch files to combine many tasks into one. What we will do now is lay out a procedure for installing ADT easily across the board using those batch files. Status: 1. We have a fully configured Corporate Deployment sitting on our server used to create a complete local installation of ADT 2007. 2. We have a completely configured and tweaked prototype RoamableRootFolder. 3. We have a prototype server-side Tool Catalog for the user. 4. We have a template User Profile which points to our back-end customization properly. 5. We have hacked modified some DLL files for better dialog boxes which will be slipstreamed into the installation process. 6. We have a new desktop icon which points the ADT program to use the logged-on user's personal profile (loading it from the .arg if not present). 7. We have made our batch files which will create a user’s RoamableRootFolder from the prototype, performing the appropriate text search and replace actions to home it to the username. 8. We have made batch files which will uninstall previous versions, install the Corporate Deployment, copy over additional files, and set the proper Registry settings to properly adjust the installation to suit. 9. The usual logged-in user for that machine has at least local Power Users right to install and modify software.

When installing any major application like ADT, it's imperative that at least some basic IT housekeeping be done on the user's machines before installation to ensure success. Depending on your IT infrastructure, your machines may be locked down with policies in place that prevent the end user from installing software or drivers. Or, your machines may be less centrally scrutinized where users enjoy Local Admin rights and can do what they want. Either way you need to make sure that the PC is in good enough shape to install ADT without issue. In this particular procedure, we are going to assume that the local user has Admin rights to the machine and can install software. This makes installing and configuring the software slightly easier for the purposes of discussion.

73 Advanced Architectural Desktop Installation Secrets

Typical Installation Procedure 1. Log onto the user's machine using the user's account/password. 2. Create a Network Place which points to your ADT 2007 installation source, e.g. \\ServerName\PCSetup\Apps\CAD\ADT 2007 Install 3. Navigate to the \Install folder, where we have placed all of our script files for installation. 4. Fire off these batch files in order: a. 2007.01 PrepPC.cmd b. 2007.02 CreateMe.cmd c. 2007.03 InstallADT.cmd d. 2007.04 PostInstall.cmd 5. Defragment the hard drive for good measure. 6. Fire up ADT 2007 and make sure everything works. It’s important to note that we did not combine everything into a single batch file, because if something goes wrong in the installation the whole thing would collapse.

Creating all user’s RoamableRootFolders If you want to do things a little more streamlined, you can do the following. We will create all of the users’ RoamableRootFolders in one big swoop, saving a step to bee performed on each PC: 1. As part of the development process, create a “user.txt” file which has each username in your comapny listed on each line. 2. Run the Install\01PrepPC\03 MAPDRIVES.CMD batch file to properly map drive letters on your PC (if not already in place). 3. Run the Install\2007.02 CREATEALLUSERS.CMD batch file. This creates all of the RoamableRootFolders for all of your users at the J:\Users folder tree. 4. When logged into each workstation (as the primary user), proceed to install ADT using these batch files in order: a. 2007.01 PrepPC.cmd b. 2007.03 InstallADT.cmd c. 2007.04 PostInstall.cmd

Installing ADT using the local Administrator account If your IT policies are locked down such that users cannot install software, you may opt to install ADT as the Local or Domain Administrator (which also has local Admin rights). In this case, you can still use these batch files; simply create the “administrator” RoamableRootFolder before proceeding with Step 3. Once ADT is installed, you will need to log in as the user and proceed with Step 4.

Troubleshooting the RoamableRootFolder If you ever have a problem with ADT that requires a “Registry fix,” your custom setting for RoamableRootFolder may be set back to the Default (to %AppData%\Autodesk\ADT 2007\enu). To fix this, simply run the “SetRoamableRoot” batch file while logged in as the user. Sometimes you may need to rebuild portions of your RoamableRootFolder; you can easily do so by copying files from the master J:\Users\Zaphod\ADT 2007 folder.

74 Advanced Architectural Desktop Installation Secrets

Thank you

Thank you for attending the class and your interest in this course material. I hope you have learned some of the more advanced installation techniques available when you undertake the ADT 2007 (and beyond) deployment and installation process at your company.

Contact Information If you have any questions about any of this material, you can reach me via email at either of these addresses: mailto:[email protected] (work) or mailto:[email protected] (home)

Regards, Matt Stachoni CAD Manager/MIS Bernardon Haber Holloway Architects PC BHH | Tait Interiors LLC ARCHITECTURE INTERIOR DESIGN STRATEGIC PLANNING

Three Mill Road, Suite 211, Wilmington, DE 19806 T 302-655-3804 x4520 F 302-655-3968 E mailto:[email protected]

75