How do I launch an offline ClickOnce application with arguments from VB6?
I know that you can pass command line parameters to offline ClickOnce applications (see here for that).
In that example, it's launching it from .NET. How would I launch it from VB6?
I tried using ChDir
to change the directory to that folder, than then using Shell
to execute it as a command line, but it's not working. The error is "Invalid procedure call or argument". Here's the command line I'm executing:
"C:\Users\{my user name}\AppData\Roaming\Microsoft\Windows\Start开发者_JAVA百科 Menu\Programs\{my company name}\{my app name}.appref-ms"
This is where my offline application is. I don't think the Shell
command actually works for this type of file.
You may have more luck using the ShellExecute
API. Here is a link to an example. In my experience this is more reliable than Shell
and has more options to use.
精彩评论