Uninstall out-of-browser silverlight application programmatically

前端 未结 5 1636
别跟我提以往
别跟我提以往 2021-02-09 21:04

How to uninstall out-of-browser silverlight 4 application programmatically instead of using the contextmenu (e.g. if I want to replace the context menu)?

Edit

5条回答
  •  渐次进展
    2021-02-09 21:40

    Check out my solution here: Unable to Uninstall SIlverlight Out Of Browser Application Programatically I used the code in it in console app that was run by the silverlight application that it was uninstalling. Silverlight extracted the EXE as a resource to one of the directories and then ran it using something like the following:

    using (dynamic shell = AutomationFactory.CreateObject("WScript.Shell"))
    {
         shell.Run(@"C:\Users\yourusername\AppData\update.exe xapNameToUninstall");
    }
    

提交回复
热议问题