Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does \"%1\" mean in Registry ? 1

Status
Not open for further replies.

DRAMO4298

Technical User
Nov 23, 2001
85
US
Hello:

In Registry . . .

HKEY_LOCAL_MACHINE\Software\Classes\StarScript-file\Shell\Open\Command

@="\C:\\Program Files\Starstrider 2\Starstrider.exe\" \"%1\""

QUESTION:
In the above line . . . what is \"%1\"" saying?

Why dosn't it just end with \Starstrider.exe" since that is the file that opens this STARSTRIDER program?

Thank you for any info.
 
On my computer I have this program called Lview Pro. It is used to view pictures. If I want to open a picture by clicking on the picture the %1 has to be there in the shortcut command line. If the %1 is not there when I click on a picture only the program opens up. Blank with nothing in it. However when the %1 is there it opens up Lview pro and then loads the pic.
 
You got it, snip6969--
This goes back (more or less) to DOS. I don't know how to explain this well, but I'll try. %1 is more or less a variable.

For example, in DOS:
myprogrm.exe argument argument argument
^ %0 ^ ^ %1 ^ ^ %2 ^ ^ %3 ^

So if the program allows for it, you might have started the program with your file automatically by typing
myprogrm.exe myfile.xxx

Windows is doing the same thing.

In windows, click MSPAINT, windows basically runs
C:\blah\blah\mspaint.exe

Click on a picture, let's say picture.jpg, windows will
1) make the %1 variable = picture.jpg
2) check the registry, find that it should run C:\blah\blah\mspaint.exe
3) if that registry entry specifies %1 at the end, then windows will run
C:\blah\blah\mspaint.exe picture.jpg. If the entry does not specify %1 at the end,
then windows stops here.

I know that this is a bit simplified, but I hope that it helps!! Mudskipper
___________________________________________________________________________________

Groucho said it best- "A four year-old child could understand this! Quick! Run out and find me a four year-old child: I can't make heads nor tails out of this!"
 
It may be because Windows use batch files to launch programs. If you want to have Starstrider.bat file which opens your datafile.dat in the manner
Starstrider datafile.dat,
the file Starstrider.bat must contain a line
Starstrider.exe %1
%1 is place, where the first parameter of the batch file must be inserted.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top