OregonITFella
IS-IT--Management
VBScript experts, tell me if this can be done. I want to pull the logged on users name and machine name with this code:
and then I want to know if there is in VBScript an ability to send that pulled information into an email? It would be extremely cool if I could also format the email with a To: address already filled out but I don't know if VBScript can do this. The email client is Outlook 2000/2003.
So, the big questions is can it be done?
Code:
'This will print to the screen what the currently logged on users name is'
Set WshNetwork = WScript.CreateObject("WScript.Network")
WScript.Echo "Username: " & WshNetwork.UserName
'This will give us their machine name
Set WshNetwork = WScript.CreateObject("WScript.Network")
WScript.Echo "Computer Name: " & WshNetwork.ComputerName
and then I want to know if there is in VBScript an ability to send that pulled information into an email? It would be extremely cool if I could also format the email with a To: address already filled out but I don't know if VBScript can do this. The email client is Outlook 2000/2003.
So, the big questions is can it be done?