Remove App Using Powershell












0















I have the following powershell script, but the result returned is always 1603 even when running with elevated rights, as administrator.



     $app = Get-WmiObject -Class Win32_Product -Filter "Name = 'Microsoft Visio Standard 2013'"

if ($app) {
echo $app
$app.Uninstall()
}


Error returned:



IdentifyingNumber : {90150000-0053-0000-0000-0000000FF1CE}
Name : Microsoft Visio Standard 2013
Vendor : Microsoft Corporation
Version : 15.0.4569.1506
Caption : Microsoft Visio Standard 2013

__GENUS : 2
__CLASS : __PARAMETERS
__SUPERCLASS :
__DYNASTY : __PARAMETERS
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
ReturnValue : 1603
PSComputerName :


Is anyone able to help?



MSI Logs when trying the uninstall string




msiexec.exe /x {90150000-0053-0000-0000-0000000FF1CE} /l*v %temp%Uninstall.Log /qn /norestart




MSI (s) (18:E4) [16:35:25:521]: Windows Installer removed the product. Product Name: Microsoft Visio Standard 2013. Product Version: 15.0.4569.1506. Product Language: 0. Manufacturer: Microsoft Corporation. Removal success or error status: 1603.



MSI (s) (18:E4) [16:35:25:521]: Attempting to delete file C:WindowsInstaller7c8008.mst
MSI (s) (18:E4) [16:35:25:526]: Deferring clean up of packages/files, if any exist
MSI (s) (18:E4) [16:35:25:526]: Attempting to delete file C:WindowsInstaller7c8008.mst
MSI (s) (18:E4) [16:35:25:527]: Unable to delete the file outside of the engine. LastError = 2
MSI (s) (18:E4) [16:35:25:527]: MainEngineThread is returning 1603
MSI (s) (18:50) [16:35:25:530]: RESTART MANAGER: Session closed.
MSI (s) (18:50) [16:35:25:530]: No System Restore sequence number for this installation.
=== Logging stopped: 28/01/2019 16:35:25 ===
MSI (s) (18:50) [16:35:25:532]: User policy value 'DisableRollback' is 0
MSI (s) (18:50) [16:35:25:532]: Machine policy value 'DisableRollback' is 0
MSI (s) (18:50) [16:35:25:532]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (18:50) [16:35:25:532]: Note: 1: 1402 2: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionInstallerRollbackScripts 3: 2
MSI (s) (18:50) [16:35:25:532]: Note: 1: 1402 2: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionInstallerRollbackScripts 3: 2
MSI (s) (18:50) [16:35:25:532]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (18:50) [16:35:25:533]: Destroying RemoteAPI object.
MSI (s) (18:78) [16:35:25:533]: Custom Action Manager thread ending.
MSI (c) (58:B0) [16:35:25:536]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (58:B0) [16:35:25:536]: MainEngineThread is returning 1603
=== Verbose logging stopped: 28/01/2019 16:35:25 ===










share|improve this question

























  • That's no error, that is the output of Write-Output $app (echo is just an alias for that cmdlet). IS the app uninstalled?

    – LotPings
    Jan 15 at 17:15











  • Sorry, I understand what you mean. It isn't an error as such. I meant that the value of 1603 returned from the Uninstall method is indicating that the program is not uninstalling. No, it doesn't uninstall.

    – RLBChrisBriant
    Jan 16 at 9:18








  • 1





    That exit code is unfortunately a generic MSI failure code. The official MSI documentation states that 1603 translates to "A fatal error occurred during installation." Run the MSI uninstall manually with a verbose logging and it should give you clues as to why its failing. (Command: msiexec.exe /x {90150000-0053-0000-0000-0000000FF1CE} /l*v %temp%Uninstall.Log /qn /norestart) If you need help, post the log and we can help.

    – Paul G
    Jan 28 at 2:14











  • Hi, with this command, it still remains on the system, but i have the logs. I will update the main question with the MSI log.

    – RLBChrisBriant
    2 days ago













  • [16:35:25:527]: Unable to delete the file outside of the engine. LastError = 2 MSI (s) (18:E4) This is the failing statement. Could you check if the file C:WindowsInstaller7c8008.mst is still present on your system, or if the permissions are messed up?

    – Ultrasonic54321
    2 days ago


















