This project has moved and is read-only. For the latest updates, please go here.

[Closed] Powershell script is not running

Topics: Publishing Issue
Dec 2, 2013 at 12:01 PM
Powershell script is not running under custom update, please share if any extra parameters needed to add
Dec 2, 2013 at 8:30 PM
Please start WPP, select the update and click on the "Id" link. This will open an Explorer window, open the folder and get the guid.xml file.

On a client where you have run the custom update, go to "C:\Windows\Temp" and get the CustomUpdateEngine.xml file.
Send me these two files at package.publisher@free.fr
Dec 10, 2013 at 7:32 AM
Apologies for the delay in response.


CustomUpdateEngine

10-12-2013 12:56:54 ========================================================================================================================
10-12-2013 12:56:54 Starting CustomUpdateEngine with ActionFile : 4767bfec-92cc-46b6-93cc-9eb6ea366210.xml
10-12-2013 12:56:54 Starting parsing ActionFile.
10-12-2013 12:56:54 Get Element from : <Action>
<ElementType>CustomUpdateElements.KillProcessElement</ElementType>
<ProcessName>iexplore</ProcessName>
</Action>
10-12-2013 12:56:54 Initializing KillProcess with : <Action>
<ElementType>CustomUpdateElements.KillProcessElement</ElementType>
<ProcessName>iexplore</ProcessName>
</Action>
10-12-2013 12:56:54 End of Initializing of KillProcess.
10-12-2013 12:56:54 Get Element from : <Action>
<ElementType>CustomUpdateElements.ScriptElement</ElementType>
<ScriptType>Powershell</ScriptType>
<Filename>-ExecutionPolicy Unrestricted -file "C:\Windows\SoftwareDistribution\Download\Install\JavaJDK_Uninstall.ps1"</Filename>
<Arguments></Arguments>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable />
</Action>
10-12-2013 12:56:54 Get ScriptElement from : <Action>
<ElementType>CustomUpdateElements.ScriptElement</ElementType>
<ScriptType>Powershell</ScriptType>
<Filename>-ExecutionPolicy Unrestricted -file "C:\Windows\SoftwareDistribution\Download\Install\JavaJDK_Uninstall.ps1"</Filename>
<Arguments></Arguments>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable />
</Action>
10-12-2013 12:56:54 End of Initializing of ScriptElement.
10-12-2013 12:56:54 Get Element from : <Action>
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>jdk-7u45-windows-x86.exe</PathToExecutable>
<Parameters>/s</Parameters>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable />
</Action>
10-12-2013 12:56:54 Get ExecutableElement from : <Action>
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>jdk-7u45-windows-x86.exe</PathToExecutable>
<Parameters>/s</Parameters>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable />
</Action>
10-12-2013 12:56:54 Instance ExecutableElement successful.
10-12-2013 12:56:54 Running 3 Elements.
10-12-2013 12:56:54 Running CustomUpdateEngine.KillProcessElement
10-12-2013 12:56:54 Running KillProcess.
10-12-2013 12:56:54 Will try to kill : iexplore
10-12-2013 12:56:54 End of killing session.
10-12-2013 12:56:54 Running CustomUpdateEngine.ScriptElement
10-12-2013 12:56:55 Running ScriptElement.
10-12-2013 12:56:55 Running : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe With arguments : "-ExecutionPolicy Unrestricted -file "C:\Windows\SoftwareDistribution\Download\Install\JavaJDK_Uninstall.ps1""
10-12-2013 12:56:55 -ExecutionPolicy Unrestricted -file "C:\Windows\SoftwareDistribution\Download\Install\JavaJDK_Uninstall.ps1", not found !
10-12-2013 12:56:55 End of ScriptElement.
10-12-2013 12:56:55 Running CustomUpdateEngine.ExecutableElement
10-12-2013 12:56:55 Running ExecutableElement.
10-12-2013 12:56:55 Path To Executable starting with : jdk-7u45-windows-x86.exe
10-12-2013 12:56:55 Path To Executable ending with : jdk-7u45-windows-x86.exe
10-12-2013 12:56:55 Running : jdk-7u45-windows-x86.exe With arguments : /s
10-12-2013 12:59:34 Exiting process.
10-12-2013 12:59:34 End of running ExecutableElement.

