Jump to content


New Members
  • Posts

  • Joined

  • Last visited

JMan's Achievements


Newbie (1/14)



  1. THIS IS BRILLIANT!!!!! it worked as a package with a program..... I forgot that the program had an option to run as user!!! Excellent. Can't tell you how much I appreciate it!
  2. Hi, I've been having problems with an install for a looong time. I need to install the latest Salesforce plugin for outlook on my companies computer but many different versions are installed which I need to uninstall prior to installing the newer version.To do so, I have found a Powershell script that if I run from PS ISE works correctly however, if I do it from a task sequence it says it has run but it doesn't do anything.This is how I did it: Created a package with the .ps1 file with no program. Added a Run powershell script step where I invoke the package and specified the script name. After many troubleshooting I think it could have to do with the account the task sequence is executed.The PS script is the following: $uninstall32 = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "Salesforce*" } | select UninstallString $uninstall64 = gci "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "Salesforce*" } | select UninstallString if ($uninstall64) { $uninstall64 = $uninstall64.UninstallString -Replace "msiexec.exe","" -Replace "/I","" -Replace "/X","" $uninstall64 = $uninstall64.Trim() Write "Uninstalling..." start-process "msiexec.exe" -arg "/X $uninstall64 /q" -Wait} if ($uninstall32) { $uninstall32 = $uninstall32.UninstallString -Replace "msiexec.exe","" -Replace "/I","" -Replace "/X","" $uninstall32 = $uninstall32.Trim() Write "Uninstalling..." start-process "msiexec.exe" -arg "/X $uninstall32 /q" -Wait} it should find the uninstall string for the app and execute it. Also, the app I'm trying to find is installed on the user profile, and if the uninstall string is run from another account it wont find it.... this is why I think it might have to do with the account
  • Create New...