#158012 - 2006-02-28 07:42 PM
Execute shortcut
|
cyri
Getting the hang of it
Registered: 2005-06-27
Posts: 95
|
I have a program that only seems to want to launch via a shortcut. I tried RUN and SHELL in Kix but it won't go. It errors saying that it can't find one of it's supporting files. Even executing the program from a batch file doesn't work, same error.
The program is on the C drive of a Terminal Server. The C drive is locked down so that users can't see it via explorer. Also the command line (%comspec%) is locked down so I can't use that. However, I can run other programs on the C drive via Kix and Batch so it may be some type of limitation in the program.
My question is, since the program works fine from the shortcut. Can Kix execute a shortcut? I see a lot of UDF's to create a shortcut, but can it run one?
Any ideas?
|
|
Top
|
|
|
|
#158014 - 2006-02-28 07:56 PM
Re: Execute shortcut
|
cyri
Getting the hang of it
Registered: 2005-06-27
Posts: 95
|
That was my initial thought as well, but I don't think so. See below. Oh also I forgot to mention that I'm launching the kix script via a shortcut as well. So the working directory is already being set via the value in the start in box in the shortcut properties. Here is the shortcut settings:
command line: kix32.exe J:\test.kix
start in: C:\test
And then inside the J:\test.kix: RUN "@CURDIR\fastcall.exe"
If I do a "? @CURDIR" it does show the proper directory of C:\test. It doesn't matter what I use for the RUN line though. I can just do "fastcall.exe" or the entire path "C:\test\fastcall.exe". Either way I still get the error.
|
|
Top
|
|
|
|
#158017 - 2006-02-28 10:16 PM
Re: Execute shortcut
|
cyri
Getting the hang of it
Registered: 2005-06-27
Posts: 95
|
Thanks Les. FileAction() worked like a charm. I was able to use it to both execute the shortcut as well as execute the program directly. For some reason it worked this way. I wonder how the FileAction() method differs from the RUN and SHELL commands?
|
|
Top
|
|
|
|
#158020 - 2006-03-01 04:40 PM
Re: Execute shortcut
|
cyri
Getting the hang of it
Registered: 2005-06-27
Posts: 95
|
It's not that it doesn't run NTDOC. I think I may have been a bit misleading. It does run the fastcall.exe program with RUN and SHELL, but for some reason the program is unable to locate a supporting .dll file after it executes. But using the FileAction() UDF it works fine.
I will email you the executible.
|
|
Top
|
|
|
|
#158023 - 2006-03-01 06:50 PM
Re: Execute shortcut
|
cyri
Getting the hang of it
Registered: 2005-06-27
Posts: 95
|
I think you may have been right about the working directory. The DLL file that causes the error is the splktssp.dll. Let's say that DLL file is in C:\fast and the fastcall.exe is in C:\test then:
Code:
cd fast RUN C:\test\fastcall.exe
Now the RUN works fine. I still don't get why the fastcall.exe works with the fileaction() UDF though. C:\fast is not specified as the working directory anywhere. Couldn't find reference to that path in the registry or anywhere else.
|
|
Top
|
|
|
|
#158027 - 2006-03-03 08:15 AM
Re: Execute shortcut
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1257 anonymous users online.
|
|
|