0















I have the following powershell script, but the result returned is always 1603 even when running with elevated rights, as administrator.



     $app = Get-WmiObject -Class Win32_Product -Filter "Name = 'Microsoft Visio Standard 2013'"

if ($app) {
echo $app
$app.Uninstall()
}


Error returned:



IdentifyingNumber : {90150000-0053-0000-0000-0000000FF1CE}
Name : Microsoft Visio Standard 2013
Vendor : Microsoft Corporation
Version : 15.0.4569.1506
Caption : Microsoft Visio Standard 2013

__GENUS : 2
__CLASS : __PARAMETERS
__SUPERCLASS :
__DYNASTY : __PARAMETERS
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
ReturnValue : 1603
PSComputerName :


Is anyone able to help?



MSI Logs when trying the uninstall string




msiexec.exe /x {90150000-0053-0000-0000-0000000FF1CE} /l*v %temp%Uninstall.Log /qn /norestart




MSI (s) (18:E4) [16:35:25:521]: Windows Installer removed the product. Product Name: Microsoft Visio Standard 2013. Product Version: 15.0.4569.1506. Product Language: 0. Manufacturer: Microsoft Corporation. Removal success or error status: 1603.



MSI (s) (18:E4) [16:35:25:521]: Attempting to delete file C:WindowsInstaller7c8008.mst
MSI (s) (18:E4) [16:35:25:526]: Deferring clean up of packages/files, if any exist
MSI (s) (18:E4) [16:35:25:526]: Attempting to delete file C:WindowsInstaller7c8008.mst
MSI (s) (18:E4) [16:35:25:527]: Unable to delete the file outside of the engine. LastError = 2
MSI (s) (18:E4) [16:35:25:527]: MainEngineThread is returning 1603
MSI (s) (18:50) [16:35:25:530]: RESTART MANAGER: Session closed.
MSI (s) (18:50) [16:35:25:530]: No System Restore sequence number for this installation.
=== Logging stopped: 28/01/2019 16:35:25 ===
MSI (s) (18:50) [16:35:25:532]: User policy value 'DisableRollback' is 0
MSI (s) (18:50) [16:35:25:532]: Machine policy value 'DisableRollback' is 0
MSI (s) (18:50) [16:35:25:532]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (18:50) [16:35:25:532]: Note: 1: 1402 2: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionInstallerRollbackScripts 3: 2
MSI (s) (18:50) [16:35:25:532]: Note: 1: 1402 2: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionInstallerRollbackScripts 3: 2
MSI (s) (18:50) [16:35:25:532]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (18:50) [16:35:25:533]: Destroying RemoteAPI object.
MSI (s) (18:78) [16:35:25:533]: Custom Action Manager thread ending.
MSI (c) (58:B0) [16:35:25:536]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (58:B0) [16:35:25:536]: MainEngineThread is returning 1603
=== Verbose logging stopped: 28/01/2019 16:35:25 ===










share|improve this question

























  • That's no error, that is the output of Write-Output $app (echo is just an alias for that cmdlet). IS the app uninstalled?

    – LotPings
    Jan 15 at 17:15











  • Sorry, I understand what you mean. It isn't an error as such. I meant that the value of 1603 returned from the Uninstall method is indicating that the program is not uninstalling. No, it doesn't uninstall.

    – RLBChrisBriant
    Jan 16 at 9:18








  • 1





    That exit code is unfortunately a generic MSI failure code. The official MSI documentation states that 1603 translates to "A fatal error occurred during installation." Run the MSI uninstall manually with a verbose logging and it should give you clues as to why its failing. (Command: msiexec.exe /x {90150000-0053-0000-0000-0000000FF1CE} /l*v %temp%Uninstall.Log /qn /norestart) If you need help, post the log and we can help.

    – Paul G
    Jan 28 at 2:14











  • Hi, with this command, it still remains on the system, but i have the logs. I will update the main question with the MSI log.

    – RLBChrisBriant
    2 days ago













  • [16:35:25:527]: Unable to delete the file outside of the engine. LastError = 2 MSI (s) (18:E4) This is the failing statement. Could you check if the file C:WindowsInstaller7c8008.mst is still present on your system, or if the permissions are messed up?

    – Ultrasonic54321
    2 days ago
















