When you create an installer using Wix, usually you need an elevated privileges to execute a program or run services using custom action. This usually happen in Windows Vista. So, to do that use this custom action element:
CustomAction Id="shutdownprogram" Impersonate="no" FileKey="stfu" Execute="deferred" Execommand="/shutdown" return="ignore">
As you can see in the above code, you need to use the 'Impersonate="no" and Execute="deferred" element. I repeat, you need to use these element otherwise you didn't get the permission to execute scripts or programs. Weird solution but it works.
Langgan:
Catat Ulasan (Atom)
Tiada ulasan:
Catat Ulasan