Page 1 of 2 12>
Topic Options
#122623 - 2004-07-12 02:07 PM running exe
calsonic Offline
Fresh Scripter

Registered: 2004-07-12
Posts: 13
I want to run an exe through the login script. I want this file to execute for every user and everytime they login. this is what I have used but it does not seem to work.

RUN "\\epsfile\resources\software\audit\agent32.exe"

is this correct, does it need to be in a loop or anything.

Thanks

Top
#122624 - 2004-07-12 02:10 PM Re: running exe
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Try this

Code:
 

Shell "CMD /c \\epsfile\resources\software\audit\agent32.exe"




Aaron
_________________________
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
#122625 - 2004-07-12 02:18 PM Re: running exe
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
your line was correct right from the start.
no need for looping or anything else either.
_________________________
!

download KiXnet

Top
#122626 - 2004-07-12 02:18 PM Re: running exe
calsonic Offline
Fresh Scripter

Registered: 2004-07-12
Posts: 13
hey thanks for the quick reply. I placed that string in the body of the script. does not seem to work. should I put it in an if statement dor users in certain groups ?
Top
#122627 - 2004-07-12 02:20 PM Re: running exe
calsonic Offline
Fresh Scripter

Registered: 2004-07-12
Posts: 13
Quote:

your line was correct right from the start.
no need for looping or anything else either.




Yea i did think that should work. I have checked and double checked folder names etc to make sure they r correct just doesnt work.

Top
#122628 - 2004-07-12 02:28 PM Re: running exe
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Are you sure your script is running?

Try changing the "RUN" to "SHELL", then pause afterwards to see the results. Once you have it working you can change it to "RUN" later

Code:
SHELL "\\epsfile\resources\software\audit\agent32.exe"
"Result status: ["+@ERROR+"] "+@SERROR+@CRLF
"Hit a key to continue: " Get $





Top
#122629 - 2004-07-12 02:28 PM Re: running exe
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Permissions maybe?

What happens if you run that path while logged on as the user?
_________________________
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
#122630 - 2004-07-12 02:28 PM Re: running exe
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
next question is, does the exe require command-prompt environment?
or, does it work if you place the string (the quoted \\path\exename) in startMenu->run?

if it does work from there, I need to quess you have something in your script that prevents the execution.
_________________________
!

download KiXnet

Top
#122631 - 2004-07-12 02:34 PM Re: running exe
calsonic Offline
Fresh Scripter

Registered: 2004-07-12
Posts: 13
Quote:

Are you sure your script is running?

Try changing the "RUN" to "SHELL", then pause afterwards to see the results. Once you have it working you can change it to "RUN" later

Ok this worked and it said :- operation completed sucesfully it any key to continue. the executable did not run tho ?

Code:
SHELL "\\epsfile\resources\software\audit\agent32.exe"
"Result status: ["+@ERROR+"] "+@SERROR+@CRLF
"Hit a key to continue: " Get $








Top
#122632 - 2004-07-12 02:35 PM Re: running exe
calsonic Offline
Fresh Scripter

Registered: 2004-07-12
Posts: 13
Quote:

Permissions maybe?

What happens if you run that path while logged on as the user?




it runs fine if u run it logged in as the user.

Top
#122633 - 2004-07-12 02:37 PM Re: running exe
calsonic Offline
Fresh Scripter

Registered: 2004-07-12
Posts: 13
Quote:

next question is, does the exe require command-prompt environment?
or, does it work if you place the string (the quoted \\path\exename) in startMenu->run?



if it does work from there, I need to quess you have something in your script that prevents the execution.




it does run fine if you run from start run menu.

Top
#122634 - 2004-07-12 02:42 PM Re: running exe
calsonic Offline
Fresh Scripter

Registered: 2004-07-12
Posts: 13
Just to let you know this is a windows based application I am trying to get it to run. it runs in the background audits the machine and creates a file on the network drive.
Top
#122635 - 2004-07-12 02:47 PM Re: running exe
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
How are you checking if the executable runs?
_________________________
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
#122636 - 2004-07-12 02:50 PM Re: running exe
calsonic Offline
Fresh Scripter

Registered: 2004-07-12
Posts: 13
I can check to see if it runs bye looking in the directory to see if the executable has created the required audit file. If there is no file then it hasnt worked. If i run directly by double clicking the exe or through run nmenu it allways creates this file.
Top
#122637 - 2004-07-12 02:50 PM Re: running exe
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Is the folder - \\epsfile\resources\software\audit static (i.e. like an APPS server/folder) or is part of the login server?

Or...
Code:

USE Q: "\\epsfile\resources\software\audit"
CD Q:
RUN "agent32.exe"
C:
USE Q: /DELETE
Code:


Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#122638 - 2004-07-12 02:54 PM Re: running exe
calsonic Offline
Fresh Scripter

Registered: 2004-07-12
Posts: 13
I c what you mean i will give this code a try.

Edited by calsonic (2004-07-12 02:58 PM)

Top
#122639 - 2004-07-12 02:54 PM Re: running exe
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
hmmm... So the executable could well be runing though? It just isnt writing the file, in that case i would double check the share permisions. Also it might be worth using WriteProfileString and seeing if you can create a log file.
_________________________
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
#122640 - 2004-07-12 02:56 PM Re: running exe
calsonic Offline
Fresh Scripter

Registered: 2004-07-12
Posts: 13
Quote:

hmmm... So the executable could well be runing though? It just isnt writing the file, in that case i would double check the share permisions. Also it might be worth using WriteProfileString and seeing if you can create a log file.




The share permissions are fine. it works 100% when logged on as any user when run manually. what is this writeproflestring ?

Top
#122641 - 2004-07-12 02:57 PM Re: running exe
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
You can change to an available drive letter. I just pulled Q: out of the air thinking that you may need to run the program directly from the folder. One other thing, I used "deep mapping". If you clients do not have W2k+, deep mapping will not work..

If these are not W2k+ clients, then you have to do something like -
Code:

USE Q: "\\epsfile\resources"
CD Q:
CD "\\software\audit"
RUN "agent32.exe"
C:
USE Q: /DELETE
Code:



Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#122642 - 2004-07-12 03:02 PM Re: running exe
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
It is just a "might as well try it..." suggestions...

WriteProfileString - creates a log file. I was just thinking if you can use this to test whether or not there is problems writing files to the target folder.

But like i said its just a suggestion
_________________________
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
Page 1 of 2 12>


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

Who's Online
2 registered (morganw, mole) and 414 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.075 seconds in which 0.024 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