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.

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
add comment

1 Answer

up vote 7 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" –  ultrasawblade 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
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.