Answer the question
In order to leave comments, you need to log in
Need an example of running a ClickOnce application deployment from C# code
The task is to launch a ClickOnce application located on the network by URI.
I found the CorLaunchApplication function, from mscorwks.dll, I try to call it this way:
[DllImport("mscorwks.dll", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)]
internal static extern void CorLaunchApplication(uint hostType, string applicationFullName,
int manifestPathsCount, string[] manifestPaths,
int activationDataCount, string[] activationData,
PROCESS_INFORMATION processInformation);
public void StartApplication(string uri)
{
CorLaunchApplication((uint)HOST_TYPE.HOST_TYPE_CORFLAG, uri, 0, null, 0, null, new PROCESS_INFORMATION());
}
Answer the question
In order to leave comments, you need to log in
Wouldn't C#'s built-in capabilities be better?
AppDomain.CurrentDomain.ExecuteAssembly(...)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question