FOAD Posted October 3, 2005 Posted October 3, 2005 (edited) Hello It's possible to send by mail at the end of my script the computer name of the PC who execute the script? or to do something else like create a log on a server each time the scipt is execute? Thanks Edited October 3, 2005 by FOAD
BigDod Posted October 3, 2005 Posted October 3, 2005 HelloIt's possible to send by mail at the end of my script the computer name of the PC who execute the script? or to do something else like create a log on a server each time the scipt is execute?ThanksTo keep a log all tou need to do is get your script to append a line to a text file, this could be at the begining or end of your script. I do not know about the emailing part. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
seandisanti Posted October 3, 2005 Posted October 3, 2005 HelloIt's possible to send by mail at the end of my script the computer name of the PC who execute the script? or to do something else like create a log on a server each time the scipt is execute?ThanksCheck out _FileWriteLog() in the helpfile, you could just add that in your script and have a single line to do what you want.
AutoChris Posted October 3, 2005 Posted October 3, 2005 (edited) HelloIt's possible to send by mail at the end of my script the computer name of the PC who execute the script? or to do something else like create a log on a server each time the scipt is execute?Thanks If your choice is either sending an e-mail or creating a log file, I would go with the log file--the technique has already been addressed by the above posts. However, if you would rather send an e-mail with the computer name that sent the e-mail, you can use sendmail to send it out. I have a script which sends me e-mail automatically and it works flawlessly. In my script which uses sendmail.exe, I use the ControlSendPlus() UDF since ControlSend() has a problem sending shift characters to a window and I wanted to send to a hidden window (don't want my users know they are sending me an e-mail.) If you would like me to post my code just ask. However, given the choice of log file vs. e-mail, I I would go for the log file. Edited October 3, 2005 by SerialKiller
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now