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 

Run command no longer works

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





PostPosted: Tue May 27, 2008 4:19 pm    Post subject: Run command no longer works Reply with quote

Beginning this weekend, one of my scripts stopped working. I know that i had some hotfixes pushed to my PC from work...but not sure if this is the cause.

Here is the segment of the script...

^!t:: ; Use Ctrl+Alt+T to Exexute in Debug Mode

RegRead, Select, HKEY_CURRENT_USER, SOFTWARE\Blue Skies, SelectedKey
RegRead, PopUpMessage, HKEY_CURRENT_USER, SOFTWARE\Blue Skies, PopUpDialog
if (Select = 6)
{
Process, Exist, ngmonitor.exe
NewPID = %ErrorLevel%
MsgBox, PID %NewPID%
if (NewPID = 0 )
{
RegRead, Pathway, HKEY_CURRENT_USER, SOFTWARE\Blue Skies, Path2File
MsgBox, Ready to Run Path %Pathway%
Run %Pathway%


The PATHWAY key is set to:
C:\Documents and Settings\All Users\Start Menu\Programs\Navigator Passport\WHQ Connection

This is pointing to a link. I have tried putting it in "*" and adding .lnk to the end of the path....still the same error.

Error is:Failed attempt to launch program or document.
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 6847
Location: Pacific Northwest, US

PostPosted: Tue May 27, 2008 4:48 pm    Post subject: Reply with quote

you might need to add the second parameter to run?

It's odd you say this because two scripts I wrote for my wife over two years ago suddenly stopped working. Tell me, did you get Service Pack 3 for XP? I suspect there is some permission change in windows that is messing this up.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
sb8469
Guest





PostPosted: Tue May 27, 2008 5:07 pm    Post subject: Reply with quote

engunneer wrote:
you might need to add the second parameter to run?

It's odd you say this because two scripts I wrote for my wife over two years ago suddenly stopped working. Tell me, did you get Service Pack 3 for XP? I suspect there is some permission change in windows that is messing this up.


The hotfix applied was http://support.microsoft.com/?kbid=950749.

I am going to uninstall it and see if that corrects the issue.
Back to top
sb8469
Guest





PostPosted: Tue May 27, 2008 5:32 pm    Post subject: Reply with quote

Uninstalled the hotfix and I am still having the issue....not sure why it worked for years...but it is frustrating. I need to fix this and push the new program out to over a thousand users.
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 6847
Location: Pacific Northwest, US

PostPosted: Tue May 27, 2008 5:39 pm    Post subject: Reply with quote

did my suggestion of adding the working directory parameter help?
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
sb8469
Guest





PostPosted: Tue May 27, 2008 6:07 pm    Post subject: Reply with quote

It did not work. This is actually launching a VPN connection, and that makes this a little bit of an odd Run command.
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 6847
Location: Pacific Northwest, US

PostPosted: Tue May 27, 2008 6:19 pm    Post subject: Reply with quote

can you read the command parameters from the shortcut and run them directly? (manually or scripted)
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
sb8469
Guest





PostPosted: Tue May 27, 2008 6:26 pm    Post subject: Reply with quote

I have run the shortcut manually and it works fine. It is just that AHK does not seem to be able to run a shortcut.
Back to top
sinkfaze



Joined: 18 Mar 2008
Posts: 139

PostPosted: Tue May 27, 2008 6:34 pm    Post subject: Reply with quote

Does changing it to this help?

Code:
Run "%Pathway%"


Also, this post from last year might be helpful:

"Failed attempt to launch" error
_________________
Have trouble searching the site for information? Try Quick Search for Autohotkey.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6847
Location: Pacific Northwest, US

PostPosted: Tue May 27, 2008 8:53 pm    Post subject: Reply with quote

I know running the shortcut manually works, but if you open it and get the command line information from it, then open a command prompt and run the command, does it work?

the instead of reading the info out of a file, try making a hardcoded AHK file that only runs this program using the command information inside the shortcut instead of running the shortcut itself.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
sb8469
Guest





PostPosted: Tue May 27, 2008 9:16 pm    Post subject: Reply with quote

I got it to work.

The line was changed to: Run ""%Pathway%""
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