14 Replies Latest reply on Feb 4, 2019 12:23 PM by Paul Wyndham

    Fully automating SW Image Installations (What SolidWorks doesn't tell you...)

    Scott Wheeler

      This will hopefully save some fellow CAD Admins and users headaches, since a lot of these details aren't well documented and only learned through trial & error.

       

      Our particular installation scenario is for 90+ users across multiple sites with the majority of SolidWorks software packages installed, including PDM, Electrical, all the Simulations, Composer, Inspection,etc.  We have a shared Toolbox folder within the PDM Vault, which adds complexity to the install process, and I also have a handful of users who only use E-Drawings as a viewer, but still need access to PDM Vault files.  In past years this was a manual roll out, where the Admin Image was configured and e-mails were sent to users for them to click on hyperlinks and run the install (.hta) file.  The challenge with this was ensuring users actually do the install, and then users have to wait 1-3 hours for an install to complete.

       

      This year we automated this process, so as soon as the servers are updated we push the install out.  This results in users simply leaving their computers running, logged in, screen locked at the end of the day.  With the scripts below the installations happen off hours and are 100% hands-free.  For a user base as large as ours, this is a great approach to take, but does require some specific setup steps.

       

       

      So the basics I assume most CAD admins would know..but here's to putting all relevant info in one thread/spot.  Download the desired version/service pack installer and then run.  I strongly recommend selecting the option to download all files versus a straight up install at this point.  Once downloaded, you can then create an Admin Image.  I first create the Admin Image on my local drive while I'm developing and testing.  (i.e. C:\SW Images\2018)  Once testing is complete, use RoboCopy to confidently copy all files to a shared network folder for distribution purposes.  Note, all users will need at least read-access to this network folder location.  Read-Write is not needed, but if that permission is enabled it allows you to see log files for each computer the image was installed on.  (That can be useful to debug a failed install.)

       

      Some suggestions on the Admin Image settings to avoid headaches.

      • Make your Global settings the "Default" installation you'd want for any computer.  This allows any computer to have SW installed without being listed in a specific Group in your admin image.
        • For some, default would best be only the core SolidWorks files and then Groups could be created for additional add-ins to be installed on designated computers.
        • For others, Global Settings should be a default where full SolidWorks and all add-ins are installed. This is less maintenance initially and over time as computers come and go.
      • For Client Installation Options, check "Do Not Activate Automatically".  Odds are you have a SolidNetWork License Manager if you are trying to automate the installation process on many computers, and are not upgrading machines with static licenses.
      • For Administrative Options, check Run a Program after installation and point it to your BAT file.(see below)  Also check "Yes, I want to join" for participating in the Customer Experience.  This allows you to use the CAD Admin tool in the SolidWorks Customer Portal.
      • For the Toolbox/Hole Wizard options, set this folder to C:\Temp.  (This is temporary, since in our case the Toolbox is a shared folder in the PDM Vault)

       

       

      I prefer to install SolidWorks outside of an image install on my sandbox computer, but the image could be used at this point to for the first install.  Once installed, open and run the SolidWorks software, take time to configure all the various settings, such as File Locations for templates, any menu customization's, etc.  Do not simply copy last year's CopySettingsWizard sldreg file.... this is bad practice.  It's well documented oddball errors occur when doing this, where options are added, removed, or moved within menus.  I find it works best to have two computers running side by side and evaluate the options to see what is new.  Also, set the Add-Ins to your desired preference for how you want users to initially run SolidWorks.

       

      Once you are happy with all this, then use the Copy Settings Wizard to create and save a new .sldreg file to a designated folder.  I create a folder for all my custom files, again locally before copying to a network folder (C:\SW Images\MySettings\)  Now, make a copy of this .sldreg file and remove the 'sld' portion of the filename, which I save as swSettings2018.reg.  This makes it a standard reg file which you can then just add to a computer to push the settings.

      Note - I'm well aware that in 2017 SolidWorks added functionality to push and lock (if desired) these customizations found in the Copy Settings Wizard.  However, in 2017 there were many bugs with this and in 2018SP2 some bugs were fixed while several others were created.  It simply is not reliable and a major headache to avoid for now...

       

      Go to RegEdit and export Computer\HKEY_CURRENT_USER\Software\SolidWorks\AddInsStartup, save in MySettings\AddInStartup.reg

       

      So at this point you have your Admin Image files in one folder and two .reg files in another.  Now a BAT file is needed to start tying it together.  Create a BAT file by just renaming a .txt file to .bat, save in MySettings folder, and using Notepad to create and modify the contents.  Here is my "Run After.BAT" file and I'll explain each line's function:

       

      @echo off

      echo .

      echo .

      echo .     *******************************************************

      echo .     *  Applying <company name> custom SolidWorks settings. *

      echo .     *         Please do not close this window!            *

      echo .     *******************************************************

      echo .

      echo .

      So this section above just displays on the CMD window what is going on.  This BAT file runs after the SW Image has completed the install, so the Installer window is still up at 100% install and then this BAT file runs.

       

      : Install Custom Properties add-in

      : Copy files

      xcopy /s /i /q /y "\\corp.companyname.com\Global SW Deployment\SolidWorks\EhCanadian Consulting, Inc" "C:\Program Files\EhCanadian Consulting, Inc"

      : Register the DLL

      cd /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319

      RegAsm.exe "C:\Program Files\ehcanadian Consulting, Inc\Copy Properties\CopyProperties.dll" /codebase /s

      : Push Registry Keys

      START /WAIT REGEDIT /s "\\corp.companyname.com\Global SW Deployment\SolidWorks\MySettings\HKCU Copy Properties.reg"

      START /WAIT REGEDIT /s "\\corp.companyname.com\Global SW Deployment\SolidWorks\MySettings\HKLM Copy Properties.reg"

      This above section is for installing a custom API that we had developed externally, but this applies for any API.  A few things to take note of.

      • The API's install files are copied with XCOPY from a network folder to the user's local folder with certain switches enabled
      • Network folder paths use the UNC folder path, not a mapped letter folder path.  (You can't guarantee your users will have the same mapping.)

       

      : Push custom SolidWorks Settings

      START /WAIT REGEDIT /s "\\corp.companyname.com\Global SW Deployment\SolidWorks\MySettings\swSettings2018.reg"

      This section is pushing the reg file created from the CopySettingsWizard. 

       

      : Set status of add-ins in SolidWorks

      START /WAIT REGEDIT /s "\\corp.companyname.com\Global SW Deployment\SolidWorks\MySettings\AddInStartup.reg"

      This section pushes the status of all the SolidWorks Add-Ins.  This is useful, because the Image Install offers no control, and by default will enable certain add-ins.  For example, Inspection is always enabled.  It depends on the add-in, SolidWorks does not universally set add-ins on or off.  If you have floating licenses, this is a great way to specify an initial status of add-ins.

       

      : Set ToolBox Location to PDM Vault

      reg add "HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2018\General" /v "Toolbox Data Location" /t REG_SZ /d "C:\EPDM\SW Tool Box" /f

      Recall in the Admin Image the Toolbox was set to C:\Temp.  Why?  Because if the installer is done with the Toolbox pointing to a PDM Vault folder it will trigger a PDM login and halt the installer process.  By telling the installer to use a non-Vault folder, the PDM login dialog never pops up.  This registry add re-points the Toolbox folder to the PDM Vault folder.

       

      : Set Last Open Folder

      reg add "HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2018\General" /v "Last user path" /t REG_SZ /d "C:\EPDM" /f

      This is a small nitpick, but a variety of settings in SolidWorks are based on the Last Used folder or selection.  When you export your CopySettingsWizard it also grabs the Last Opened Folder setting.  Rather than have all my users initially opening files in my test environment folders, I default this to the PDM Vault root folder.

       

      : Reboot computer

      echo .

      echo .

      echo .     *******************************************************

      echo .     *      SolidWorks installation was successful.        *

      echo .     *      Computer will now restart in 30 seconds.       *

      echo .     *******************************************************

      echo .

      echo .

      timeout /t 5

      shutdown.exe /r /t 25

      This last section simply forces a reboot at the end of the installer process.  The timeout allows the command window to be displayed for the status, and then 25 seconds are allowed to pass before the forced restart is executed.

       

      The last key to the puzzle is pushing the install process itself.  We use our Active Directory database to push to a group of computers with the current version of SolidWorks installed.  Another BAT file should be created with the two items below in it to successfully push an install.

      reg add "HKCU\Software\SolidWorks\Applications\PDMWorks Enterprise\Security" /v "EULA Accepted 2018 18 2 %COMPUTERNAME%" /t REG_SZ /d "Yes"

      The first command is needed to avoid having a user accept the End User License Agreement dialog box that pops up during the install process.  Note it is specific to the version of software and the Computer name.

      "\\corp.mycompany.com\Global SW Deployment\SolidWorks\2018\startswinstall.exe" /install /now /showui

      The last command  is the actual command to launch the SW Image installer.  It forces the install to occur immediately, and shows the installation dialgox box.  The only reason to show the UI for an automated install script like this is when something goes wrong.  The user comes back to their computer expecting the update to be done, and if it gets stuck somewhere at least there is some visible clue as to where it got stuck and that something isn't right.

       

      That's about it.  Hopefully some of these tips help out some folks!

        • Re: Fully automating SW Image Installations (What SolidWorks doesn't tell you...)
          Mikko Laine

          Very good post!

           

          I'm our PDM Admin and the user with most knowledge in SW usage and administration at our company but our "outsourced" IT department won't grant me permissions to fully administer SW, so I have to give our IT support guidance how to set up the admin images... So regarding this, should it be possible somehow to attach a PDM Vault and Toolbox during the installation of a fresh copy of SW?

           

          Another question is about deleting the Toolbox files installed into C:\Temp\? Does your company configure the user systems so that the temp is emptied periodically?

          • Re: Fully automating SW Image Installations (What SolidWorks doesn't tell you...)
            David Mandl

            TL;DR

             

            Just kidding, I'm definitely bookmarking this for future reference.

            • Re: Fully automating SW Image Installations (What SolidWorks doesn't tell you...)
              Chris Saller

              Thank for the info.

              Curious, any changes needed for users using either PDM, PDM Standard, or PDMWorks?

                • Re: Fully automating SW Image Installations (What SolidWorks doesn't tell you...)
                  Scott Wheeler

                  In terms of what I posted, I can't think of why it would be specific to the version of PDM installed.  That said, within the SW Image settings there are options for PDM to set.  Specifically, if you'll want to specify PDM Professional if that is what you have, because by default Standard is selected and it can create headaches when the functions of Professional mysteriously do not work or a user cannot login all of sudden.  And by "default", also be aware that sometimes a simple Service Pack upgrade will affect your settings when making a new Image based off an existing Image settings.  Never trust this, I've been burnt too many times on Service Pack upgrades of images.  Lastly, PDM options in the Image settings exists for the various add-ins for software you may want to use, from SolidWorks, AutoCAD, DraftSight, and even MS Office products.

                • Re: Fully automating SW Image Installations (What SolidWorks doesn't tell you...)
                  Paul Wyndham

                  Nice write-up Scott.

                  Some things I have found that have helped my past installation to be more successful.

                   

                  *** Close applications that are running that might interfere with the installation: WINWORD, EXCEL, POWERPNT, OUTLOOK, iexplore, dsHttpApiService, dispatcher, SLDWORKS, EdmServer, ViewServer, ConisioAdmin, sldProcMon, sldworks_fs, swVBAServer, remotesolverdispatcherservice, explorer

                   

                  Hopefully the users exited out of everything on their own, but you never know.

                  You can user a line like TaskKill /f /im "winword.exe" to close word. If you are running as a script in on a locked computer it might stop the install if word wants the user to save the file. So, that is up to you. Forcing a restart would dump any changes as well.

                   

                   

                  *** Think about the options to Uninstall the previous version, upgrade it or install a new version along side it.

                  If possible I would prefer to uninstall the old version as it allows for a cleaner install. Another option is to have the new installation go to a folder other than the SolidWorks Corp folder. If you allow it to default to that location you could start to get a pile-up of SolidWorks (1), SolidWorks (2), SolidWorks (3) ... SolidWorks (N) folders. It then starts to get hard to troubleshoot some issues if you don't know exactly where the executable is. If you create a SolidWorks 2019 folder for example it makes it straight forward. Or Uninstall the previous version and have it completely remove all of the old version including registry settings.

                   

                  *** As Scott pointed out DEFINITELY make sure the Inspection add-in is not turned on by default when the installation completes. If you have 600 users and one inspection license the one guy that needs it will never get it because everyone else will grab it any time it is available when they start SolidWorks.

                   

                  *** The command to silently run view setup from the cvs file is: ViewSetup.exe PDMWEVault.cvs /q (that came from the install document for convenience).

                   

                  *** Pre-Requisites can cause problems. If you use the admin image you might have issues if you already have the same or newer version of a pre-req installed. Sometimes the pre-req installer notices that the version is already installed so it exists out of that installation. The admin image notices that the pre-req did not finish installing but doesn't know why so it errors out. I have not tried this out on 2018 or 2019, so it might have been fixed.

                   

                  *** Is the admin image right for you or would SCCM be better?

                    • Re: Fully automating SW Image Installations (What SolidWorks doesn't tell you...)
                      Scott Wheeler

                      Thanks Paul, some great additional info.  For this year's roll out I already did create a pre-install bat file to kill some of the processes you listed after seeing last year's auto installs halted by open MS apps.  But you pointed out some I didn't have, so they have been added, thanks!

                       

                      Also, I discovered that the add-in registry key used to set the status is specific to the version.  So my test install resulted in my add-ins configuration not working, and after reviewing the registry I saw twice as many listings.  Deleted and restarted, and I could see new registry key letters/numbers for each add-in that were different than last year.  So each year this registry key for setting add-in status values will need to be recreated.

                       

                      On the SCCM, I'm not too familiar with that.  It sounds more IT-based than what I'd have permission to use.  In my case as the CAD admin, I have only local admin install permissions on computers, not network based, and I also am not able to login to servers that host our server-based software like EPDM, Electrical collaborative server, and license manager.  I do run the EPDM admin tool and manage all the SolidWorks installation details, so it's a shared responsibility with IT.  It can be difficult sometimes for diagnosing server-based issues, but a separate sand box environment I have setup with a full PDM database and archive server environment enable me to work on upper level things offline, such as SQL management, archive configurations, etc.  This enables me to spot issues and then relay them to IT to addresss on the "live" vault.

                      • Re: Fully automating SW Image Installations (What SolidWorks doesn't tell you...)
                        Calen Kaneko

                        Paul, like Scott I have no admin access and have to work with IT to get things set up without direct access to any of the tools. Our IT department uses SCCM to deploy everything and using it in combination with a solidworks administrative image has been difficult in the past. Do you use SCCM? If so, do you use an administrative image? If not, do you have multiple SCCM deployments with different installation options?

                         

                        Thanks

                          • Re: Fully automating SW Image Installations (What SolidWorks doesn't tell you...)
                            Paul Wyndham

                            At my previous position I had to create the installer for 600 to 1000 users by my self. Those users were spread across many different business groups and had different configurations. I had no way of knowing what user was going to install the software and what the computer name was they were installing on. I could only partially identify a user by IP address because the IP addresses were only split up to the location level. If there were 5 businesses in one location the users would be interspersed in the same IP range. That was the case even if there were different buildings.

                             

                            I was never notified if a user left the company, was recently hired or got a new computer.

                            Luckily the RnD users that used SolidWorks all had admin rights on their computers.

                             

                            I created a dedicated application that would use the SolidWorks install files out of the admin image to install SolidWorks using the msiexec or exe commands. I worked out some xml files that I could change depending on location and business units that the users were in. I then published links to the application and gave instructions to the users to select their location and business group from some dropdown lists. Sometimes we had locations that were in neighboring cities but I only had a network drive at one location. In those situations the user would have to select their location, otherwise it would default to their location. It would default to the language of their country unless they all used English, otherwise they could change that if they were in the USA for example but wanted Portuguese to be their language.

                             

                            That usually worked out pretty good. Sometimes a user would forget to change one of the dropdowns and we would have to do some extra steps like manually creating their local view or running the settings wizard.

                             

                            The application checked for and installed the prerequisites and all the related add-ins before or after the installation of SolidWorks. I also had it load the SolidWorks settings, create the local view for their vault, and create a listing in "Programs and Features" that would uninstall everything in an order that I found to work the best.

                             

                            Initially I had to make a lot of changes to the application due to differences in user machines, but after the first couple locations used it I got it pretty hammered out to where it rarely failed. The application also creates a log file so I could see what or where it was failing for a user.

                             

                            At my current employment we over see SolidWorks upgrades but a different IT group actually does the SCCM implementation and deployment. I don't have visibility into how they set that up or how they run it on the users machines. Maybe I will have more information on that for the next upgrade since I started after the upgrade to 2018 last fall.

                        • Re: Fully automating SW Image Installations (What SolidWorks doesn't tell you...)
                          Scott Wheeler

                          So for my upcoming 2019 install I wanted to provide an update from last year's, and thought I'd share what I've created.  Hopefully it helps some folks out.

                           

                          First, here is the "IT Install Script.bat" file, which is what our IT will use to push the installs out once our servers have been upgraded:

                          @echo off

                           

                          echo .

                          echo .     ***********************************************************************

                          echo .     *            SolidWorks will install in 30 seconds!                   *

                          echo .     *                                                                     *

                          echo .     *   All open programs will be closed, any unsaved work will be lost!  *

                          echo .     *                                                                     *

                          echo .     *                    Press CTRL-C to abort!!!                         *

                          echo .     ***********************************************************************

                          echo .

                          echo .

                          timeout /t 30 /nobreak

                          echo .

                          echo .

                          echo .

                          echo .     ***********************************************************************

                          echo .     *             SolidWorks is installing in the background.            *

                          echo .     *                                                                     *

                          echo .     *               DO NOT USE YOUR COMPUTER AT THIS TIME!                *

                          echo .     *                                                                     *

                          echo .     *                  DO NOT TURN OFF YOUR COMPUTER!!!                   *

                          echo .     ***********************************************************************

                          echo .

                          echo .

                           

                          : Start the install (.hta) SolidWorks Image install file

                          start "\\corp.mycompanyname.com\Global SW Deployment\SolidWorks\2019\startswinstall.exe" /install /now

                          A few things to point out.  With the warning message popping up about Windows 7 no longer being supported after 2020SP5, it requires that the startswinstall.exe be run without the User Interface being displayed.  Otherwise, the dialog box pops up and the automated install just hangs.  And now, without the UI being displayed, SolidWorks installs completely in the background and it appears like your computer is doing nothing, except for the CPU coolers cranking up in speed.  So it's a good idea to display to the end user a background installation is going on, and to not touch the computer.  Also, one of those lessons learned to pass on... sometimes users aren't happy when they are forced to install software while in the middle of something, so displaying a message about how they can abort the install is recommended.  We push our installs Friday after close of business, asking users to leave the computers turned on and screen locked... but apparently a few were working late on a Friday last year and weren't happy to see a SolidWorks install trying to take over their computer.

                           

                           

                          Here is my "Run before 2019.bat" file contents, which is called out from the Admin Image settings to execute before the SolidWorks installer kicks off:

                          @echo off

                           

                          echo .

                          echo .     ***********************************************************************

                          echo .     *            SolidWorks will install in 30 seconds!                   *

                          echo .     *                                                                     *

                          echo .     *   All open programs will be closed, any unsaved work will be lost!  *

                          echo .     *                                                                     *

                          echo .     *                    Press CTRL-C to abort!!!                         *

                          echo .     ***********************************************************************

                          echo .

                          echo .

                          timeout /t 30 /nobreak

                           

                          : Close open PDM service and all MS apps

                          taskkill /f /im SLDWORKS.exe

                          taskkill /f /im sldworks_fs.exe

                          taskkill /f /im sldProcMon.exe

                          taskkill /f /im swVBAServer.exe

                          taskkill /f /im EdmServer.exe

                          taskkill /f /im OUTLOOK.EXE

                          taskkill /f /im WINWORD.EXE

                          taskkill /f /im EXCEL.EXE

                          taskkill /f /im iexplore.exe

                          taskkill /f /im POWERPNT.EXE

                          taskkill /f /im WINPROJ.EXE

                          taskkill /f /im VISIO.EXE

                          taskkill /f /im lync.exe

                           

                          : Sign off on the specific Version AND Service pack PDM EULA to allow the install

                          reg add "HKCU\Software\SolidWorks\Applications\PDMWorks Enterprise\Security" /v "EULA Accepted 2019 27 1 %COMPUTERNAME%" /t REG_SZ /d "Yes" /f

                           

                          echo .

                          echo . Successful Pre-Install bat execution.

                          echo .

                          timeout /t 5 /nobreak

                          Last year I didn't have a Run Before file, but learned the hard way that 2018 would not install if MS Outlook was open.  And a few users left SolidWorks running, I think trying to sabotage my attempt at automating the install.  So, in an effort to make it more idiot proof I am now using a batch file before the SolidWorks installer to "clean" things up by task killing some key processes.  Lastly, I set a registry key value for the PDM installer to proceed without hanging up on a dialog box in the middle of the install regarding the end user license agreement.  This is annual version and service pack version specific.  So the above is for 2019 Service Pack 1. (2019 27)  For some reason this year SolidWorks is not using "1" for Service Pack 1 as they had in previous years, and used "27" just to mess with us a bit more and make the role of CAD admin that much more fun.

                           

                          And here is the "Run After 2019.bat" file:

                          @echo off

                          echo .

                          echo .

                          echo .     *******************************************************

                          echo .     *  Applying custom SolidWorks settings. *

                          echo .     *         Please do not close this window!            *

                          echo .     *******************************************************

                          echo .

                          echo .

                          :PAUSE

                           

                          : Install Custom Properties add-in

                          : Copy files

                          xcopy /s /i /q /y "\\corp.mycompanyname.com\Global SW Deployment\SolidWorks\EhCanadian Consulting, Inc" "C:\Program Files\EhCanadian Consulting, Inc"

                           

                          : Register the DLL

                          cd /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319

                          RegAsm.exe "C:\Program Files\ehcanadian Consulting, Inc\Copy Properties\CopyProperties.dll" /codebase /s

                           

                          : Push Registry Keys

                          START /WAIT REGEDIT /s "\\corp.mycompanyname.com\Global SW Deployment\SolidWorks\AngioSettings\HKCU Copy Properties.reg"

                          START /WAIT REGEDIT /s "\\corp.mycompanyname.com\Global SW Deployment\SolidWorks\AngioSettings\HKLM Copy Properties.reg"

                           

                          : Push custom Angio SolidWWorks Settings

                          START /WAIT REGEDIT /s "\\corp.mycompanyname.com\Global SW Deployment\SolidWorks\MySettings\swSettings2019.reg"

                           

                          : Set status of add-ins in SolidWorks

                          START /WAIT REGEDIT /s "\\corp.mycompanyname.com\Global SW Deployment\SolidWorks\MySettings\AddInStartup.reg"

                           

                          : Set ToolBox Location to PDM Vault

                          reg add "HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2019\General" /v "Toolbox Data Location" /t REG_SZ /d "C:\EPDM\SW Tool Box" /f

                          reg add "HKEY_LOCAL_MACHINE\SOFTWARE\SolidWorks\SOLIDWORKS 2019\General" /v "Toolbox Data Location" /t REG_SZ /d "C:\EPDM\SW Tool Box" /f

                          reg add "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\SolidWorks\SOLIDWORKS 2019\General" /v "Toolbox Data Location" /t REG_SZ /d "C:\EPDM\SW Tool Box" /f

                           

                          : Set Last Open Folder

                          reg add "HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2019\General" /v "Last user path" /t REG_SZ /d "C:\EPDM" /f

                           

                          : Copy SW Hole Wizard Favorites

                          xcopy /s /i /q /y "\\corp.mycompanyname.com\Global SW Deployment\SolidWorks\SW Hole Wizard Favorites" "C:\SW Hole Wizard Favorites"

                           

                          " Remove temporary folder and files for Toolbox

                          RMDIR /s /q C:\Temp\Toolbox

                           

                          " Adds computer and user name to log file of successful installs

                          @echo %COMPUTERNAME% %USERNAME% %DATE% %TIME% >> "\\corp.mycompanyname.com\Global SW Deployment\SolidWorks\Install Log\2019.txt"

                           

                          : Reboot computer

                          echo .

                          echo .

                          echo .     *******************************************************

                          echo .     *      SolidWorks installation was successful.        *

                          echo .     *      Computer will now restart in 30 seconds.       *

                          echo .     *                                                     *

                          echo .     *            Press CTRL-C to cancel.                  *

                          echo .     *******************************************************

                          echo .

                          echo .

                          timeout /t 5

                          shutdown.exe /r /t 25

                          There's a lot here, so time to break out the bullets:

                            • The first three sections I copy out and register a custom API for managing "clean up" of file properties, where we are removing configuration-specific metadata and standardizing on Custom Properties only.  A free shout out to EhCandadian who developed this for me, I highly recommend him if you need any custom API work done.
                            • The 4th section I push out the registry key created from the Copy Settings Wizard.  It's freshly created every year, and is just the Copy Settings Wizard .sldreg file with the sld removed from the filename.  Yes, this capability supposedly exist within the Admin Image tool, but the last two years it has not worked without some significant bugs, and I'm not one for experimenting a 3rd year in a row on 100 installations.  This method works every. single. time.
                            • The next reg file I push out is the on/off settings for the SolidWorks add-ins.  By default SolidWorks like to turn on a variety of them, like Forums, Inspection, etc.  This should be added to the Admin Image tool, but this registry key push works fine.  Do note, that the registry key names for the add-ins are unique for every version of SolidWorks.  You will need to recreate this key every year.  If you don't, you won't be pushing the right keys.
                            • The ToolBox location push I talked about in my original post.  But to reiterate, use a Temp folder location in the Admin Image tool so that during the installation a user is not asked to login to the Vault.  Then, these registry keys fix the Toolbox location, pointing SolidWorks back to the PDM Vault shared Toolbox location.  For whatever reason, this location is stored in three spots.  That took a little bit of time to figure out.  If you only set the Local User, then during SolidWorks startup the user will be asked about setting a Toolbox location, so be sure to get all three.
                            • The Last Open folder is useful so users don't by default go to open a file in an Admin's sandbox folder. Hehe...  There's actually a setting in SolidWorks Options File Locations to control this as well, new for 2019...but do I trust it????  Nooooo.....
                            • Next is the Hole Wizard files.  PDM doesn't let us share this database like Toolbox, which sucks.  So, I push our shared custom Hole Wizard files via this method instead since I cannot manage this within a PDM Vault folder.
                            • Remember that temporary Toolbox location?  This command just deletes those files and folders.
                            • And new this year, I added a txt file based logging function.  So now I have a txt file I can go to which will list the computer name, user, and date/time the install completed.  A poor man's CAD admin dashboard.  Yes, the SolidWorks Image tool has a similar capability, but in order for that to work you have to enable read/write permissions to your installation folder.  That means any disgruntled CAD users, or that one guy that just loves to mess with settings, could go into your installation folder and do whatever they want.  Ask me how I know this...
                            • The last section just displays to the user the installation is complete and the computer will be rebooting.  The reboot is important, because most users won't reboot and will absolutely call you when SolidWorks gives them an error because they didn't reboot.  And then you tell them to reboot, even though they think they did reboot, the problem goes away, and they mutter something about Windows sucking.  And then you create batch files, determined not to let history repeat itself!

                           

                          Good luck, fellow CAD admins.  And definitely post your results or other useful tidbits, Open Source CAD Admin!