4767bfec-92cc-46b6-93cc-9eb6ea366210

<CustomUpdate>
<Action>
<ElementType>CustomUpdateElements.KillProcessElement</ElementType>
<ProcessName>iexplore</ProcessName>
</Action>
<Action>
<ElementType>CustomUpdateElements.ScriptElement</ElementType>
<ScriptType>Powershell</ScriptType>
<Filename>-ExecutionPolicy Unrestricted -file "C:\Windows\SoftwareDistribution\Download\Install\JavaJDK_Uninstall.ps1"</Filename>
<Arguments></Arguments>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable/>
</Action>
<Action>
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>jdk-7u45-windows-x86.exe</PathToExecutable>
<Parameters>/s</Parameters>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable/>
</Action>
</CustomUpdate>
Dec 10, 2013 at 8:42 AM
did few changes and tried but still failure

10-12-2013 13:22:52 ========================================================================================================================
10-12-2013 13:22:52 Starting CustomUpdateEngine with ActionFile : b92a3877-150e-44d8-a2fa-f91f3962f973.xml
10-12-2013 13:22:52 Starting parsing ActionFile.
10-12-2013 13:22:52 Get Element from : <Action>
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe</PathToExecutable>
<Parameters>- file "C:\Windows\SoftwareDistribution\Download\Install\JavaJDK_Uninstall.ps1"</Parameters>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable />
</Action>
10-12-2013 13:22:52 Get ExecutableElement from : <Action>
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe</PathToExecutable>
<Parameters>- file "C:\Windows\SoftwareDistribution\Download\Install\JavaJDK_Uninstall.ps1"</Parameters>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable />
</Action>
10-12-2013 13:22:52 Instance ExecutableElement successful.
10-12-2013 13:22:52 Get Element from : <Action>
<ElementType>CustomUpdateElements.WaitElement</ElementType>
<Wait>120</Wait>
</Action>
10-12-2013 13:22:52 Initializing WaitElement with : <Action>
<ElementType>CustomUpdateElements.WaitElement</ElementType>
<Wait>120</Wait>
</Action>
10-12-2013 13:22:52 End of Initializing of WaitElement.
10-12-2013 13:22:52 Get Element from : <Action>
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>jdk-7u45-windows-x86.exe</PathToExecutable>
<Parameters>/s</Parameters>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable />
</Action>
10-12-2013 13:22:52 Get ExecutableElement from : <Action>
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>jdk-7u45-windows-x86.exe</PathToExecutable>
<Parameters>/s</Parameters>
<KillProcess>False</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
<Variable />
</Action>
10-12-2013 13:22:52 Instance ExecutableElement successful.
10-12-2013 13:22:52 Running 3 Elements.
10-12-2013 13:22:52 Running CustomUpdateEngine.ExecutableElement
10-12-2013 13:22:52 Running ExecutableElement.
10-12-2013 13:22:52 Path To Executable starting with : %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
10-12-2013 13:22:52 Path To Executable ending with : C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe
10-12-2013 13:22:52 Running : C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe With arguments : - file "C:\Windows\SoftwareDistribution\Download\Install\JavaJDK_Uninstall.ps1"
10-12-2013 13:22:58 Exiting process.
10-12-2013 13:22:58 End of running ExecutableElement.
10-12-2013 13:22:58 Running CustomUpdateEngine.WaitElement
10-12-2013 13:22:58 Running WaitElement.
10-12-2013 13:24:58 End waiting.
10-12-2013 13:24:58 Running CustomUpdateEngine.ExecutableElement
10-12-2013 13:24:58 Running ExecutableElement.
10-12-2013 13:24:58 Path To Executable starting with : jdk-7u45-windows-x86.exe
10-12-2013 13:24:58 Path To Executable ending with : jdk-7u45-windows-x86.exe
10-12-2013 13:24:58 Running : jdk-7u45-windows-x86.exe With arguments : /s
10-12-2013 13:26:31 Exiting process.
10-12-2013 13:26:31 End of running ExecutableElement.
Marked as answer by DCourtel on 9/13/2014 at 12:46 PM