CustomUpdateEngine.exe and ampersands in executable lines

Topics: Configuration Issue
Jun 11, 2014 at 3:46 PM
Edited Jun 11, 2014 at 3:47 PM
Hi

I noticed in the CustomUpdateEngine.exe xml parsing of '&' fails. I'm not sure why but here's the details:
===========================================================
6/11/2014 11:29:50 AM Starting CustomUpdateEngine with ActionFile : 805bdb03-a762-4a18-b6e8-b5f579f0fad5.xml
6/11/2014 11:29:50 AM Starting parsing ActionFile.
6/11/2014 11:29:50 AM Get Element from : <Action>
<ElementType>CustomUpdateElements.VariableElement</ElementType>
<Name>ProPlus2007</Name>
<Type>Int</Type>
<ID>6d844172-22be-4b86-8d4c-a70c63cf14be</ID>
</Action>
6/11/2014 11:29:50 AM Get VariableElement from : <Action>
<ElementType>CustomUpdateElements.VariableElement</ElementType>
<Name>ProPlus2007</Name>
<Type>Int</Type>
<ID>6d844172-22be-4b86-8d4c-a70c63cf14be</ID>
</Action>
6/11/2014 11:29:50 AM Get Element from : <Action>
<ElementType>CustomUpdateElements.VariableElement</ElementType>
<Name>Proplus2010</Name>
<Type>Int</Type>
<ID>d4ba7895-1856-41b1-bbea-2a1cfbd238d4</ID>
</Action>
6/11/2014 11:29:50 AM Get VariableElement from : <Action>
<ElementType>CustomUpdateElements.VariableElement</ElementType>
<Name>Proplus2010</Name>
<Type>Int</Type>
<ID>d4ba7895-1856-41b1-bbea-2a1cfbd238d4</ID>
</Action>
6/11/2014 11:29:50 AM Error when parsing ActionFile : An error occurred while parsing EntityName. Line 17, position 290.
The XML action file (portion of it):
<Action>
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>c:\windows\system32\cmd.exe</PathToExecutable>
<Parameters>/c if exist "c:\MSOCache\All Users{90120000-0030-0000-0000-0000000FF1CE}-C\setup.exe" ( "c:\MSOCache\All Users{90120000-0030-0000-0000-0000000FF1CE}-C\setup.exe" /uninstall Enterprise /config "C:\Windows\SoftwareDistribution\Download\Install\OfficeUninstall\Enterprise.xml" && rmdir /s /q "c:\MSOCache\All Users{90120000-0030-0000-0000-0000000FF1CE}-C")</Parameters>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable>6d844172-22be-4b86-8d4c-a70c63cf14be</Variable>
</Action>

I'm doing this action to look for the office 2007 install, uninstall it then if successful (the double ampersand &&) remove the directory once complete as it's left over after the uninstall. I could break it out however I'd run the risk of the uninstall failing then having the next sequence purging the setup so I can't uninstall it after I fix the initial issue.
Coordinator
Jun 11, 2014 at 5:20 PM
ExecutableElement is not made to be used like this.

You can either :
  • Write a VbScript and launch it.
  • Try to copy lines in your "Parameters" field into a file and execcute it with cmd.exe
Jun 11, 2014 at 5:33 PM
I forgot about placing the parameters in cmd file.

I ended up breaking out the execution. Since I knew only the setup.exe and setup.xml would exist at the end of a successful uninstall, I placed this into the paramerters section: "IF NOT EXIST .cab IF NOT EXIST .MSI rmdir /s /q "c:\MSOCache\All Users{90120000-0030-0000-0000-0000000FF1CE}-C"" of the execution after the uninstallation of that ProductCode.
Marked as answer by DCourtel on 8/1/2014 at 1:02 AM