Problem using { and } caracters in action script

(imported topic written by arnaud91)

Hi,

I have a problem to create a task that should do the following :

delete __createfile   createfile until __End_of_File @echo off msiexec.exe /qn /uninstall 
{405B593A-7D30-4649-980C-D01607995887
} /norestart __End_of_File   move __createfile uninstall.bat wait 
"{pathname of client folder of site "BESSupport
" & "\RunQuiet.exe
"}" 
"{pathname of client folder of current site}\uninstall.bat"

But if I try to deploy this task, the line beginning with “msiexec” and containing { and } characters reports as “failed”.

How can I use these characters in action script ?

Arnaud.

(imported comment written by dgibson91)

{} is used for relevance substitution

try replacing { with {"{"}

like this:

msiexec.exe /qn /uninstall {"{"}405B593A-7D30-4649-980C-D01607995887} /norestart

(imported comment written by jessewk)

Even easier:

msiexec.exe /qn /uninstall {{405B593A-7D30-4649-980C-D01607995887} /norestart

(imported comment written by arnaud91)

Thanks for your quick answers.

I tried Jesse solution, it’s working great now.

(imported comment written by pcaprio91)

I have the following line in my action script (just 1 of 6 pieces of software to uninstall)

wait msiexec.exe /uninstall {{B7B9409A-4496-4080-9F17-0557F347BCAF} /qn /norestart

The entire task completes successfully and uninstalls the other pieces of software and reboots the PC.

I log back in and find that this one piece of software did not uninstall.

I can manually uninstall the software from command line

msiexec.exe /X{B7B9409A-4496-4080-9F17-0557F347BCAF} /qn /norestart

and even from Add/Remove Programs.

But when part of the custom task, it will not uninstall.

Any suggestions?

(imported comment written by BenKus)

Those commands are slightly different… have you tried:

wait msiexec.exe /X{{B7B9409A-4496-4080-9F17-0557F347BCAF} /qn /norestart

Ben

(imported comment written by pcaprio91)

Hello Ben,

Yes I tried the /X and still didnt uninstall.

(imported comment written by BenKus)

BigFix isn’t doing anything special except running the command so it might be an issue with the SYSTEM account… You might try running from the command line but using the SYSTEM account and see what kind of results you get:

http://forum.bigfix.com/viewtopic.php?id=1098

Ben

(imported comment written by pcaprio91)

Ben,

I did the test you recommended, and it worked ok.

Just cant get the BES action script to remove the one app.

(imported comment written by BenKus)

I am not sure what is going on because the application shouldn’t care who launched it (in fact it doesn’t even know)…

You might try this as a shot in the dark:

waithidden cmd.exe /C msiexec.exe /X{{B7B9409A-4496-4080-9F17-0557F347BCAF} /qn /norestart

Ben

(imported comment written by pcaprio91)

I tried both

waithidden cmd.exe /C msiexec.exe /X{{B7B9409A-4496-4080-9F17-0557F347BCAF} /qn /norestart

and

waithidden cmd.exe /C msiexec.exe /uninstall {{B7B9409A-4496-4080-9F17-0557F347BCAF} /qn /norestart

and this one application still does not get uninstalled.

(imported comment written by BenKus)

I am close to out of ideas… Maybe try with RunAsCurrentUser and see if that works?

Ben

(imported comment written by pcaprio91)

hello Ben,

I found during some testing with the msiexec command on the computer I am trying to uninstall the software on, if i use

MsiExec.exe /X{{B7B9409A-4496-4080-9F17-0557F347BCAF} /quiet

the software uninstalls fine.

if I use

MsiExec.exe /X{{B7B9409A-4496-4080-9F17-0557F347BCAF} /qn

nothing happens.

so I tried the following.

delete __appendfile

appendfile MsiExec.exe /X{{B7B9409A-4496-4080-9F17-0557F347BCAF} /quiet

move __appendfile delBSP.bat

extract RunAsCurrentUser-202exe.tmp

wait “{(pathname of client folder of current site) & “__Download\RunAsCurrentUser-2.0.exe”}” --w delBSP.bat

and also

delete __appendfile

appendfile MsiExec.exe /X{{B7B9409A-4496-4080-9F17-0557F347BCAF} /quiet

move __appendfile delBSP.bat

extract RunAsCurrentUser-202exe.tmp

wait “{(pathname of client folder of current site) & “__Download\RunAsCurrentUser-2.0.exe”}” --r delBSP.bat

I still cannot get BES to uninstall this one particular piece of software.

(imported comment written by ktm_200091)

pcaprio,

are you sure that the product code exists in hklm\software\classes\installer\products\Product Code?

If it doesn’t the app could have been installed only to the locally logged on user as opposed to ALLUSERS.

In this case you would need to do a command like msiexec /x “\servername\sharename\msiname.msi” /qn