0












0








0








I have the following powershell script, but the result returned is always 1603 even when running with elevated rights, as administrator.



     $app = Get-WmiObject -Class Win32_Product -Filter "Name = 'Microsoft Visio Standard 2013'"

if ($app) {
echo $app
$app.Uninstall()
}


Error returned:



IdentifyingNumber : {90150000-0053-0000-0000-0000000FF1CE}
Name : Microsoft Visio Standard 2013
Vendor : Microsoft Corporation
Version : 15.0.4569.1506
Caption : Microsoft Visio Standard 2013

__GENUS : 2
__CLASS : __PARAMETERS
__SUPERCLASS :
__DYNASTY : __PARAMETERS
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
ReturnValue : 1603
PSComputerName :


Is anyone able to help?



MSI Logs when trying the uninstall string




msiexec.exe /x {90150000-0053-0000-0000-0000000FF1CE} /l*v %temp%Uninstall.Log /qn /norestart




MSI (s) (18:E4) [16:35:25:521]: Windows Installer removed the product. Product Name: Microsoft Visio Standard 2013. Product Version: 15.0.4569.1506. Product Language: 0. Manufacturer: Microsoft Corporation. Removal success or error status: 1603.



MSI (s) (18:E4) [16:35:25:521]: Attempting to delete file C:WindowsInstaller7c8008.mst
MSI (s) (18:E4) [16:35:25:526]: Deferring clean up of packages/files, if any exist
MSI (s) (18:E4) [16:35:25:526]: Attempting to delete file C:WindowsInstaller7c8008.mst
MSI (s) (18:E4) [16:35:25:527]: Unable to delete the file outside of the engine. LastError = 2
MSI (s) (18:E4) [16:35:25:527]: MainEngineThread is returning 1603
MSI (s) (18:50) [16:35:25:530]: RESTART MANAGER: Session closed.
MSI (s) (18:50) [16:35:25:530]: No System Restore sequence number for this installation.
=== Logging stopped: 28/01/2019 16:35:25 ===
MSI (s) (18:50) [16:35:25:532]: User policy value 'DisableRollback' is 0
MSI (s) (18:50) [16:35:25:532]: Machine policy value 'DisableRollback' is 0
MSI (s) (18:50) [16:35:25:532]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (18:50) [16:35:25:532]: Note: 1: 1402 2: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionInstallerRollbackScripts 3: 2
MSI (s) (18:50) [16:35:25:532]: Note: 1: 1402 2: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionInstallerRollbackScripts 3: 2
MSI (s) (18:50) [16:35:25:532]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (18:50) [16:35:25:533]: Destroying RemoteAPI object.
MSI (s) (18:78) [16:35:25:533]: Custom Action Manager thread ending.
MSI (c) (58:B0) [16:35:25:536]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (58:B0) [16:35:25:536]: MainEngineThread is returning 1603
=== Verbose logging stopped: 28/01/2019 16:35:25 ===










share|improve this question
















I have the following powershell script, but the result returned is always 1603 even when running with elevated rights, as administrator.



     $app = Get-WmiObject -Class Win32_Product -Filter "Name = 'Microsoft Visio Standard 2013'"

if ($app) {
echo $app
$app.Uninstall()
}


Error returned:



IdentifyingNumber : {90150000-0053-0000-0000-0000000FF1CE}
Name : Microsoft Visio Standard 2013
Vendor : Microsoft Corporation
Version : 15.0.4569.1506
Caption : Microsoft Visio Standard 2013

