unknown
3/12/2012 10:23:00 PM
BeeJ wrote:
> My little VB6 app is trying to work with shortcuts.
> The note I have accumulated do not seem to jibe with what Googles out.
>
> Rule 1. Put Drive:\Path Name\Filename in double quotes (has spaces).
Nah, add double quotes anyway. It's perfectly valid to add double quotes
around paths that don't contain spaces.
> Rule 2. Use a ? to separate arguments (cannot find help on this)
Must be something used as parameter substitute, like "Notepad ?", then
replace the "?" with a file name before handing it over to Shell function or
something. It has nothing to do with what Windows or the Shell requires.
> Rule 3. Environment variables go in % e.g. %userprofile&
Only if you prefer it that way.
> Rule 4. Do not put arguments without spaces in double quotes.
See my comments for #1 above. That way you don't have to worry whether there
is a space in the path or not. It's up to the application to interpret the
parameters. Many that expect a path as a parameter to be surrounded by
double quotes if it contains spaces. But this is not a rule. It depends on
the application.