 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
ranomore
Joined: 06 Nov 2004 Posts: 178 Location: Salt Lake City, UT
|
Posted: Sat Sep 03, 2005 1:36 am Post subject: Run command (obscure error) |
|
|
This is really obscure, I promise.
So, the IT department where I work moved to a Distributed File System (DFS). Basically it makes server links dynamic, so a UNC name like \\Company\Folder can be linked to \\ServerA\folder or \\ServerB\otherfolder, without the end-user ever knowing about it. It's a pretty cool feature, but Win98 doesn't get a long well with it.
However, there is a client Win98 users can run to make their PC play nice with DFS (then, of course, there was a hotfix to the client, cause it wasn't really that great). Anyway, some AHK commands work after the client hotfixes are installed on the Win98 box, and some don't.
An example of a working command:
FileGetVersion
Non-working (at least I think it is)
Run
It's hard to duplicate, I know, but hopefully a difference is visible between how FileGetVersion executes and how Run does.
If it helps any, the Run command won't work on a direct UNC name, or on a mapped drive, like W:\. (I can, however, use Win+R to run the program from the mapped drive, although I can't do it via the UNC name.) |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sat Sep 03, 2005 2:39 am Post subject: |
|
|
The run command tries to launch the specified application using CreateProcess(). If that fails, it then tries ShellExecuteEx(). Because of this, you could try specifying a more explicit path or name when launching to see if that helps -- under the theory that it would allow CreateProcess to work. For example, rather than launching a document directly, you could run its associated application and pass the document name as the first parameter.
If you want to try research it at the API level, you could use DllCall to call CreateProcess() or ShellExecute() directly. But if you've never used these functions it would probably take considerable time to get comfortable with them. |
|
| Back to top |
|
 |
ranomore
Joined: 06 Nov 2004 Posts: 178 Location: Salt Lake City, UT
|
Posted: Thu Sep 08, 2005 3:28 pm Post subject: |
|
|
| MSDN wrote: | | Windows 95/98/Me: ShellExecute is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems. |
I'm curious if this is causing the problem, but I'm not sure how I can test it. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Sep 08, 2005 4:27 pm Post subject: |
|
|
Although MSDN doesn't say it, I think that means that the W version of ShellExecute() requires Microsoft Layer for Unicode. AutoHotkey uses the A version (ANSI).
By the way, AutoHotkey actually uses ShellExecuteEx(), but the distinction probably doesn't matter for this topic. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|