Page 1 of 2 12>
Topic Options
#108561 - 2003-11-20 08:00 PM logon script and .EXE
crivex Offline
Fresh Scripter

Registered: 2003-11-20
Posts: 8
Hi all

I am trying to have a kix logon script run an executable independently from
the script itself. Which means that the kix script should launch the .EXE
and then continue with the other lines of the script.

I have tried to use RUN and SHELL but

If I use RUN like in:

RUN C:\MYEXECUTABLE.EXE

the script launches the exe but the exe is closed as soon as the kix script
ends! I want the exe to remain running even after the script ends.

If I use SHELL like in:

SHELL "CMD /C C:\MYEXECUTABLE.EXE"

the exe launches but the script then stops waiting for the exe window to be
closed! I want the script to continue past the line that launches the
executable.

Is this possible??

Thanks a lot!!!

crivex

Top
#108562 - 2003-11-20 08:29 PM Re: logon script and .EXE
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
You definately want to use RUN in this circumstance...

Have you tried just running the EXE kinda like below?

Code:

? 'This is a test'
run 'notepad.exe'
? 'This is the end'
gets $



The code above runs notepad and when the script finishes, notepad is still running...

Top
#108563 - 2003-11-20 08:56 PM Re: logon script and .EXE
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We suggest to use somehting like

run '%comspec% /c notepad.exe

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#108564 - 2003-11-20 09:14 PM Re: logon script and .EXE
crivex Offline
Fresh Scripter

Registered: 2003-11-20
Posts: 8
Hi

I have tried that with my exe ... but as soon as the script ends the executable is closed too!

I am lost....

crivex

Top
#108565 - 2003-11-20 09:20 PM Re: logon script and .EXE
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Which application you are trying to start?
Can you show you exact statement?
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#108566 - 2003-11-21 12:26 AM Re: logon script and .EXE
crivex Offline
Fresh Scripter

Registered: 2003-11-20
Posts: 8
The application is a very simple executable that I made with VB 6. When excuted it just shows a form with some text that the user should read. The form has a click button that closes it. I would like that form to continue running (be displayed) even after the login script ends.

thanks again

crivex

Top
#108567 - 2003-11-21 12:27 AM Re: logon script and .EXE
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Did you try AlPo's suggestion of doing:

run 'myapp.exe'

-Shawn


Top
#108568 - 2003-11-21 12:39 AM Re: logon script and .EXE
crivex Offline
Fresh Scripter

Registered: 2003-11-20
Posts: 8
Yes I did. When the script ends, the executable closes too.

???

Top
#108569 - 2003-11-21 12:51 AM Re: logon script and .EXE
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
well, i really don't understand that. I just created a little VB exe here - a simple form with a button on it, generated an EXE, ran it using RUN "project1.exe" and it worked just fine (didn't close) ... is there anything more you can tell us about anything unique to your situation or in this script or in this EXE ?

Top
#108570 - 2003-11-21 01:11 AM Re: logon script and .EXE
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
We're not getting the whole story. What OS? Where is the EXE launched from? How is KiX launched?

Might be those damn wintendos and the Z: drive kludge.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#108571 - 2003-11-21 01:13 AM Re: logon script and .EXE
crivex Offline
Fresh Scripter

Registered: 2003-11-20
Posts: 8
I tried to generate a new EXE... even that closes when the script ends. Please remember that this is a login script... it is run on a win2k professional box...
Top
#108572 - 2003-11-21 01:23 AM Re: logon script and .EXE
crivex Offline
Fresh Scripter

Registered: 2003-11-20
Posts: 8
The script is run on a Win2k Pro box that belongs to a Win2k domain. The user is set (group policy) to run a logon script (logon.bat) that does
%SYSTEMROOT%\KIX32.EXE %0\..\KIX\kixON.scr

The line

run C:\myexecutable.EXE

is the last line of KixON.scr

kixon.scr launches the EXE which immeaditely closes as the Kixon.scr ends being executed.

I don't understand what's going on...

Top
#108573 - 2003-11-21 01:30 AM Re: logon script and .EXE
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
No, didn't try it from a login script ... just by way of a test, what happens if you run NOTEPAD.EXE in the same way, does it close too ?

Edited by Shawn (2003-11-21 01:31 AM)

Top
#108574 - 2003-11-21 01:40 AM Re: logon script and .EXE
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
ok, crasping at straws now but I would try this only because you can and to say you did:

run '%comspec% /c start c:\project1.exe'

-Shawn

Top
#108575 - 2003-11-21 08:32 AM Re: logon script and .EXE
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
why not:
run 'start c:\project1.exe'



but I would not go there.
I would like to see him reply what happens to notepad if he fires it.
and what happens to his app if he launches the logonscript manually after logon.
_________________________
!

download KiXnet

Top
#108576 - 2003-11-21 03:55 PM Re: logon script and .EXE
crivex Offline
Fresh Scripter

Registered: 2003-11-20
Posts: 8
I have tried that too. No changes, the EXE closes when the script ends.
Top
#108577 - 2003-11-21 03:57 PM Re: logon script and .EXE
crivex Offline
Fresh Scripter

Registered: 2003-11-20
Posts: 8
Hi. The same thing happens with notepad. It closes when the script ends.
Top
#108578 - 2003-11-21 04:40 PM Re: logon script and .EXE
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Is your Kixscript called from a batch file ? If yes (or if you could set one up temporarily), what happens if you put this line in the BAT file:

START NOTEPAD.EXE

-Shawn

Top
#108579 - 2003-11-21 05:17 PM Re: logon script and .EXE
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
This is similar to the problem with my script too that I never resolved.

using the examples given above by everyone, whenever I try to run anything at the end of my script by using the Run command, it always opens the appliaction but my script doesnt finish until I close the app. (the opposite of what Crivex is getting) Even happens when I use this example :
Code:
  
? 'This is a test'
run 'notepad.exe'
? 'This is the end'
gets $



Im using kix32 version 4.21.0.0 on an XP machine.
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#108580 - 2003-11-21 05:27 PM Re: logon script and .EXE
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Are you running synchronous and asynchronous login scripts ?
Top
Page 1 of 2 12>


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

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.07 seconds in which 0.025 seconds were spent on a total of 13 queries. Zlib compression enabled.

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