__GENUS : 2
__CLASS : __PARAMETERS
__SUPERCLASS :
__DYNASTY : __PARAMETERS
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
ReturnValue : 1603
PSComputerName :


Is anyone able to help?



MSI Logs when trying the uninstall string




msiexec.exe /x {90150000-0053-0000-0000-0000000FF1CE} /l*v %temp%Uninstall.Log /qn /norestart




MSI (s) (18:E4) [16:35:25:521]: Windows Installer removed the product. Product Name: Microsoft Visio Standard 2013. Product Version: 15.0.4569.1506. Product Language: 0. Manufacturer: Microsoft Corporation. Removal success or error status: 1603.



MSI (s) (18:E4) [16:35:25:521]: Attempting to delete file C:WindowsInstaller7c8008.mst
MSI (s) (18:E4) [16:35:25:526]: Deferring clean up of packages/files, if any exist
MSI (s) (18:E4) [16:35:25:526]: Attempting to delete file C:WindowsInstaller7c8008.mst
MSI (s) (18:E4) [16:35:25:527]: Unable to delete the file outside of the engine. LastError = 2
MSI (s) (18:E4) [16:35:25:527]: MainEngineThread is returning 1603
MSI (s) (18:50) [16:35:25:530]: RESTART MANAGER: Session closed.
MSI (s) (18:50) [16:35:25:530]: No System Restore sequence number for this installation.
=== Logging stopped: 28/01/2019 16:35:25 ===
MSI (s) (18:50) [16:35:25:532]: User policy value 'DisableRollback' is 0
MSI (s) (18:50) [16:35:25:532]: Machine policy value 'DisableRollback' is 0
MSI (s) (18:50) [16:35:25:532]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (18:50) [16:35:25:532]: Note: 1: 1402 2: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionInstallerRollbackScripts 3: 2
MSI (s) (18:50) [16:35:25:532]: Note: 1: 1402 2: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionInstallerRollbackScripts 3: 2
MSI (s) (18:50) [16:35:25:532]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (18:50) [16:35:25:533]: Destroying RemoteAPI object.
MSI (s) (18:78) [16:35:25:533]: Custom Action Manager thread ending.
MSI (c) (58:B0) [16:35:25:536]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (58:B0) [16:35:25:536]: MainEngineThread is returning 1603
=== Verbose logging stopped: 28/01/2019 16:35:25 ===







windows-10 powershell sccm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago







RLBChrisBriant

















asked Jan 15 at 16:46









RLBChrisBriantRLBChrisBriant

44




44













  • That's no error, that is the output of Write-Output $app (echo is just an alias for that cmdlet). IS the app uninstalled?

    – LotPings
    Jan 15 at 17:15











  • Sorry, I understand what you mean. It isn't an error as such. I meant that the value of 1603 returned from the Uninstall method is indicating that the program is not uninstalling. No, it doesn't uninstall.

    – RLBChrisBriant
    Jan 16 at 9:18








  • 1





    That exit code is unfortunately a generic MSI failure code. The official MSI documentation states that 1603 translates to "A fatal error occurred during installation." Run the MSI uninstall manually with a verbose logging and it should give you clues as to why its failing. (Command: msiexec.exe /x {90150000-0053-0000-0000-0000000FF1CE} /l*v %temp%Uninstall.Log /qn /norestart) If you need help, post the log and we can help.

    – Paul G
    Jan 28 at 2:14











  • Hi, with this command, it still remains on the system, but i have the logs. I will update the main question with the MSI log.

    – RLBChrisBriant
    2 days ago













  • [16:35:25:527]: Unable to delete the file outside of the engine. LastError = 2 MSI (s) (18:E4) This is the failing statement. Could you check if the file C:WindowsInstaller7c8008.mst is still present on your system, or if the permissions are messed up?

    – Ultrasonic54321
    2 days ago





















  • That's no error, that is the output of Write-Output $app (echo is just an alias for that cmdlet). IS the app uninstalled?

    – LotPings
    Jan 15 at 17:15











  • Sorry, I understand what you mean. It isn't an error as such. I meant that the value of 1603 returned from the Uninstall method is indicating that the program is not uninstalling. No, it doesn't uninstall.

    – RLBChrisBriant
    Jan 16 at 9:18








  • 1





    That exit code is unfortunately a generic MSI failure code. The official MSI documentation states that 1603 translates to "A fatal error occurred during installation." Run the MSI uninstall manually with a verbose logging and it should give you clues as to why its failing. (Command: msiexec.exe /x {90150000-0053-0000-0000-0000000FF1CE} /l*v %temp%Uninstall.Log /qn /norestart) If you need help, post the log and we can help.

    – Paul G
    Jan 28 at 2:14











  • Hi, with this command, it still remains on the system, but i have the logs. I will update the main question with the MSI log.

    – RLBChrisBriant
    2 days ago













  • [16:35:25:527]: Unable to delete the file outside of the engine. LastError = 2 MSI (s) (18:E4) This is the failing statement. Could you check if the file C:WindowsInstaller7c8008.mst is still present on your system, or if the permissions are messed up?

    – Ultrasonic54321
    2 days ago



















