Page 1 of 1 1
Topic Options
#158012 - 2006-02-28 07:42 PM Execute shortcut
cyri Offline
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
#158013 - 2006-02-28 07:49 PM Re: Execute shortcut
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
My initial guess would be that you just need to reference the folder the application resides in as the working path, not just point to it.
Top
#158014 - 2006-02-28 07:56 PM Re: Execute shortcut
cyri Offline
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
#158015 - 2006-02-28 08:15 PM Re: Execute shortcut
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well I'd like to help you but I think you're missing something and not showing us. If you can run it from a shortcut then you can run it from other means as well.

Check the ACL permissions and any SHARE permissions and check the SHORTCUT that can run it and duplicate all permissions.

PERMISSIONS/PATH/ENVIRONMENT/SHARES

Are all things to look at. Verify what the shortcut is calling, maybe it calls a different program or a program with a switch or something similar.

If the shortcut can run it then you can duplicate it with other programs, we're just not there to see what the issue is, so you need to check all the variables.

Top
#158016 - 2006-02-28 09:41 PM Re: Execute shortcut
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Look at the FileAction() UDF.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#158017 - 2006-02-28 10:16 PM Re: Execute shortcut
cyri Offline
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
#158018 - 2006-02-28 11:24 PM Re: Execute shortcut
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
fileaction is same as doubleclicking the exe, as example.
basically, it imitates 100% the gui.

your exe is some odd thingie that just fails to run on console.
hmm.
you could try using wkix32.exe instead of kix32.exe
it's a long shot but also the problem is little odd.
_________________________
!

download KiXnet

Top
#158019 - 2006-03-01 02:37 AM Re: Execute shortcut
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Find that very hard to believe that it can't or won't run from console.

Cyri
e-mail me the EXE and let me try it out.

Top
#158020 - 2006-03-01 04:40 PM Re: Execute shortcut
cyri Offline
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
#158021 - 2006-03-01 05:00 PM Re: Execute shortcut
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I don't really care for the way KiX RUN or SHELL work, especially with WKiX and KiXforms, so I prefer to use ShellExecute.
$oShell = CreateObject("Shell.Application")
$oFolder = $oShell.ShellExecute('CMD',' /c Start "TapeCopyCMD" tapecopy'+$TapeCopyParms,'C:\Program Files\CA\BrightStor ARCserve Backup',"",1)
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#158022 - 2006-03-01 06:12 PM Re: Execute shortcut
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well didn't see where Cyri was using KF. I can understand that the COM method is a bit different but visually, and speed wise there should be little difference.

The only thing that comes to mind for me is the issue of maybe namespace. Perhaps the COM method is more in tune with the namespace,path, and environment than just SHELL / RUN are. That would be nice to know for certain, but then again this is the first time I recall anyone ever complaining that SHELL/RUN could not run something and COM could. I would just like solid proof that this is the case and perhaps either have SHELL updated if possible or at least a mention of it in the Manual.

Top
#158023 - 2006-03-01 06:50 PM Re: Execute shortcut
cyri Offline
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
#158024 - 2006-03-01 07:00 PM Re: Execute shortcut
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The ShellExecute method allows one to specify the working directory without the old KiX GO CD kludge. I believe that I already put in a suggestion for it but since it is available in COM and not so difficult to use, I surmise it stands a snowball's chance in hell.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#158025 - 2006-03-01 10:03 PM Re: Execute shortcut
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I do smell some bitterness in that post...
_________________________
!

download KiXnet

Top
#158026 - 2006-03-01 10:28 PM Re: Execute shortcut
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Naw... just tired of the endless debates as if everything said is a personal affront.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#158027 - 2006-03-03 08:15 AM Re: Execute shortcut
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hey Cyri,

Just an FYI that that application has reached an End Of Life support with Cisco.

http://www.cisco.com/en/US/products/sw/custcosw/ps427/prod_eol_notice0900aecd800fc12d.html

Top
#158028 - 2006-03-03 05:27 PM Re: Execute shortcut
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Doc, I work with Cyri, and thanks for that heads up.

EOL statements can be hard to keep up with.
_________________________
Today is the tomorrow you worried about yesterday.

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1067 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.054 seconds in which 0.02 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org