Open a PowerShell Window as Administrator; Run the following command: (Get-WmiObject -Class Win32Product -Filter 'Name='Symantec Endpoint Protection' -ComputerName. ).Uninstall A successful uninstall will return a message that ends with 'ReturnValue: 0' DOS Command Prompt. Log on to the computer with administrator rights.
Active7 years, 11 months ago
I'm try to run
msiexec in PowerShell but I keep getting an error message. If I run it from cmd then it's all fine.
Can someone please let me know how I can run this command in PowerShell?
This is the command I have typed in PowerShell:
When I try to run the command then the Windows Installer help window pops up:
Siim K
![]()
6,15766 gold badges4141 silver badges6666 bronze badges
user630320user630320
1 Answer
It happens because the arguments contain spaces (for example,
'C:Program FilesMathcadMathcad Prime 1.0' ). In such cases you must escape the quotes around the arguments.
The escape character in PowerShell is the grave-accent(`).
So the command should look something like this:
Siim KSiim K
6,15766 gold badges4141 silver badges6666 bronze badges
Not the answer you're looking for? Browse other questions tagged scriptpowershellpowershell-2.0batch or ask your own question.
Active4 days ago
I need to uninstall a MSI package through command line.So i used:
msiexec /x package.msi
Powershell Uninstall Msiexec Error
But this command requires the package.msi to be present in the local machine.
I want to uninstall the msi even if the msi file is missing.
How can I do that? Wedding church programs templates free.
kinokijuf
6,89888 gold badges4545 silver badges8989 bronze badges
SandeepSandeep
25022 gold badges55 silver badges1414 bronze badges
migrated from stackoverflow.comJun 6 '11 at 13:23
This question came from our site for professional and enthusiast programmers.
2 Answers
You can uninstall it using the product code:
Powershell Uninstall Msi Code
You would obtain this code from the MSI itself, or whatever tool you are using to build the MSI.
Note that when you uninstall a product, it uses a cached MSI, since only the original MSI knows how to uninstall itself. When you use the product code, it uses the cached MSI from C:WINDOWSInstaller.
vcsjonesvcsjones
2,35811 gold badge1313 silver badges2020 bronze badges
See my answer on stackoverflow.com for various ways to uninstall MSI files / Windows Installer Packages from your computer.
You can uninstall via: msiexec, ARP, WMI, PowerShell, Deployment Systems such as SCCM, VBScript / COM Automation, DTF, or via hidden Windows cache folders, and a few other options.
Community♦
Stein ÅsmulStein Åsmul
89411 gold badge1212 silver badges2323 bronze badges
Not the answer you're looking for? Browse other questions tagged command-lineinstallationwindows-installer or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |