3

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 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.

1
  • 2
    The VB6 Shell() function is a thin wrapper on CreateProcess(), so it runs programs and doesn't open documents. You might try ShellExecute() with an "open" verb.
    – Bob77
    May 19, 2011 at 3:27

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.