#122623 - 2004-07-12 02:07 PM
running exe
|
calsonic
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
|
|
|
|
#122626 - 2004-07-12 02:18 PM
Re: running exe
|
calsonic
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
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
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
|
|
|
|
#122631 - 2004-07-12 02:34 PM
Re: running exe
|
calsonic
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
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
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
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
|
|
|
|
#122636 - 2004-07-12 02:50 PM
Re: running exe
|
calsonic
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
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
|
Top
|
|
|
|
#122638 - 2004-07-12 02:54 PM
Re: running exe
|
calsonic
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
|
|
|
|
#122640 - 2004-07-12 02:56 PM
Re: running exe
|
calsonic
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
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
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 369 anonymous users online.
|
|
|