14 Replies Latest reply on Dec 19, 2014 5:07 AM by pangea_jl

    Problems deploying scripts




      I am trying to deply a VBScript that remove all versions of Office, before rolling out Office365 on my workstations. I have found some microsoft scripts that do the trick (OffScrub03.vbs, OffScrub07.vbs and OffScrub10.vbs). I am able to run the scripts locally on the workstations, and it removes Office. But when I deply the scripts from LANDesk, i get the following error in the log:


      Insufficient registry access permissions - exiting

      I have tried to deploy the vbs files directly using a Windows Scripts Host Package, as described here (Easy uninstall of Office 2010 products via LANDesk sdclient). I have also tried to launch the scripts via a bat script that launches the scripts with elevated permissions (run as administrator), without success. This method works fine locally on the workstation. I have tried changing the user account in the distribution package. I have tried LocalSystem, current user's account and a specified local useraccount that is local administrator. None of these worked.

      Can someone see what I am doing wrong? This is really getting to me... I desperatly need help!

        • 1. Re: Problems deploying scripts


          I have one suggestion ,

          Could you please try to deploy the package by using a Domain administrator account.

          Regards , Joby

          • 2. Re: Problems deploying scripts

            The computers in mind are not domain members. They are outside our firewall and are connected through a CSA, using Policy to deploy packages. I have a standard user with same password on every computer that is local admin.

            • 3. Re: Problems deploying scripts
              Markus.Gonser ITSMMVPGroup

              did you entered this user in your installation package?

              otherwise the package will deploy with system account.

              • 4. Re: Problems deploying scripts

                Yes, I did. Still the same error... It is member of the Administrators group on the local computers

                • 5. Re: Problems deploying scripts
                  Markus.Gonser ITSMMVPGroup

                  ok. how did you insert the username?

                  Landesk want like following: Domain\username

                  in your case you have to enter: .\username

                  • 6. Re: Problems deploying scripts
                    Frank Wils ITSMMVPGroup

                    Also, if the OS is 64-bit, make sure the 'run as 64-bit' checkbox is checked in your distribution package.



                    • 7. Re: Problems deploying scripts
                      1 of 1 people found this helpful
                      • 8. Re: Problems deploying scripts

                        I had localhost\username. Tried .\username but still no solution to the problem...

                        • 9. Re: Problems deploying scripts

                          Tried the 'run as 64-bit' option also, but still a no go.

                          • 10. Re: Problems deploying scripts

                            The Local Group Policy setting mentioned in this article (OffScrub10.vbs running under System context fails ) is interesting. I got other error messages now. Have to test more...

                            • 11. Re: Problems deploying scripts

                              Hello... I guess that the GPO lead was a dead end. I just forgot the argument ALL, and got another error than i used to get.


                              What I find strange is that i can doubleclick the vbs file on the clinet, and it runs without any prompts for rights elevation or anything else. If I publish the same script using LANDesk, and set the Account properties to "Current user's account", I get the error message saying "Insufficient registry access permissions - exiting". I have tried the following:

                              • Enabeled and disabeled "Run as a 64-bit application on 64-bit Windows".
                              • Run as LocalSystem account, Current user's account and .\localusername (user is member of local administrators group).
                              • Deployed OffScrub10.vbs directly as a Windows Script Host Package
                              • Deployed using a Batch File Package, using a BAT file to launch OffScrub10.vbs
                              • Deployed using a PowerShell Package, using the command "Start-Process OffScrub10.vbs -Verb RunAs -ArgumentList ALL". I got the error "PowerShell is not installed in the client system", even though it is working if I run it directly. The client is a Windows 8.1 computer.
                              • Tried launching the Powershell through a BAT file, using the command "powershell Start-Process OffScrub10.vbs -Verb RunAs -ArgumentList ALL". This gives me the error "No application is associated with the specified file for this operation".


                              It seems that I fail no matter how I try to deploy the script. Is there somebody that have used this script or similar VBScripts that can tell me how exactly you are deploying it?

                              • 12. Re: Problems deploying scripts

                                Have you tried a different method of uninstalling? For example WMI? Try this command on a machine with Office 2010 (note the quotes):

                                wmic product where "name like 'Microsoft Office 2010'" call uninstall /nointeractive

                                • 13. Re: Problems deploying scripts

                                  WMI really did the trick! A bachfile using WMIC to uninstall runs fine as LocalSystem. But I still have some issues...


                                  I use the following command to uninstall all Office products: wmic product where "name like 'Microsoft Office%%'" call uninstall /nointeractive


                                  This removes all the office products on the computer (there are many different modules installed) exept the main program, called Microsoft Office Standard 2010. The application is still in the list if I run VMIC PRODUCT GET NAME, the Icons is still in the start menu, and when I start any Office application, Word for instance, Windows installer starts up and repair the installation.


                                  Why is it behaving like this? How do I remove Office entierly?

                                  • 14. Re: Problems deploying scripts

                                    You may need to run the script more than once with a reboot somewhere in the middle. You mention many different modules, so yes if Office depends on these modules then logically it would be removed last and it may just be that you need to remove all of those applications, do a reboot and running the script again. I know it is always a pain with remote users, but with an application as big as Office it is not as simple as just running a script once.


                                    The leftover icons indicates something is still installed so run the script again. Or I would recommend getting a bit more specific so instead of "product where "name like 'Microsoft Office%%'"" try "product equals Microsoft Office 2010". Equals means the name has to match and you're effectively targeting a product like you would by removing it from Programs and Features in Control Panel. You know what you have from inventory (you can also get it by running "wmic product get name" from the command line to get the exact names) so script each one on a line, e.g.


                                    Run your script:

                                    wmic product where "name like 'Microsoft Office%%'" call uninstall /nointeractive

                                    THEN REBOOT

                                    Then run a second script:

                                    wmic product where "name like 'Microsoft Office%%'" call uninstall /nointeractive

                                    wmic product where name="Microsoft Office 2003" call uninstall /nointeractive

                                    wmic product where name="Microsoft Office 2007" call uninstall /nointeractive

                                    wmic product where name="Microsoft Office 2010" call uninstall /nointeractive

                                    THEN REBOOT