Where is the documentation on Registry symbols (%1 %L %*?)

  • Thread starter Larry Serflaten
  • Start date
L

Larry Serflaten

I've looked everywhere it would normally be expected, but I cannot find
a listing of acceptable Registry symbols.

For example, the value of the Open command for notepad is:

notepad.exe "%1"

That particular "%1" symbol means to pass the first argument in the argument list.
That is very similar to batch file symbols, but, for Windows Media player, the
Open command is more like:

"C:\<path>\mplayer2.exe" play "%L"

My guess is that is supposed to launch the player, pass it the 'play' switch
followed by the Long name of the first argument in the argument list.

The %n symbols are not the same as those for a batch file. The batch
file (for example) does not use %L and the registry does not accept %*
which is the symbol I am wanting to use! Where is the documentation
that will tell me exactly what I can use on my Win2K system?

Why is this information so hard to find on MSDN???

LFS
 
S

steve

I've looked everywhere it would normally be expected, but I cannot find
a listing of acceptable Registry symbols.

For example, the value of the Open command for notepad is:

notepad.exe "%1"

That particular "%1" symbol means to pass the first argument in the argument list.
That is very similar to batch file symbols, but, for Windows Media player, the
Open command is more like:

"C:\<path>\mplayer2.exe" play "%L"

My guess is that is supposed to launch the player, pass it the 'play' switch
followed by the Long name of the first argument in the argument list.

The %n symbols are not the same as those for a batch file. The batch
file (for example) does not use %L and the registry does not accept %*
which is the symbol I am wanting to use! Where is the documentation
that will tell me exactly what I can use on my Win2K system?

Why is this information so hard to find on MSDN???

LFS



Larry, what is it you are trying to do. The registry accepts any kind
of data. The symbols in, notepad.exe "%1", for instance are handle by
the application not the registry.




steve
 
M

martinique

steve hotmail.com> said:
Larry, what is it you are trying to do. The registry accepts any kind
of data. The symbols in, notepad.exe "%1", for instance are handle by
the application not the registry.

It can't be quite that simple, Steve. The application doesn't receive
"%1" -- it receives an actual argument supplied by Windows. How does the OS
know to replace "%1" with the first argument; and by the same token, how
does it know what to do with "%L" ?
 
L

Larry Serflaten

the registry does not accept %* which is the symbol I am wanting to use!
Larry, what is it you are trying to do. The registry accepts any kind
of data. The symbols in, notepad.exe "%1", for instance are handle by
the application not the registry.

Notepad does not see %1, it sees the argument. I want documentation that
explains what symbols may be used:

notepad.exe %1 < Passes 1st argument no quotes (Long names fail)
notepad.exe "%1" < Passes 1st argument w/ surrounding quotes
notepad.exe "%2" < Passes 2nd argument w/ surrounding quotes
notepad.exe "%L" < ???
notepad.exe "%N" < ???
notepad.exe "%*" < ???
etc...

Where is the documentation on this stuff?

LFS
 
S

steve

Notepad does not see %1, it sees the argument. I want documentation that
explains what symbols may be used:

notepad.exe %1 < Passes 1st argument no quotes (Long names fail)
notepad.exe "%1" < Passes 1st argument w/ surrounding quotes
notepad.exe "%2" < Passes 2nd argument w/ surrounding quotes
notepad.exe "%L" < ???
notepad.exe "%N" < ???
notepad.exe "%*" < ???
etc...

Where is the documentation on this stuff?

LFS

Yes sorry I meant that the app receives the parameter not the
replaceable parameter indicator. But I think though I'm not certain
that you can use anything as long as it is enclosed in quotes and
preceded by the % sign, when creating the registry entry.





steve
 
S

steve

Yes sorry I meant that the app receives the parameter not the
replaceable parameter indicator. But I think though I'm not certain
that you can use anything as long as it is enclosed in quotes and
preceded by the % sign, when creating the registry entry.

I realise of course this still probably doesn't answer your question
:)

but going through the registry there are a number of such instances,
%TEMP%, %WINDIR% etc. If they are just place holders your app must be
responsible for interpreting them, as it would any command line
argument. Not the actual %L or %1 but in the same way you process argc
or the vb command() object. The OS just replaces them with the value
in the corresponding position in the command line.






steve
 
S

Shell

In responce to the post:
Notepad does not see %1, it sees the argument. I want documentation that
explains what symbols may be used:

notepad.exe %1 < Passes 1st argument no quotes (Long names fail)
notepad.exe "%1" < Passes 1st argument w/ surrounding quotes
notepad.exe "%2" < Passes 2nd argument w/ surrounding quotes
notepad.exe "%L" < ???
notepad.exe "%N" < ???
notepad.exe "%*" < ???
etc...

Where is the documentation on this stuff?

LFS
Larry,

Not sure if this is what you're looking for, but I found something in
the Win2K Help (Start, Help).
In the Contents, under Reference, click on MS-DOS Commands, Then in
the right pane click Batch Commands, then click the % link.

HTH
Shell
-
http://drshell.home.mindspring.com/
Into computers since 1972.
WARNING! Information and e-mail addresses contained herein, are for personal use only. By entering this site, you agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to: allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via direct mail, electronic mail, or by telephone. Violators will be dealt with accordingly.
-
 
L

Larry Serflaten

"Shell"
Not sure if this is what you're looking for, but I found something in
the Win2K Help (Start, Help).
In the Contents, under Reference, click on MS-DOS Commands, Then in
the right pane click Batch Commands, then click the % link.


Nice try but as stated in my first post:
The %n symbols are not the same as those for a batch file. The batch
file (for example) does not use %L and the registry does not accept %*

LFS
 
M

Mark V

Ken Halter wrote in
Hi Larry....

Are you still looking for info on this subject?
[ ]

I think the original question was regarding non-cmd.exe variables found
in the registry such as %L. IMO those are execuatble-dependent and
likely undocumented in part.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top