Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I have this application installed on my computer that have independently added sort of a prefix to allow IE/Any browser to link directly to that app.

For example:

appname://open/555890405

Will launch the application and do some stuff with the ID at the end of the string

So if I place that bit in Start->Run, it works. It successfuly launches the app. But if I paste the same string in cmd.exe window it fails to launch.

share|improve this question
1  
These "prefixes" (http:, ftp:, appname:) are called URI schemes. – grawity May 8 '12 at 15:25
    
@grawity Thanks! did not know that – Or W May 8 '12 at 15:26
up vote 8 down vote accepted

Prefix it with start when you use it in cmd.exe, i.e. start http://www.google.com, start appname://open/555890405.

cmd.exe expects the first space-delimited token you enter to be an internal command, drive letter specification, or filename - not a URL. But the start command supports that.

share|improve this answer
    
Thanks, this works! Is there any way of running that uri scheme directly through an AutoIt script? I have the Run() function, but even if I place start appname://open/555890405 in it it doesn't work. I guess it's expecting to get a filename for an application. – Or W May 8 '12 at 15:30
1  
try cmd /c "start appname://open/555890405" – LawrenceC May 8 '12 at 15:36
    
Thanks, this works perfectly. – Or W May 8 '12 at 15:38
1  
@OrW: Use ShellExecute -- the same function as used by the Start - Run dialog. – grawity May 8 '12 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .