Need help writing a fixlet to uninstall dropbox. Having trouble because Dropbox installs itself in the user’s profile and I want to do a silent uninstall. I can invoke the uninstaller using runascurrentuser.exe but it triggers UAC which gives the user the opportunity to cancel. Is there a way to get this working? Here is my current action script:
run __Download\RunAsCurrentUser.exe --w --q {value “UninstallString” of keys “Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox” of keys of key “HKEY_USERS” of registry as string & " /S"}
Now I’m really confused. I got this to run in the QnA tool:
parameter “sid” = “{component string of sid of security account (“DOMAIN” & name of current user)}”
waithidden {value “UninstallString” of keys (“HKEY_USERS” & (parameter “sid”) & “\Software\Microsoft\Windows\CurrentVersion\Uninstall\SkyDriveSetup.exe”) of registry as string}
Then I ran it in a fixlet and I got this error in the logs:
Command failed (Relevance substitution failed) parameter “sid” = “{component string of sid of security account (“DOMAIN” & name of current user)}”
And then when I went back and ran it in QnA again, it failed with:
evaluation error - Relevance clauses must be surrounded by { and } guards.
waithidden __Download\RunAsCurrentUser-2.0.3.1.exe --w --q {value "UninstallString" of key "Software\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome" of current user keys (logged on users) of registry} --force-uninstall
run {value “UninstallString” of key “Software\Microsoft\Windows\CurrentVersion\Uninstall\SkyDrive.exe” of current user keys (logged on users) of registry as string}
and I get error Singular expression refers to nonexistent object.
I installed skydrive and used an action to successfully uninstall it silently. see below.
I think the relevance I gave you will fail in the relevance debugger, but will work in the context of the agent.
In order to test this relevance you will need to download the
client API tester
try this for your action:
waithidden __Download\RunAsCurrentUser-2.0.3.1.exe --w --q {value "UninstallString" of key "Software\Microsoft\Windows\CurrentVersion\Uninstall\SkyDriveSetup.exe" of current user keys (logged on users) of registry} /silent
q: value “UninstallString” of key whose((it = “Adobe Flash Player 11 ActiveX”) of (value “DisplayName” of it)) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry as string
waithidden __Download\RunAsCurrentUser-2.0.3.1.exe --w --q {value “UninstallString” of key “Software\Microsoft\Windows\CurrentVersion\Uninstall\SkyDriveSetup.exe” of current user keys (logged on users) of registry} /silent
Then remember logged on user and current user only work in when evaluated by the agent. I’d change it to use the singular and check there is a “current user” logged on before running it.
If you are using TEM 8.2 or better you can also do the following which doesn’t need to download a program:
override wait
hidden=true
runas=currentuser
wait __Download\RunAsCurrentUser-2.0.3.1.exe --w --q {value “UninstallString” of key “Software\Microsoft\Windows\CurrentVersion\Uninstall\SkyDriveSetup.exe” of current user key (current user) of registry} /silent
Correcting myself here. This is what the command would look like then (no need for the program - cut and paste bit me):
override wait
hidden=true
runas=currentuser
wait {value “UninstallString” of key “Software\Microsoft\Windows\CurrentVersion\Uninstall\SkyDriveSetup.exe” of current user key (current user) of registry} /silent