使用PowerShell卸载ClickOnce应用程序?

Bud*_*hiP 5 powershell clickonce wmi

是否可以使用Windows PowerShell卸载一次客户端应用程序的单击?

Get-WmiObject Win32_Product -Filter"name ='xxxx'"

当我在上面使用时,单击一次应用程序不会显示.但它适用于其他应用程序.(获取没有过滤器的所有内容也不包含单击一次应用程序.但它在添加/删除程序UI中可见).

请帮忙.

提前致谢.

CB.*_*CB. 5

读这个:

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/51a44139-2477-4ebb-8567-9189063cf340/

评论后编辑:

$InstalledApplicationNotMSI = Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall | foreach-object {Get-ItemProperty $_.PsPath}


$UninstallString = $InstalledApplicationNotMSI | ? { $_.displayname -eq "YourAppicationDisplayName" } | select uninstallstring


cmd /c $UninstallString.UninstallString
Run Code Online (Sandbox Code Playgroud)

问题是这不是 Silent unistallation。您必须为 sendkey() TAB + ENTER 添加代码以使其静默。