That's no error, that is the output of Write-Output $app (echo is just an alias for that cmdlet). IS the app uninstalled?

– LotPings
Jan 15 at 17:15





That's no error, that is the output of Write-Output $app (echo is just an alias for that cmdlet). IS the app uninstalled?

– LotPings
Jan 15 at 17:15













Sorry, I understand what you mean. It isn't an error as such. I meant that the value of 1603 returned from the Uninstall method is indicating that the program is not uninstalling. No, it doesn't uninstall.

– RLBChrisBriant
Jan 16 at 9:18







Sorry, I understand what you mean. It isn't an error as such. I meant that the value of 1603 returned from the Uninstall method is indicating that the program is not uninstalling. No, it doesn't uninstall.

– RLBChrisBriant
Jan 16 at 9:18






1




1





That exit code is unfortunately a generic MSI failure code. The official MSI documentation states that 1603 translates to "A fatal error occurred during installation." Run the MSI uninstall manually with a verbose logging and it should give you clues as to why its failing. (Command: msiexec.exe /x {90150000-0053-0000-0000-0000000FF1CE} /l*v %temp%Uninstall.Log /qn /norestart) If you need help, post the log and we can help.

– Paul G
Jan 28 at 2:14





That exit code is unfortunately a generic MSI failure code. The official MSI documentation states that 1603 translates to "A fatal error occurred during installation." Run the MSI uninstall manually with a verbose logging and it should give you clues as to why its failing. (Command: msiexec.exe /x {90150000-0053-0000-0000-0000000FF1CE} /l*v %temp%Uninstall.Log /qn /norestart) If you need help, post the log and we can help.

– Paul G
Jan 28 at 2:14













Hi, with this command, it still remains on the system, but i have the logs. I will update the main question with the MSI log.

– RLBChrisBriant
2 days ago







Hi, with this command, it still remains on the system, but i have the logs. I will update the main question with the MSI log.

– RLBChrisBriant
2 days ago















[16:35:25:527]: Unable to delete the file outside of the engine. LastError = 2 MSI (s) (18:E4) This is the failing statement. Could you check if the file C:WindowsInstaller7c8008.mst is still present on your system, or if the permissions are messed up?

– Ultrasonic54321
2 days ago







[16:35:25:527]: Unable to delete the file outside of the engine. LastError = 2 MSI (s) (18:E4) This is the failing statement. Could you check if the file C:WindowsInstaller7c8008.mst is still present on your system, or if the permissions are messed up?

– Ultrasonic54321
2 days ago












0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1394600%2fremove-app-using-powershell%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1394600%2fremove-app-using-powershell%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

is 'sed' thread safe

How to make a Squid Proxy server?