36 Replies Latest reply on May 25, 2010 12:40 PM by Tom Helsley

    Admin Image w/ UNinstall?

    Paul Marsman

      Just wondering if anyone out there that uses an admin image for deployment and has also got it so that you are doing an uninstall and cleanup automatically?  Currently I have everyone do an uninstall through the control panel and then start the admin image which does the basic items for them, but I would like to make this a one step process.  I've got it figured out for using GUID values but according to my VAR "SW says that the GUID changes for each computer, so you can't use that option like you could before"... I don't believe them, but without those values I'm stuck at what other options there are.  I know about active directory but I'm ruling that out.

        • Re: Admin Image w/ UNinstall?
          Michael Beem

          I have not tried it for upgrading to 2010, but attached is the batch file I used when I upgraded to 2009.  This will still leave the shell of the old installation manager on Add/Remove programs list on the computer though.  I have not figure out how to remove that automatically without knowing the GUID.

            • Re: Admin Image w/ UNinstall?
              Paul Marsman

              Michael,

                yes, pointing back to the original msi works, but during some of my research for this I found a user who never went from 2008 to 2009, so I can't uninstall that by using the msi... I don't keep more than 2 images on the servers as that would be a huge amount of space at ~8GB for each SP.  However if I use the GUID I don't need anything on the server.  The beginning of my batch file currently looks like this and the same format continues through all the GUID values I have:

               

              @ECHO OFF


              ::SOLIDWORKS 2009 SP4::

              ECHO Uninstalling SolidWorks 2009 SP04
              ECHO Please wait...
              ECHO.
              start "" /wait msiexec /x {212ED557-7453-44C1-AE9C-3DA780B9B3C6} /passive

              If I had ALL the GUID values I would be set, but SW doesn't seem to want to give them up.

               

              As for the IM being left in the Add/Remove list, the only thing I have found is to delete the key from the registry for the particular IM you have.  I have that at the end of my batch file to call the IM_Removal.reg file I have.  Which looks like this for removing the IM for 2009 SP4:

               

              REGEDIT4
              ;2009 SP4
              [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SolidWorks Installation Manager 20090-40400-1100-200]

            • Re: Admin Image w/ UNinstall?
              Kevin McClurg

              All,

               

                   This is a continuation of a conversation that started at https://forum.solidworks.com/docs/DOC-1014#comment-1423.

               

                   The best solution for a "Silent" uninstall that I've been able to come up with so far was found in the knowledge base - please note: it's an incomplete solution, but does help in the search for guids.  Go to the customer portal and search the knowledge base for article S-012431.

               

                   I downloaded the zip file located in the knowledge base article - it contains an executable and the source code.  I ran the executable on the client machine.  It provided a window that output lines of code, preformatted  in batch file format using the "msiexec /x" command and the guid.  This was easily copied and pasted into a batch file.  As near as I can tell, the only thing it didn't do was provide a line for PhotoView.  I manually searched for that guid and added it to my bat file.  It's hard to tell, but I believe all SolidWorks components were successfully uninstalled after running the resultant batch file.

               

                   I don't write VB code, but just looking at the source code, it appears to me it could be modified relatively easily to also search for the PhotoView guid and create the additional line of code to be copied to a batch file.  I'm also thinking the source code could be modified to output an "Uninstall.bat" file.  Depends how fancy you want to get.  I've requested help from a developer.

               

                   After I ran my batch file, the only thing left was the Installation Manager.  I've searched the registry on the client and am unable to find a way to silently uninstall the Installation Manager.  The "Uninstall String" located in the registry starts the GUI for the installation manager, shows that there are no products installed, and when you click on "Remove" it uninstalls the installation manager.  It's been my experience that uninstalling this from the client machine doesn't affect the Admin Image on the network.  This may not be true if the client you're working with is the client used to build the Admin Image on the network, but I don't know for sure - Anybody?

               

                   Thinking big, I'm guessing that with the code modified to generate an "Uninstall.bat" file, you could conceivably run the code on each client (if it's true that different SP's have different guids) and have the code call the Uninstall.bat file.  This might help Tom with his variety of SP's.

               

                   That said, it sure would be nice if there was an additional switch for the command line "sldIM.exe /remove" that told the executable to uninstall (every SolidWorks Component including the Installation Manager) silently.  If there's anyone out there that knows what switches are available for sldIM.exe, please pass them on...

               

              Thanks,

              Kevin

                • Re: Admin Image w/ UNinstall?
                  Paul Marsman

                  Kevin,

                    You are working down the same path I am.  The problem I have is the variety of SPs (and potentially versions) on my clients.  That's why I was looking for a complete list of GUID values for all the products in each Version and SP... if I had my hands on that I could provide my clients (and anyone) a fully silent uninstall and install.  But that list seems to not be available.

                    If you look in my previous post I have found a solution to removing the IM from the Add/Remove Programs list through a registry key deletion... and yes this works just as if you had done the "There are no products installed, click here to remove the IM".  I verified by exporting the key and then deleting it (IM gone) add the key back in (IM returns).

                    I suppose I could loop through each computer during my uninstall and find the GUID values like the exe does on the solution from solidworks and build my .bat file as I go for each machine, but I'm a little leary of just finding anything that starts with "solidworks" and removing it.  So I guess I could loop through and search for exactly "SolidWorks 2009 SP0" and "SolidWorks 2009 SP01" etc... but that just seems like a lot to do for EACH product and SP.  Thus my search continues.

                    • Re: Admin Image w/ UNinstall?
                      Kevin McClurg

                      Thanks Paul.  Good to know that I'm not the only one out there struggling with this.

                       

                           I did see your post regarding the removal of the installation manager.  My experience has been if I remove the registry key, I end up leaving the Installation Manager software behind.  It's located in C:\Windows\SolidWorks\<version specific sub-folders>.  When you actually run the GUI the version specific subfolders and files are also removed.  I don't know how important that is - I was just hoping to duplicate the manual uninstall.

                       

                           We experienced numerous problems when rolling from 2008 to 2009, so one of the painful processes I've already been through is to manually go through our entire organization and make sure that 2009 SP3 is the only version we currently have installed.  This should make rolling to 2010 much easier - keyword "Should".

                       

                           I see your dilemma having multiple versions.  If you are able to come up with a list of guids, will you attempt to run the uninstall for all guids whether or not the version is actually installed?

                       

                      Best of luck to you...

                       

                      Kevin

                        • Re: Admin Image w/ UNinstall?
                          Paul Marsman

                            Well, part of my post uninstall is to clean up folders with a vbs or bat file... very easy to remove the C:\Windows\SolidWorks folder and then you don't have to worry about the specifics... it will get created again on install.

                           

                            With only 2009 SP3 you definately could do a complete silent uninstall--clean up--install.  very easily.

                           

                            Yes, if you run an uninstall command with a GUID that doesn't exist on your machine it just goes to the next one.  My current bat file has a list of quite a few different SPs from 2008, 2009, and 2010 and I've run it just fine on machines with 2009 SP4.  I just can't use that option if I don't have a complete list... it is all or nothing when using GUIDs

                      • Re: Admin Image w/ UNinstall?
                        Tom Helsley

                        Kevin,

                         

                        Here is an image of what I was talking about for modifying the html file in the admin image.  I can't get the button under step 2 to work.  I attached the html file so anyone can tweak it.  I tried to make it as generic as possible so that when I create a new admin image, I can copy this file into the admin image's folder and run it.  I'd like to try launching the control panel directly from the html file instead of via a shortcut.  Also, if anyone can figure out how to get the step 2 button to work, I'd greatly appreciate if you could post the fix back up to the forum.

                         

                        SW Clean Install.PNG

                        I hope this helps,

                         

                        Tom H.

                          • Re: Admin Image w/ UNinstall?
                            Paul Marsman

                            Tom,

                              I'll say you don't need button 2 to work... just get rid of it.

                              Have you ever looked at the "Run a program before installation" option in the Image Option Editor? (it's under the "Administrative Options" tab)

                              You can specify an exe,bat,vbs,pl,hta.... etc to run before the admin image starts the install.  You could just point to your "Clean up Directories & Registry" batch file there and then your users would have two clicks.

                              • Re: Admin Image w/ UNinstall?
                                Tom Helsley

                                5815 wrote:

                                Have you ever looked at the "Run a program before installation" option in the Image Option Editor? (it's under the "Administrative Options" tab)

                                Yes, I have, and the problem is that the installer doesn't wait for the "...before installation" task to finish before beginning the install (unless they fixed it in 2010).  So what happens is a simultaneous uninstall or clean and install with a resulting jacked-up machine.  Bottom line, I avoid that option like the plague.

                                 

                                Tom H.

                                  • Re: Admin Image w/ UNinstall?
                                    Paul Marsman

                                    Tom Helsley wrote:

                                     

                                    Yes, I have, and the problem is that the installer doesn't wait for the "...before installation" task to finish before beginning the install (unless they fixed it in 2010).  So what happens is a simultaneous uninstall or clean and install with a resulting jacked-up machine.  Bottom line, I avoid that option like the plague.

                                     

                                    Tom H.

                                    Tom,

                                      I have an update on this... our programmer was helping me update my scripts and stuff and said... "Why don't you just do a wait on your call and then you don't have to create seperate files"... long story short... my admin image is now called this way from my vbs file:

                                     

                                    wshshell.run srcDir & "sldim\sldIM.exe /adminclient /new /source " & srcDir & "AdminDirector.xml", 8, TRUE

                                     

                                    the ", 8, TRUE" is the key... the 8 is the window type and TRUE is the force it to wait until that command completes before continuing.  Here is the microsoft page about it:  http://msdn.microsoft.com/en-us/library/d5fk67ky(VS.85).aspx

                                • Re: Admin Image w/ UNinstall?
                                  Kevin McClurg

                                  Tom,

                                   

                                       Do you have more than one major release (2007, 2008, 2009, etc) installed at Hartwell?  If not, you could add the following line as the code for your first button - this will skip the control panel and go right to the uninstall of SolidWorks.  The user just has to click the "Remove Items" button on the SolidWorks Uninstall GUI and away it goes.

                                   

                                       To start the SolidWorks 2009 uninstall GUI, enter the following as one command line:

                                            C: \WINDOWS\SolidWorks\IM_20090-40300-1100-100\sldim\sldIM.exe /remove "C:\WINDOWS\SolidWorks\IM_20090-40300-1100-100\sldim\sldIM_installed.xml"

                                   

                                       You can browse to the C:\WINDOWS\SolidWorks folder to find the appropriate path for other versions.  I know this works for 2008, too, but not sure about earlier versions.

                                   

                                       I'm not familiar with HTML code, either, so I'm afraid I can't help with your second button.

                                   

                                       I'm in a bit of a different situation here.  We've never cared for the way SolidWorks planned on having the user update major releases.  If we left it up to our users, I'd still have several users back on SolidWorks 2004.  Imagine having 6 admin images on a server.

                                   

                                       This isn't the only problem with the Admin Image deployment.  We have (4) sites so we're deploying images over our WAN.  A deployment on the LAN can take 20 - 30 minutes - over the WAN it's usually twice that amount of time.  Expecting my users to perform an uninstall, then install, can take in the neighborhood of an hour - we have nearly 100 installs - that's 100 man hours of unproductive time.  Because of this we've opted to perform the upgrade for our users.  One day they're running 2009, the next they're running 2010 (hopefully).

                                   

                                       This creates problems as well - I'm now finding problems with our 2009 install that go back to the fact that 2008 user settings are overiding 2009 admin image settings.  I believe you asked a question related to cleaning out user settings in a different post - something I'd like the answer to as well.

                                   

                                       Seems the deeper I get into this, I end up with more questions than answers.  Hope you find the command line code for starting the uninstall GUI helpful...

                                   

                                  Kevin

                                    • Re: Admin Image w/ UNinstall?
                                      Paul Marsman

                                      Kevin,

                                        You may be interested in how I deploy my admin image.  I also have sites in different locations.  What I do is I have a flash drive for each site and after I create my image I copy it to the flash drive and mail it to each of the other sites. (yes, I could copy it but at ~8GB that's too much for our WAN) then I have a user at each site copy it to their local share for the Admin Image.  When that's done I have a local copy at each site of the exact same image.  I then send out an email with a link to a single vbs file on my server... this vbs file determines what facility they are at by getting their IP address and then it sets the install directory to their LOCAL Admin Image.  When it's all said and done I have every user doing a local install but all of the "same" image.  Takes a little more work on my end but when you have that many sites and users... it saves in the end.

                                       

                                        If you are interested in my vbs or anything else let me know and I'll get you copies.

                                        • Re: Admin Image w/ UNinstall?
                                          Kevin McClurg

                                          Thanks Paul.

                                           

                                               We used to keep Admin Images at all of our sites, but there were at least a couple of issues with that.  One being that our need for data storage space is growing exponentially so taking up storage space for identical admin images becomes a problem.  The other is that it was 4 sites that needed SP updates.  I consolidated everything to one site to limit my footprint on the network and make updating SP levels easier.

                                           

                                               Because we do the install for our users off hours, the extra time needed to deploy across the WAN is less of an issue.

                                           

                                               That said, we're using a third party software for deployment.  I'm able to schedule deployment to approximately 10 to 20 clients at a specified time.  I could do up to 40 clients at a time, but the load on the WAN is too great.  In addition to the scheduling ability, I'm able to see when the deployment finishes so I can schedule the next set of 10 to 20 installs.  It makes that side of it relatively easy - It's the uninstalls that I'm struggling with.

                                           

                                               Currently, I'm going down the path of the Windows installer with the guids.  Still holding out hope that someone from SolidWorks will provide a command line switch that works with "sldIM.exe /remove".

                                            • Re: Admin Image w/ UNinstall?
                                              Paul Marsman
                                              Ok, so you don't want to take up server space... just have someone plug the flash drive on a local server and leave the image on the flash drive... then you aren't using space and when you are done doing your deployment you get it back and you can use the same option for doing SPs.  I'm just thinking that if you did it this way you would be able to schedule deployment in each facility at once basically and you could walk away after one push.  Just a thought.
                                          • Re: Admin Image w/ UNinstall?
                                            Tom Helsley

                                            Thanks for the tips, Kevin.  Fortunately, for my situation, most of the machines are only one or two service packs apart.  But there are the occaisional machines that are a full version or two behind.

                                             

                                            I'll give your tips a try, but it looks like I still need to know which version and service pack is installed to run the proper uninstall.  This could be the tricky part.  That was why I chose to launch the control panel for now.

                                             

                                            I don't know if it will work, but another option that may help...  I remember seeing a command line or batch file or exe called "Showversion".  If I can call that, or incorporate it into the process, maybe I can use the information it provides to determine which uninstall to run.  Now, if only I can find that again.

                                             

                                            Tom H.

                                            • Re: Admin Image w/ UNinstall?
                                              Tom Helsley

                                              Tried my first attempt at adding the code you described but it didn't work.  The button code in the html file is actually vb script (shell command to launch an application).  I don't know if it is possible to pass the parameters with the shell command, so I'm going to have to look into this.  If anybody knows, please pitch in.

                                               

                                              Thanks,

                                               

                                              Tom H.

                                                • Re: Admin Image w/ UNinstall?
                                                  Kevin McClurg

                                                  Tom,

                                                   

                                                       Sorry it didn't work.  I would have expected it to work because it's almost identical to the code for the third button which passes more than one parameter.  This is the code from our StartSWInstall.hta:

                                                   

                                                            Set WshShell = CreateObject("WScript.Shell")
                                                            WshShell.Run """.\sldim\sldIM.exe"" /adminclient /new /source "".\AdminDirector.xml"" "

                                                   

                                                       This code passes 3 parameters...

                                                   

                                                    The major difference is that your third button code is looking on the same server where the hta page resides and the code I provided needs to come from the client machine.

                                                   

                                                       I thought of couple of things you could try.  First, see if the line of code for your first button runs on a test machine from a command window.  If the SolidWorks uninstall GUI starts, then you know the line of code is working.  If not, then check the path - look in C:\Windows\SolidWorks on the client and check the rest of the path for the command against what actually exists on the client - modify as needed.

                                                   

                                                       Assuming that's good or you can modify that path so it works in a command window but it still doesn't work from the button, then it probably has something to do with wich machine the code is trying to execute from.  I'm no programmer, but you could experiment by pulling your StartSWInstall.hta page local to the client.  If the button works there and not on the server then you know it's trying to execute code from the server path and you'll need to find a way, possibly modifying the path, to get it to execute the code that's on the client when the page is on the server.  Just a thought, but maybe modifying the path for the first button command to include "%computername%\c$\" would force it to look on the client?  Keep in mind this is just a thought from a non-programmer - use at your own risk...

                                                   

                                                       Hope this helps...

                                                   

                                                  Kevin

                                                    • Re: Admin Image w/ UNinstall?
                                                      Tom Helsley

                                                      Yeah, I probably didn't have the quotes properly enclosing everything.  I was thinking along the same lines for troubleshooting, but I didn't have time to do that yesterday.  I'll keep trying when I have more time.  I'm not as familiar with DOS commands, batch files, or html, etc., as I am with VB, so it's a learning process. 

                                                       

                                                      Thanks for your input.  It gives me some more ideas to try.

                                                       

                                                      Tom H.

                                                        • Re: Admin Image w/ UNinstall?
                                                          Paul Marsman

                                                          Tom,

                                                            maybe you could not use the .hta from solidworks for the actual launch of the installation and run a vbs file (I do this that way I can control everything in order and it all waits for the previous to finish)  this is the command in my vbs file to start the install where "scrDir" is the "\\server\SolidWorks_Image\" share:

                                                           

                                                          wshshell.run srcDir & "\sldim\sldIM.exe /adminclient /new /source " & srcDir & "\AdminDirector.xml"

                                                           

                                                          also, as I told Kevin, I use the vbs file to determine the clients site through their IP address and that IP address sets the scrDir to their local install.  I've attached my vbs file that I use so you can see the whole thing.  I'm pretty sure with your Add/Remove button you could have your clients do that first and then launch a vbs file to do your cleanup and launch the install.

                                                            • Re: Admin Image w/ UNinstall?
                                                              Tom Helsley

                                                              Thanks, Paul.

                                                               

                                                              It's great to see other people's code... learn new ways of doing things and new functions that I wasn't previously aware of.  I'm especially not familiar with the wshell command beyond the basic examples in the help VBA files.  I'll examine this and see what I can do.

                                                                • Re: Admin Image w/ UNinstall?
                                                                  Paul Marsman

                                                                  well, my disclaimer is I didn't write it either... previously mentioned IT guy did after I explained what I needed it to do

                                                                   

                                                                  If I really had those GUID values I could do some sweet stuff...

                                                                   

                                                                  I've decided to post what I've got so far to see if you guys can use anything else I've done or build upon it.  What I currently do is send out a hyperlink in an email to the previous vbs file and tell the clients to uninstall through control panel then click the link.

                                                                   

                                                                  What I would LIKE to do is send out a link to the attached bat file which does the uninstalls (for as many GUID's I have for now anyway).. this bat file calls the reg file at the end (also attached, and I'll be modifing the bat file to remove the C:\Windows\SolidWorks directory that Kevin told me about).  After the reg cleanup is done start the install from the Admin Image.  So if I can get this all to work I could have a ONE click and done for all my clients.... just need the rest of the GUID's and tidy up some stuff.

                                                                   

                                                                  Let me know if you can build on this (more GUID's and anything else) or if there are any questions.

                                                                    • Re: Admin Image w/ UNinstall?
                                                                      Tom Helsley

                                                                      Yeah, I noticed, but that's how it works... we build on each other's code.  Whatever I come up with, I'll post.

                                                                       

                                                                      One click would be great, but two in my case would probably be pretty nice too.  IMO, SolidWorks should make the installer give us a choice to do a clean install and do the stuff we are trying to do.  It's kind of funny to me.  The admin image option editor gives us a choice to upgrade or install new, yet SolidWorks recommends not upgrading between versions.  In fact, the preferred method is to do a clean install, but we have to do this manually or try to automate it ouselves.  Then SolidWorks announced last year that they were trying to make installation as "painless" as possible, yet we still have to jump through these hoops.  Then, Greg Jankowski posts a separate document on how to do a clean install.  Bingo!

                                                                       

                                                                      What is the advantage of uninstalling through the msi file instead of launching the sldim file in "c:\windows\SolidWorks\..." with arguments?  In the past, when I did the uninstalls via batch files and msi files, I had to call an msi file for each item installed.  But, that was before everything was consolidated in the "Add / Remove Programs" control panel.  During deployment, I had so many problems, that I decided not to do it that way again.  Is it better now?  Can I launch only one msi file to install all products under one service pack?

                                                                        • Re: Admin Image w/ UNinstall?
                                                                          Kevin McClurg

                                                                          IMO, At the very minimum SolidWorks should offer a clean uninstall that can be run from the command line.  I wouldn't complain if they offered a clean install that did the whole works.

                                                                           

                                                                          In the real world, there isn't one workstation for every user - we have several shared machines here.  Each time a new user logs on and starts SolidWorks, user specific files, folders, and settings are created.  Cleaning this up is a royal pain.  Sorry - needed to vent...

                                                                           

                                                                          The advantage of uninstalling through the MSI file is that you can script it - no user interaction necessary.  We use this to do "unattended un-installs".  We try to do this off hours so we don't affect our engineering staff.  We're able to do this for our 100 installs with minimum staff (usually just me).  The problem lies in the fact that even after the software is uninstalled, there is so much user specific information left behind that it's nearly impossible to get a clean install of the next version.  This problem is compounded on a shared workstation - more users = more user specific files, folders, settings and registry keys.  Would sure like an "EASY" button for cleaning this stuff up...

                                                                           

                                                                          If you're okay with your users choosing when to install, the best bet is to stick with the button in your StartSWInstall.hta - there is no single MSI for the install.  The sldIM.exe file is taking care of all component installs based on the settings you created during the creation of your Administrative Image.

                                                                           

                                                                          From an administrative standpoint, it's nice to roll everyone to the new version at one time.  We use the command from our StartSWInstall.hta in a script to do the install "silently".  The install is performed on every workstation via a domain admin account.  This way we don't have users on older version of the software.  For the most part, because of the type of work we do, it hasn't been a problem to roll everyone to the new version all at once.  Again, same thing as the uninstalls, we do this off hours and with minimum staff...

                                                                            • Re: Admin Image w/ UNinstall?
                                                                              Tom Helsley

                                                                              I see, so the IM uninstall through "c:\windows\SolidWorks\..." doesn't run without user interaction.

                                                                               

                                                                              Interesting to hear the differences between us how SolidWorks is managed and deployed.  While some companies let individual users install, others such as mine don't allow users to install / remove programs.  In my work environment, everyone is allowed to login to any machine and work from it, but we avoid the user specific folders and files on the C-drive.  Our "My Documents" folder is actually a secure network folder, and all our CAD files are stored and worked on in a network location.  Furthermore, I have everyone's SolidWorks settings, templates, and support files located in a network folder.  So we are pretty standardized, but everyone has the flexibility to customize beyond that.  The advantage is when I update templates, common macros, material libraries, etc. everyone else is automatically updated.  This avoids the headaches that you seem to be describing.  So, during deployment, I only have to ensure the proper software installed, the default settings are updated, and everything runs smoothly.

                                                                               

                                                                              I don't see how anyone could deploy a new version other than all at once.  As soon as one person saves a shared file to the new version, everybody else is screwed until they upgrade to the same version.  So during deployment of a new version, I get help from a couple people in the IT department,  and we do an after-hours deployment.  As stated earlier, I just don't update everyone when a new service pack comes out.  I only do it if they have problems.

                                                                          • Re: Admin Image w/ UNinstall?
                                                                            Jason Capriotti

                                                                            Here's my uninstall batch files.....keep in mind that they are kicked off from other batch files that pass variables so they won't work "as-is" but there are GUID codes for:

                                                                             

                                                                            SolidWorks 2009, 2008, 2007

                                                                            eDrawings 2009, 2008, 2007

                                                                            SolidWorks Explorer 2009, 2008, 2007

                                                                            DWGEditor 2009, 2008

                                                                            Photoview360 2009

                                                                            Simulation, Motion, and Flo 2009, 2008

                                                                             

                                                                            This has many of the service packs but not all.....just the ones we used here. Typically we started at SP2.0 and moved up to SP5 of any one release. Then there are "point" release which we may or may not have implemented depending on what it addressed.

                                                                              • Re: Admin Image w/ UNinstall?
                                                                                Marcus Monaghan

                                                                                Jason,

                                                                                 

                                                                                This looks good, how are you sensing what products are installed initially?

                                                                                 

                                                                                Here are some GUID's I had collected over the years FWIW, I haven't check to see if we have duplicates, but I'm sure their in there:

                                                                                 

                                                                                REM ==========================================================
                                                                                ECHO ...Uninstall eDrawings 2007

                                                                                 

                                                                                MsiExec.exe /x{96E423BB-36B6-4EAD-B4A9-39C5109DD1B3} /norestart /passive

                                                                                 

                                                                                MsiExec.exe /x{75FEB085-179F-4C85-B0E4-B517D2160750} /norestart /passive
                                                                                MsiExec.exe /x{3F2E237C-8DB7-44E0-9E75-5AA06237B4DC} /norestart /passive

                                                                                 

                                                                                MsiExec.exe /x{EAF6C169-FFD5-4443-9A82-0D0351C5185A} /norestart /passive
                                                                                MsiExec.exe /x{8115F1D5-0A19-467E-A643-4B104554B740} /norestart /passive

                                                                                 

                                                                                MsiExec.exe /x{F2924009-B2A9-4413-AF7C-E0B72A870626} /norestart /passive
                                                                                MsiExec.exe /x{0222889F-F0FC-43E2-BFF2-D5517ED85D34} /norestart /passive

                                                                                 

                                                                                MsiExec.exe /x{E5A93086-C9A3-4BD6-9227-61C67D9F900C} /norestart /passive
                                                                                MsiExec.exe /x{4E637A20-BC70-402E-89EF-DC00C069441C} /norestart /passive

                                                                                 

                                                                                MsiExec.exe /x{2E79015F-4F90-4FCF-8AB4-7F9A295B3DA1} /norestart /passive
                                                                                MsiExec.exe /x{616FBA10-B630-4AAF-9B44-3CC83EAA7E55} /norestart /passive

                                                                                 

                                                                                MsiExec.exe /x{5EB2FAEE-DB4A-4CB3-8C51-6876C6D1FF7E} /norestart /passive
                                                                                MsiExec.exe /x{FE78116D-58A4-4C18-9B85-263099CF4C35} /norestart /passive

                                                                                 

                                                                                MsiExec.exe /x{D3151B5E-5F6B-4355-95C0-8F936814B980} /norestart /passive

                                                                                 

                                                                                REM ==========================================================

                                                                                 

                                                                                REM ==========================================================
                                                                                ECHO ...Uninstall eDrawings 2008

                                                                                 

                                                                                MsiExec.exe /x{25D96BDA-02F7-481A-851C-0D6AC5FB8CA4} /norestart /passive
                                                                                MsiExec.exe /x{E69411C0-8D66-4F9C-B6D6-9ED2FB89D0E4} /norestart /passive
                                                                                MsiExec.exe /x{6B8512B9-A3FC-42BB-B782-A77874B87CC2} /norestart /passive
                                                                                MsiExec.exe /x{40345A8F-3B72-44DE-814F-72E8A52B1161} /norestart /passive
                                                                                MsiExec.exe /x{4F2A42E9-C0A7-4C56-92A8-6EC6CB7D815C} /norestart /passive
                                                                                MsiExec.exe /x{72D4F0FA-FFF4-4009-8D60-C4162038495B} /norestart /passive
                                                                                MsiExec.exe /x{1F40F8F1-B4BC-4A5B-B1A6-363FBDD30F0C} /norestart /passive
                                                                                MsiExec.exe /x{0534E2D5-59BA-4CE6-8E6D-0B2CA4BCF0C2} /norestart /passive
                                                                                MsiExec.exe /x{5864B49E-03FC-481E-89B7-A6664CC2ACB4} /norestart /passive
                                                                                MsiExec.exe /x{E69411C0-8D66-4F9C-B6D6-9ED2FB89D0E4} /norestart /passive

                                                                                 

                                                                                MsiExec.exe /X{25D96BDA-02F7-481A-851C-0D6AC5FB8CA4} /norestart /passive
                                                                                REM ==========================================================

                                                                                 

                                                                                REM ==========================================================
                                                                                ECHO ...Uninstall eDrawings 2009

                                                                                 

                                                                                MsiExec.exe /X{F3D16C1B-4084-4764-BEEC-7C24428D8AAD} /norestart /passive
                                                                                REM ==========================================================

                                                                                 


                                                                                REM ==========================================================
                                                                                ECHO ...Uninstall SW viewer 2007 2008

                                                                                 

                                                                                MsiExec.exe /X{74DCF9D7-2DA2-4122-86F5-759B85E38EEA} /norestart /passive
                                                                                MsiExec.exe /X{21CAFAB5-5FF0-4167-B783-B4B35A230FEF} /norestart /passive
                                                                                MsiExec.exe /X{8EA7D464-00C8-4CAF-B565-56CAF0C2F379} /norestart /passive
                                                                                MsiExec.exe /X{798B878F-1AF7-4E69-816D-9AF59BE3B94B} /norestart /passive
                                                                                MsiExec.exe /X{1BFDD2AE-C0AE-41C5-B85A-A08A0D30DAED} /norestart /passive
                                                                                MsiExec.exe /X{9150A80C-196A-4B77-83F8-CFB60FE7358B} /norestart /passive
                                                                                MsiExec.exe /X{21332E84-5198-4FB7-81D1-4A2FA31CBB17} /norestart /passive
                                                                                MsiExec.exe /X{DCB5C8AE-7AEB-4449-AE62-60BB730C71FC} /norestart /passive
                                                                                MsiExec.exe /X{CCBFCA70-D1B3-48A7-9504-8D149DD39658} /norestart /passive
                                                                                MsiExec.exe /X{0A420017-9D8A-4A03-9E4E-C6023786A8A4} /norestart /passive
                                                                                MsiExec.exe /X{0D33D69E-1F4E-4E63-B602-911A22655F2D} /norestart /passive
                                                                                MsiExec.exe /X{0532C56F-5496-4327-9929-C8F8F640884C} /norestart /passive
                                                                                MsiExec.exe /X{F5A03204-FA19-492D-97F9-340F78065589} /norestart /passive
                                                                                MsiExec.exe /X{AECE37A6-FDCE-4928-A2DD-A02827CA5D6F} /norestart /passive
                                                                                MsiExec.exe /X{4FA85827-EF5A-4F0C-8EEE-45815885E2CB} /norestart /passive
                                                                                MsiExec.exe /X{F2AA5A35-33F1-49F4-848B-33CD86F0D647} /norestart /passive
                                                                                MsiExec.exe /X{13A1DBAD-C3A6-4900-8AAC-94998FA2C642} /norestart /passive

                                                                                 

                                                                                REM ==========================================================

                                                                                 


                                                                                REM ==========================================================
                                                                                ECHO ...Uninstall COSMOS MOTION 2008
                                                                                rem 16.40.105
                                                                                MsiExec.exe /X{B88A9AA3-E477-49C3-962D-606C401B614C} /norestart /passive
                                                                                rem x64
                                                                                MsiExec.exe /X{3B17DBE2-D647-4339-A986-F17E68EDC252} /norestart /passive
                                                                                REM ==========================================================

                                                                                 


                                                                                REM ==========================================================
                                                                                ECHO ...Uninstall COSMOSWORKS 2008
                                                                                rem 16.40.105
                                                                                MsiExec.exe /X{F86F036F-C6EE-486A-822D-6629E5A3F6D9} /norestart /passive
                                                                                rem x64
                                                                                MsiExec.exe /X{702E015E-23B0-421B-B2E3-DF618BC7E0A7} /norestart /passive
                                                                                REM ==========================================================

                                                                                 

                                                                                REM ==========================================================
                                                                                ECHO ...Uninstall COSMOSFloWorks 2008
                                                                                rem x64 FloWorks
                                                                                MsiExec.exe /X{0B7FAD50-91F3-4370-B48B-A8D3ADDA1C17} /norestart /passive
                                                                                REM ==========================================================

                                                                                 

                                                                                REM ==========================================================
                                                                                ECHO ...Uninstall DWGEDITOR 2008
                                                                                MsiExec.exe /X{2B3A7061-B1EC-462D-9DCD-C6B0D931138A} /norestart /passive
                                                                                REM ==========================================================

                                                                                 

                                                                                 

                                                                                 

                                                                                REM ==========================================================
                                                                                echo ...Uninstall SWExplorer 2008
                                                                                MsiExec.exe /X{13E6AA89-6838-443E-A61E-38B7581D1372} /norestart /passive
                                                                                rem x64
                                                                                MsiExec.exe /X{196BEA20-925E-40A7-A94E-F6033DB89046} /norestart /passive
                                                                                REM ==========================================================

                                                                                 

                                                                                REM ==========================================================
                                                                                ECHO ...Uninstall DWGGateway 2008
                                                                                MsiExec.exe /X{D58F2543-4B99-4AB1-894C-F5AFB99599E6} /norestart /passive
                                                                                REM ==========================================================

                                                                                 


                                                                                REM ==========================================================
                                                                                ECHO ...Uninstall SolidWorks 2006

                                                                                 

                                                                                rem 2006
                                                                                MsiExec.exe /X{984B44FD-953F-4176-BE74-421B00ED71C5} /norestart /passive
                                                                                MsiExec.exe /X{7745E24A-84A9-4754-9FFD-8FBE12CA0200} /norestart /passive
                                                                                MsiExec.exe /X{A0DF2ADB-E161-43F1-BC7A-20089B446819} /norestart /passive
                                                                                MsiExec.exe /X{0F3CBB30-DEC5-4910-A972-95D4BD54F108} /norestart /passive
                                                                                MsiExec.exe /X{6000A420-3937-42EE-B30B-590DA61FE12C} /norestart /passive
                                                                                MsiExec.exe /X{95B3B0CE-896C-4EBC-A2A1-918864F602B3} /norestart /passive
                                                                                MsiExec.exe /X{3B4902A9-066B-42D8-8305-A341D157C523} /norestart /passive
                                                                                MsiExec.exe /X{A5A8E552-8624-4BDE-ADFA-36E9E38665CB} /norestart /passive
                                                                                MsiExec.exe /X{1B328735-7A27-4DAA-88AB-FD8BF2900C25} /norestart /passive
                                                                                MsiExec.exe /X{20E0CC29-BC79-4A6A-B30E-5D7A990D1296} /norestart /passive
                                                                                MsiExec.exe /X{6B3CC411-AEEB-469F-92DB-00C290E0D652} /norestart /passive

                                                                                 

                                                                                ECHO ...Uninstall SolidWorks 2007
                                                                                rem 2007
                                                                                MsiExec.exe /X{95FCA50A-CF7D-457E-AF69-F058F8BC2844} /norestart /passive
                                                                                MsiExec.exe /X{A4C31547-D156-4E7B-A8C2-E0D2038ADD30} /norestart /passive
                                                                                MsiExec.exe /X{19E0378F-C9CB-426B-AC38-0E21784123FF} /norestart /passive
                                                                                MsiExec.exe /X{2B709014-DE9C-4EAA-A5C6-1F064A1E3460} /norestart /passive
                                                                                MsiExec.exe /X{79DF923F-8820-48CF-8BC2-F9F9D5735779} /norestart /passive
                                                                                MsiExec.exe /X{6385DB1A-58F0-42B2-B4A5-CDC6FC202366} /norestart /passive
                                                                                MsiExec.exe /X{54BC0035-C353-43D0-BBAC-7BFE68756D43} /norestart /passive
                                                                                MsiExec.exe /X{54BC0035-C353-43D0-BBAC-7BFE68756D43} /norestart /passive
                                                                                MsiExec.exe /X{86A79AE2-07E5-45D8-9873-D8B968DC7EE7} /norestart /passive
                                                                                MsiExec.exe /X{1F3D7C3E-573E-4F6A-8A63-BC404E2A45CF} /norestart /passive

                                                                                 

                                                                                ECHO ...Uninstall SolidWorks 2008
                                                                                rem 2008
                                                                                MsiExec.exe /X{0FFC026D-9906-441B-9EDA-5C0668927407} /norestart /passive
                                                                                MsiExec.exe /X{0FFC026D-9906-441B-9EDA-5C0668927407} /norestart /passive
                                                                                MsiExec.exe /X{5399116D-F07A-4D05-98A8-52757805C664} /norestart /passive
                                                                                MsiExec.exe /X{5399116D-F07A-4D05-98A8-52757805C664} /norestart /passive
                                                                                MsiExec.exe /X{FA811B30-74BA-4103-861E-37E1A2C4D54C} /norestart /passive
                                                                                MsiExec.exe /X{7C53A6FF-1648-4DFD-AA35-C6BFC77E904D} /norestart /passive
                                                                                MsiExec.exe /X{A0744DBD-6227-49CE-8377-D23A23EF0360} /norestart /passive
                                                                                MsiExec.exe /X{5AC0366B-9F97-4999-8AA5-5B13E8388EB7} /norestart /passive
                                                                                MsiExec.exe /X{266EB766-9ABB-40D0-AB9F-41EE46D23876} /norestart /passive
                                                                                MsiExec.exe /X{F0CAAA28-B83C-4077-9FA0-6E30253E4842} /norestart /passive

                                                                                 

                                                                                rem x64
                                                                                MsiExec.exe /X{5C039CB6-9026-4C74-9A63-152592021841} /norestart /passive

                                                                                 

                                                                                REM ==========================================================

                                                                                  • Re: Admin Image w/ UNinstall?
                                                                                    Paul Marsman
                                                                                    ultimately you don't HAVE to know what is installed when using the GUID's.. if the GUID isn't there it just doesn't run.  That being said... with an extensive list the uninstall time would increase since you have to run through ALL the values.
                                                                                      • Re: Admin Image w/ UNinstall?
                                                                                        Marcus Monaghan

                                                                                        The bat will fly through the non-valid GUID's, it doesn't seem to slow it down much at all.  I noticed his bat files write a log of the unsuccessful uninstalls of the various modules, which is what I would really like.  He is feeding the variables of what is installed to these bats up front from another script/app of some kind, it appears.

                                                                                         

                                                                                        FWIW-

                                                                                        The GUID's for all products included in an install can be found in the xml file left in this directory after an install:

                                                                                         

                                                                                        "C:\Windows\SolidWorks\IM_20090-40401-1100-100\sldim\sldIM_source.xml"

                                                                                        (substitute your install version for "IM_20090-40401-1100-100")

                                                                                         

                                                                                        You'll see a line like typical for all products:

                                                                                        "<ProductCode>{A716DA99-3424-42A4-B075-DF8C0AB35955}</ProductCode>"

                                                                                         

                                                                                        Put this in a batch like this (minus quotes) and the product should uninstall if available:

                                                                                        ":SolidWorks 2009 x64 Edition SP04.1"
                                                                                        "MsiExec.exe /x {A716DA99-3424-42A4-B075-DF8C0AB35955} /norestart /passive"

                                                                                         

                                                                                        Alternatively, ORCA Msi editor can be used to find the Product Code.

                                                                                         

                                                                                        In ORCA, open the install .msi, in  the left pane select "Properties", in the right scroll down to "Product Code"

                                                                                         

                                                                                        Message was edited by: Marcus Monaghan

                                                                                          • Re: Admin Image w/ UNinstall?
                                                                                            Jason Capriotti

                                                                                            Yeah, another script preceding this one passes the variable on whether a particular major version is installed.

                                                                                             

                                                                                            I check by looking for the "exe" file in program files\Solidworks. Of course this won't work if its not installed in the right place but since my scripts installed the program, its safe to say the path is correct 99.9% of the time.


                                                                                            Here's the code:

                                                                                             

                                                                                            :ISInstalled
                                                                                            ::Set all install variables to "NO", then change them to "Yes" if present
                                                                                            SET SWXINSTALLED2008=NO
                                                                                            SET EDWINSTALLED2008=NO
                                                                                            SET SWEINSTALLED2008=NO
                                                                                            SET DWGINSTALLED2008=NO
                                                                                            SET CWINSTALLED2008=NO
                                                                                            SET CMINSTALLED2008=NO
                                                                                            SET CFINSTALLED2008=NO

                                                                                             

                                                                                            SET SWXINSTALLED=NO
                                                                                            SET EDWINSTALLED=NO
                                                                                            SET SWEINSTALLED=NO
                                                                                            SET PVINSTALLED=NO
                                                                                            SET DWGINSTALLED=NO
                                                                                            SET CWINSTALLED=NO
                                                                                            SET CMINSTALLED=NO
                                                                                            SET CFINSTALLED=NO

                                                                                             

                                                                                            :: 2008 x32 install check
                                                                                            if exist %SWXPATH32_2008% SET SWXINSTALLED2008=YES
                                                                                            if exist %EDWPATH32_2008% SET EDWINSTALLED2008=YES
                                                                                            if exist %SWXEPATH32_2008% SET SWEINSTALLED2008=YES
                                                                                            if exist %DWGEPATH32_2008% SET DWGINSTALLED2008=YES
                                                                                            if exist %COSMOSWPATH2008% SET CWINSTALLED2008=YES
                                                                                            if exist %COSMOSMPATH2008% SET CMINSTALLED2008=YES
                                                                                            if exist %COSMOSFPATH2008% SET CFINSTALLED2008=YES

                                                                                             

                                                                                            if %WINVER% == x64 goto 2008x64chk
                                                                                            goto 2009x32chk

                                                                                             

                                                                                            ::2008 x64 install check
                                                                                            :2008x64chk
                                                                                            if exist %SWXPATH64_2008% SET SWXINSTALLED2008=YES
                                                                                            if exist %EDWPATH64_2008% SET EDWINSTALLED2008=YES
                                                                                            if exist %SWXEPATH64_2008% SET SWEINSTALLED2008=YES
                                                                                            if exist %DWGEPATH64_2008% SET DWGINSTALLED2008=YES
                                                                                            if exist %COSMOSWPATH2008% SET CWINSTALLED2008=YES
                                                                                            if exist %COSMOSMPATH2008% SET CMINSTALLED2008=YES
                                                                                            if exist %COSMOSFPATH2008% SET CFINSTALLED2008=YES

                                                                                             

                                                                                            ::2009 x32 install check
                                                                                            :2009x32chk
                                                                                            if exist %SWXPATH32% SET SWXINSTALLED=YES
                                                                                            if exist %EDWPATH32% SET EDWINSTALLED=YES
                                                                                            if exist %SWXEPATH32% SET SWEINSTALLED=YES
                                                                                            if exist %PVPATH32% SET PVINSTALLED=YES
                                                                                            if exist %DWGEPATH32% SET DWGINSTALLED=YES
                                                                                            if exist %COSMOSWPATH% SET CWINSTALLED=YES
                                                                                            if exist %COSMOSMPATH% SET CMINSTALLED=YES
                                                                                            if exist %COSMOSFPATH% SET CFINSTALLED=YES

                                                                                             

                                                                                            if %WINVER% == x64 goto 2009x64chk
                                                                                            goto ENDCHK

                                                                                             

                                                                                            ::2009 x64 install check
                                                                                            :2009x64chk
                                                                                            if exist %SWXPATH32% SET SWXINSTALLED=YES
                                                                                            if exist %EDWPATH64% SET EDWINSTALLED=YES
                                                                                            if exist %SWXEPATH64% SET SWEINSTALLED=YES
                                                                                            if exist %PVPATH64% SET PVINSTALLED=YES
                                                                                            if exist %DWGEPATH64% SET DWGINSTALLED=YES
                                                                                            if exist %COSMOSWPATH% SET CWINSTALLED=YES
                                                                                            if exist %COSMOSMPATH% SET CMINSTALLED=YES
                                                                                            if exist %COSMOSFPATH% SET CFINSTALLED=YES

                                                                                             

                                                                                            :ENDCHK

                                                                            • Re: Admin Image w/ UNinstall?
                                                                              Tom Helsley

                                                                              Got the button to launch the IM.exe from the html file.  Turns out I didn't have the quotes and the paths quite right.  This is what it had to be for 2010 SP2EV:

                                                                              WshShell.Run "C:\WINDOWS\SolidWorks\IM_20100-40200-1000-200\sldim\sldIM.exe /Remove C:\WINDOWS\SolidWorks\IM_20100-40200-1000-200\sldim\sldIM_installed.xml"

                                                                               

                                                                              It doesn't matter where you launch this command from, it looks for everything it needs on the client machine.  I noticed that once the line is executed, it doesn't wait for that task to complete.  It just continues on to the next lines of code.  So I don't see how I can make it wait until that task is finished, before continuing to the next line of code.    I think that will also happen in the vbs file.

                                                                               

                                                                              If there was a way to make it run silently from here, then it would at least one less mouse-click.