Page 1 of 1 1
Topic Options
#126625 - 2004-09-13 08:53 PM when starting executables, config data is missing
john7033 Offline
Fresh Scripter

Registered: 2004-02-04
Posts: 5
My script works correctly, but when it executes our jabber client, the client seems not to read the config settings from the config.xml file. The jabber client does start and run correctly if one doubleclicks on the executable, so I suppose I need to know how to execute the client as though one were double-clicking it. In other words, how does one run programs as though they were being run in the Windows environment?
Top
#126626 - 2004-09-13 09:21 PM Re: when starting executables, config data is missing
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

...how does one run programs as though they were being run in the Windows environment?



That wwould be the RUN command. My guess is that when you try to run it from your script, the current directory is not were the EXE is whereas when you double-click...
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#126627 - 2004-09-13 10:13 PM Re: when starting executables, config data is missing
john7033 Offline
Fresh Scripter

Registered: 2004-02-04
Posts: 5
Here's what I'm using to execute the jabber client:

RUN '"C:\Program Files\jabbertooldir\jabber.exe"'

Are you saying that I should CD into the jabber directory before I execute the command?

Top
#126628 - 2004-09-13 10:19 PM Re: when starting executables, config data is missing
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Maybe write a little batch file to set the proper directory and lauch your program and RUN the batch/CMD file.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#126629 - 2004-09-13 10:19 PM Re: when starting executables, config data is missing
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well, since I don't know what is your current drive and folder, that would ber a start. You may need to GO C: as well.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#126630 - 2004-09-13 10:53 PM Re: when starting executables, config data is missing
john7033 Offline
Fresh Scripter

Registered: 2004-02-04
Posts: 5
The jabber executable is in the "c:\program Files\jabbertooldir directory. I tried creating a batch file as shown and stored/ran it from c:\

cd Progra~1\jabber~1
jabber

The kix generates the errors:
The system cannot find the drive specified.
The system cannot find the drive specified.

The jabber.bat does run correctly from the command line, however, so it's some kind of shell problem. I'm guessing there is some trick involved here because I have seen other discussions about this sae issue, though I can't seem to locate what the solution was.

Top
#126631 - 2004-09-14 12:33 AM Re: when starting executables, config data is missing
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You're not showing the KiX code. I don't see where you specify or change drive.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#126632 - 2004-09-14 01:08 AM Re: when starting executables, config data is missing
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Please run the following code which should return an error even if the program does not run that will let you know why it did not run.

There are some applications that must run from the location they exist in but most can run from any started location.

Code:
RUN '"C:\Program Files\jabbertooldir\jabber.exe"'
? 'RESULT: ' + @ERROR + ' ' + @SERROR
? 'Please press any key to continue...'
GET $



Top
#126633 - 2004-09-14 02:03 AM Re: when starting executables, config data is missing
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
If you are executing this as part of a logon script, then the default directory is the user's home directory. You will have to account for that fact in your batch file.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#126634 - 2004-09-14 09:55 AM Re: when starting executables, config data is missing
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

Are you saying that I should CD into the jabber directory before I execute the command?




Yes, you also need to change the logged drive to the correct one, as Les mentioned earlier.

Borrowing the DOCs code:
Code:

GO C:
CD '\Program Files\jabbertooldir'
If @ERROR
'Cannot CD to jabber dir ['+@ERROR+'] '+@SERROR+@CRLF
Else
SHELL 'jabber.exe'
If @ERROR
'Error executing jabber ['+@ERROR+'] '+@SERROR+@CRLF
EndIf
EndIf

'Please press any key to continue...'
GET $



You could also try running it under the command interpreter - not normally required, but you never know:
Code:
SHELL '"%COMSPEC%" /C jabber.exe'



Once you are happy it is working you can change the SHELL back to RUN.

Top
Page 1 of 1 1


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

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

Generated in 0.071 seconds in which 0.037 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