How does calling a program in Windows XP from “Run…” with a colon argument work?

Posted on

Problem :

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:


for e.g (which does not work anyway)


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?

As requested, here’s a real example:

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.

Solution :

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_ROOTAGS 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 shellopencommand subkey point at.

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *