jimbo 0 Posted March 3, 2004 Hello, I am the network administrator for our local school district. I want to run a security test with respect to email. Too often we still have staff who open attachments despite having a clear policy on "unexpected attachments" What I want to do is send out an email with an attachment that, when run, will simply email me the email address/name of the person who ran it. I don't need it to report anything else - just the name. This will allow me to setup training sessions on email security with the staff who obviously need it. Does anyone know of a simple program that will do this? thanks for your help all. Share this post Link to post
felix 0 Posted March 3, 2004 If you run a full Win2k, XP or NT4 network, write an Access db with the following function in it to get the username and then have an "on load" sub that calls the application "net send jimbo GetUserName()". You could just write a form that autoexecs and also calls this function. Perhaps you could have the form say "You have been reported to your system administrator for violation of the email policy" You'll likely get a bucket of popups on your screen, but you'll know who it was. Function GetUserName() As String Dim LUserName As String Const lpnLength As Integer = 255 Dim status As Integer Dim lpName ' Assign the buffer size constant to lpUserName. LUserName = Space$(lpnLength + 1) ' Get the log-on name of the person using product. status = WNetGetUser(lpName, LUserName, lpnLength) ' See whether error occurred. If status = NoError Then ' This line removes the null character. LUserName = Left$(LUserName, InStr(LUserName, Chr(0)) - 1) Else ' An error occurred. MsgBox "Unable to get the name." End End If GetUserName = LUserName End Function Share this post Link to post
jimbo 0 Posted March 3, 2004 That will do excellently! Thanks! In one school the teachers all login as "teacher" so it won't specifically tell me which one ran it. But, I will be able to message all of them telling them that someone violated the email policy. The person will know they are busted without having the embarrassment of looking stupid (or getting caught). I believe they will still learn the appropriate lesson. Thanks for your help. Share this post Link to post