Page 1 of 1 1
Topic Options
#129014 - 2004-11-04 04:48 PM Run exe file from script
SAM Offline
Lurker

Registered: 2004-11-04
Posts: 3
O.k. This should be easy to do, but I'm kinda new to scripting and can't get this to work. I have installed Track-It! which has an auditing feature that you can run at login. I am having problems getting the audit32.exe file to run from my login script. Basically b/c I've never done this before and don't know how. Here is what I've come up with so far:

IF INGROUP("XXX")
USE X: /DELETE /PERSISTENT
USE X: "\\server\Track-It"
?"Track-It! Audit Share Created"
ENDIF

That was the easy part that simply maps the drive letter. The audit32.exe file is located in the Track-It share. I also created an audit.bat file that runs the exe file, but I can't get it to work that way either. What I want to happen is the user logs in, they get an X: drive mapped to the share, the exe gets started, and then the X: drive gets disconnected. The audit32.exe file is set to run in the background so I would like the script file to run minimized so that it is not in the users way. Any help would be appreciated. Thanks!

*Note--I can run the audit.bat file manually and it works fine, so I know the exe works.

Top
#129015 - 2004-11-04 04:56 PM Re: Run exe file from script
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Look at the following commands and functions in the manual:
  • RUN
  • SHELL
  • SETCONSOLE()


If you have more questions once you've read up on these, post to the starters forum.

Top
#129016 - 2004-11-04 06:28 PM Re: Run exe file from script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Some things just don't play nice when run from a shell so you may have better luck pushing it to the RunOnce key in the reg instead.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#129017 - 2004-11-04 06:47 PM Re: Run exe file from script
SAM Offline
Lurker

Registered: 2004-11-04
Posts: 3
Using this command from one of your other post seems to work o.k.

run '"'+%COMSPEC%+'" /C "X:\audit.bat"'

But, there were other comments in that thread that said all the things being done in the batch file could be done in Kix. The batch file is simply:

X:
audit32.exe

Would it be better to change my login script, or is running it like above an acceptable alternative?

Also, is there a way to tell the script to wait until the audit32.exe process is complete and then disconnect the x: drive?

Top
#129018 - 2004-11-04 08:02 PM Re: Run exe file from script
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Sure, but you'd have to use Shell to make the script wait until aida32.exe is done processing. You could use Run and and the UNC path instead, then you wouldn't need to map to a drive letter...

Code:

Run '\\server\Track-It\aida32.exe'


Top
#129019 - 2004-11-04 08:48 PM Re: Run exe file from script
SAM Offline
Lurker

Registered: 2004-11-04
Posts: 3
Well, I'll be a son-of-a.............

That is what i was trying earlier today, but I wasn't including the ' ' around it.

Thanks, it works exactly like I want now!

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1226 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.057 seconds in which 0.026 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