Uninstall profile specific applications

Hi Guys,

Im trying to uninstall applications as the last logged in user or the current user. To clarify. Applications that only show installed on that profile.

I was thinking of uninstalling using current user. but my understanding is that for 9.5 is no longer needed to download the application.

is this the case?
my understanding is that the syntax should look like the below. but I’m still confused if the application is needed to be download as the syntax does not show a __Dowload\ folder location.

waithidden RunAsCurrentUser.exe --w msiexec.exe /i MyProgram.msi /qn

Also, Have any of you had any success achieving installs/uninstalls applications that are profile specific with current user or other methods? Assistance greatly appreciated.

Guys I dont write but the basic stuff and having some strugle getting this action script to work some help with the Syntax would be greatly appreciated.

I have:
waithidden __Download\RunAsCurrentUser.exe --w –q {(AppData\Local\Programs\composer-launch-pad\"Uninstall ComposerLaunchPad.exe") /currentuser /S {of folders of folders "C:\Users"}

so, I’m trying direct path and that works and I had to take out the --w and the -q

wait __Download\RunAsCurrentUser.exe "C:\Users\Cookie\AppData\Local\Programs\composer-launch-pad\Uninstall ComposerLaunchPad.exe" /currentuser /S

I just tried this one :-/ I’m sure I’m getting my parenthesis and curlies messed up

wait __Download\RunAsCurrentUser.exe {("AppData\Local\Programs\composer-launch-pad\Uninstall ComposerLaunchPad.exe" /currentuser /S) of folders of folders "C:\Users"}
no luck :’(

You would need to have the RunAsCurrentUser.exe downloaded if you are going to use it to do the uninstall. You can also use the Override command to run as the current user. https://developer.bigfix.com/action-script/reference/execution/override.html

override wait
completion=job
hidden=true
runas=currentuser
wait __Download\patch.exe arg1 arg2 arg3
1 Like

Thank you, I knew I wasnt too crazy. override is what I was refering to.
I still have the problem of folder of folder. :thinking:

override wait
hidden=true
runas=currentuser
wait cmd /K "{(pathname of it) of file whose (name of it as string = "ComposerLaunchePad.exe") of folder "AppData\Local\Programs\composer-launch-pad\Uninstall" of folders of folders "c:\users"}" /S

Thank you Dakota. its failing :frowning:

 Q: (pathname of it) of file whose (name of it as string = "Uninstall ComposerLaunchePad.exe") of folder "AppData\Local\Programs\composer-launch-pad" of folders of folders "c:\users"
E: Singular expression refers to nonexistent object.

and I check it and to my understanding, it checks out. this is so odd >.<

sorry, looks like I added an ‘e’ between Launch and Pad in ComposerLaunchPad.exe. does it return anything after removing it?

1 Like

thank you my friend. it seems to be a hit and miss. Not sure why.
I tried with RunAsCurrentUser and then with override.

or

what is interesting is that it worked in one case. but only to 1 system???!?!

image

but when reinstalled and executed again. no go.
I really wanted to use the folder of folder. but I’m about to try a straight batch-file uploading it and then running it. might have better luck like that. and using AsCurrentUser

Are you certain the app is stopped before you try the uninstall? I’ve had some instances where I’ve had to stop services and/or terminate processes (or child processes) first before the uninstall is successful.

This is an example of how I do it for Java:
// Terminate any running Java
wait taskkill /f /im javaw.exe /t
wait taskkill /f /im java.exe /t

// Remove Java SDK 7u71
if {exists key whose (name of it contains “64A3A4F4-B792-11D6-A78A-00B0D0170710”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry}
wait MsiExec.exe /X {{64A3A4F4-B792-11D6-A78A-00B0D0170710} /qn REBOOT=ReallySuppress
endif

The results kind of makes me think that either the currently logged on user isn’t the same user that the has the app installed under their profile or there are multiple users with the app installed under their profiles.

try changing the relevance and action script to also check if the pathname contains the current user name:

exists file whose (name of it as string = “Uninstall ComposerLaunchPad.exe” AND (pathname of it as string contains (name of current user))) of folder “AppData\Local\Programs\composer-launch-pad” of folders of folders “c:\users”

“{(pathname of it) of file whose (name of it as string = “Uninstall ComposerLaunchPad.exe” AND (pathname of it as string contains (name of current user))) of folder “AppData\Local\Programs\composer-launch-pad” of folders of folders “c:\users” }”

I have been able to remove the application with a .bat script if ran manually. I dont have any services or task kills. However, I can add this for good measure. Thank you for the advise.

great, let me try this out ^.^ thank you.

I entered it in the fixlet debugger and added the missing parethsis but not able to see what else is missing :-/

q: (pathname of it) of file whose ((name of it as string = “Uninstall ComposerLaunchPad.exe”) AND (pathname of it as string contains (name of current user))) of folder “AppData\Local\Programs\composer-launch-pad” of folders of folders “c:\users”

ok, I took from the working one but Im getting the none existing error. but, the folder is there :-/