| View previous topic :: View next topic |
| Author |
Message |
sb8469 Guest
|
Posted: Tue May 27, 2008 4:19 pm Post subject: Run command no longer works |
|
|
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
|
Posted: Tue May 27, 2008 4:48 pm Post subject: |
|
|
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 |
|
 |
sb8469 Guest
|
Posted: Tue May 27, 2008 5:07 pm Post subject: |
|
|
| 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
|
Posted: Tue May 27, 2008 5:32 pm Post subject: |
|
|
| 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
|
Posted: Tue May 27, 2008 5:39 pm Post subject: |
|
|
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 |
|
 |
sb8469 Guest
|
Posted: Tue May 27, 2008 6:07 pm Post subject: |
|
|
| 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
|
Posted: Tue May 27, 2008 6:19 pm Post subject: |
|
|
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 |
|
 |
sb8469 Guest
|
Posted: Tue May 27, 2008 6:26 pm Post subject: |
|
|
| 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
|
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Tue May 27, 2008 8:53 pm Post subject: |
|
|
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 |
|
 |
sb8469 Guest
|
Posted: Tue May 27, 2008 9:16 pm Post subject: |
|
|
I got it to work.
The line was changed to: Run ""%Pathway%"" |
|
| Back to top |
|
 |
|