Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I noticed that a certain program works in a special way when sending an argument.

The only way to send an argument is by clicking "Start -> Run..." and typing:

[programname]:[argument]

for e.g (which does not work anyway)

notepad:textfile.txt 

If I try to do the same from a Command-line-window, it doesn't work. Neither does "programname argument". I must be able to open the program with an argument from a website (with Wscript shell which is another story) but this will probably not work.

Does anyone have a clue how this strange colon syntax works?

UPDATE: As requested, here's a real example:

AGS:pref.serv01.com(ARG1:ARG2)

That's the exact syntax, which results in the program opening the specific information for ARG1 and ARG2. AGS is just the name of the program which is a normal windows-program.

share|improve this question

migrated from stackoverflow.com Sep 9 '11 at 20:06

This question came from our site for professional and enthusiast programmers.

    
Could you give us a real example. –  David Heffernan Sep 9 '11 at 19:55
    
What is AGS? .... –  David Heffernan Sep 9 '11 at 20:08
1  
I suspect AGS is a protocol like http. If so, the way to "run" a url from cmd.exe is to specify a program and pass the url to it, such as genericbrowser.exe http://www.foobar.com What program handles the AGS protocol? –  horatio Sep 9 '11 at 20:35
    
@Mike: If you want to post comments, first create a full account on Stack Overflow, then log in with it here. –  grawity Sep 9 '11 at 20:38
    
@horatio: No, the closest to the Run dialog would be to use start. –  grawity Sep 9 '11 at 23:11

2 Answers 2

The Run... dialog is not limited to local files – it also accepts all URI schemes1 registered in the system For example, you can open http: or ftp: addresses in it. It's possible that some program simply registered the AGS: URI scheme for this purpose. (The entire URI is passed unmodified to the program, which can apply its own parsing rules.)

Take a look at the HKEY_CLASSES_ROOT\AGS key in the Registry Editor and see if it says anything about your program, whether it has a value named "URL Protocol" in it, and what does the shell\open\command subkey point at.


1 Windows calls them "URL protocols", which is not entirely correct.

share|improve this answer

The colon character is used to refer to Alternate Data Streams in NTFS. Maybe your program has hidden data streams with executables in it.

I think that it cannot be done from the command line argument, because the shell parser gets confused. The "run" dialog however is much more permissive.

If it is so, you can try to extract it by simply:

c:> type program:argument > output
share|improve this answer
    
This is a possibility, but in this case the streams would be named like :pref.serv01.com(ARG1:ARG2), and I find it unlikely that there would be a separate stream, containing a full executable in each, named after every possible server/arg1/arg2 combination. –  grawity Sep 9 '11 at 20:34
    
In addition, :pref.serv01.com(ARG1:ARG2) is not even a valid stream name, since the ARG2) part would be interpreted as stream type and all valid types start with $. –  grawity Sep 9 '11 at 20:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.