calsonic
(Fresh Scripter)
2004-07-12 02:07 PM
running exe

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


AzzerShaw
(Seasoned Scripter)
2004-07-12 02:10 PM
Re: running exe

Try this

Code:
 

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




Aaron


LonkeroAdministrator
(KiX Master Guru)
2004-07-12 02:18 PM
Re: running exe

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


calsonic
(Fresh Scripter)
2004-07-12 02:18 PM
Re: running exe

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 ?

calsonic
(Fresh Scripter)
2004-07-12 02:20 PM
Re: running exe

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.


Richard H.Administrator
(KiX Supporter)
2004-07-12 02:28 PM
Re: running exe

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 $






AzzerShaw
(Seasoned Scripter)
2004-07-12 02:28 PM
Re: running exe

Permissions maybe?

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


LonkeroAdministrator
(KiX Master Guru)
2004-07-12 02:28 PM
Re: running exe

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.


calsonic
(Fresh Scripter)
2004-07-12 02:34 PM
Re: running exe

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 $









calsonic
(Fresh Scripter)
2004-07-12 02:35 PM
Re: running exe

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.


calsonic
(Fresh Scripter)
2004-07-12 02:37 PM
Re: running exe

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.


calsonic
(Fresh Scripter)
2004-07-12 02:42 PM
Re: running exe

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.

AzzerShaw
(Seasoned Scripter)
2004-07-12 02:47 PM
Re: running exe

How are you checking if the executable runs?

calsonic
(Fresh Scripter)
2004-07-12 02:50 PM
Re: running exe

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.

Kdyer
(KiX Supporter)
2004-07-12 02:50 PM
Re: running exe

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


calsonic
(Fresh Scripter)
2004-07-12 02:54 PM
Re: running exe

I c what you mean i will give this code a try.

AzzerShaw
(Seasoned Scripter)
2004-07-12 02:54 PM
Re: running exe

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.

calsonic
(Fresh Scripter)
2004-07-12 02:56 PM
Re: running exe

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 ?


Kdyer
(KiX Supporter)
2004-07-12 02:57 PM
Re: running exe

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


AzzerShaw
(Seasoned Scripter)
2004-07-12 03:02 PM
Re: running exe

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


Les
(KiX Master)
2004-07-12 03:02 PM
Re: running exe

Might be it just won't work before the desktop is loaded. You may want to push it to the RunOnce reg key.
$RC=WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce", "Audit", "\\epsfile\resources\software\audit\agent32.exe","REG_SZ")


LonkeroAdministrator
(KiX Master Guru)
2004-07-12 03:06 PM
Re: running exe

ja, might be.
but then it's no good.
who audits anything? admins.
who is the dude logged on? non-admin.

what the heck?
seems like trashy program if that desktop not loaded is the problem.


calsonic
(Fresh Scripter)
2004-07-12 03:10 PM
Re: running exe

Quote:

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





This creates all the folders just fine then deletes em but no results lol GRRRRRRRRRRRRRRRR


calsonic
(Fresh Scripter)
2004-07-12 03:20 PM
Re: running exe

Quote:

ja, might be.
but then it's no good.
who audits anything? admins.
who is the dude logged on? non-admin.



what the heck?
seems like trashy program if that desktop not loaded is the problem.




I guess it could be a shitty program. it does say on there website that it can be used using any logon script.


AzzerShaw
(Seasoned Scripter)
2004-07-12 03:26 PM
Re: running exe

Running out of suggestions now.

Have you tried Les reply?


calsonic
(Fresh Scripter)
2004-07-12 03:41 PM
Re: running exe

I have sent an e-mail to the support helpdesk of this software. the software its self seems good. If they can get this working I will buy if not then I will have to look elsewhere for audit software.