AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

System cannot find the file specified - driving me nuts

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Levitt
Guest





PostPosted: Sun Jul 06, 2008 4:25 am    Post subject: System cannot find the file specified - driving me nuts Reply with quote

I'm a new user to AutoHotKeys, and I'm having a bit of trouble with what should be a simple command.

Certain Run commands are causing the "the system cannot find the file specified" error, even though the files are there. Two examples are the following:



Run "C:\Windows\system32\compmgmt.msc /s"
Run "D:\progs\MS Office\Office12\OUTLOOK.EXE /recycle"


Can you tell me what I'm doing wrong? These both work fine from the Windows Run dialog box, but they throw up an error in AHK.
Back to top
Levitt
Guest





PostPosted: Sun Jul 06, 2008 3:49 pm    Post subject: Reply with quote

Okay, the first example I gave, I figured out - it required mmc.exe in order to load.

But I still don't understand why the second one is failing.
Back to top
Guest






PostPosted: Sun Jul 06, 2008 4:35 pm    Post subject: Re: System cannot find the file specified - driving me nuts Reply with quote

Levitt wrote:
Run "D:\progs\MS Office\Office12\OUTLOOK.EXE /recycle"
Can you tell me what I'm doing wrong? These both work fine from the Windows Run dialog box, but they throw up an error in AHK.


Help File wrote:
To pass parameters, add them immediately after the program or document name. If a parameter contains spaces, it is safest to enclose it in double quotes (even though it may work without them in some cases).

so:
Code:
Run, "D:\progs\MS Office\Office12\OUTLOOK.EXE" /recycle

ps, I hope the installer info helped. Wink
Back to top
Levitt
Guest





PostPosted: Mon Jul 07, 2008 4:26 am    Post subject: Re: System cannot find the file specified - driving me nuts Reply with quote

Anonymous wrote:


Help File wrote:


To pass parameters, add them immediately after the program or document name. If a parameter contains spaces, it is safest to enclose it in double quotes (even though it may work without them in some cases).




so:
Code:
Run, "D:\progs\MS Office\Office12\OUTLOOK.EXE" /recycle

ps, I hope the installer info helped. Wink




That did the trick. It was confusing because it wasn't explicit as to where quotes should and should not be used. To be honest, there's no reason why the initial line *shouldn't* have worked. But at least I now know how to deal with it. Thank you!

And yes, the installer info helped very much. Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group