vbs script to test my users? 
Author Message
 vbs script to test my users?

Does anyone out there have an example of a VBS file that sends email.  (no
worms please :-) ) I am trying to write a simple script that will send me an
email if one of my cohorts opens a VBS attactment.  All I want is the
username and maybe the machine name.  I was hoping to avoid using Persits
mailsender or CDONTS.  as most of my machines do not have these programs
installed.
    And yes, my virus software can protect against VBS, but I also want to
test policy, not just technology.

Mike S.



Sun, 24 Nov 2002 03:00:00 GMT  
 vbs script to test my users?
Const olMailItem = 0
set network = createobject("wscript.network")
set otlOutlook = CreateObject("outlook.application")
set otlMailItem = otlOutlook.createItem(olMailItem)
otlMailItem.subject = "your subject"
otlMailItem.body = network.username & vbcrlf & network.computername

otlMailItem.send

--
Michael Harris
MVP Scripting

Does anyone out there have an example of a VBS file that sends email.  (no
worms please :-) ) I am trying to write a simple script that will send me an
email if one of my cohorts opens a VBS attactment.  All I want is the
username and maybe the machine name.  I was hoping to avoid using Persits
mailsender or CDONTS.  as most of my machines do not have these programs
installed.
    And yes, my virus software can protect against VBS, but I also want to
test policy, not just technology.

Mike S.



Sun, 24 Nov 2002 03:00:00 GMT  
 vbs script to test my users?


Quote:
> Const olMailItem = 0
> set network = createobject("wscript.network")
> set otlOutlook = CreateObject("outlook.application")
> set otlMailItem = otlOutlook.createItem(olMailItem)
> otlMailItem.subject = "your subject"
> otlMailItem.body = network.username & vbcrlf & network.computername

> otlMailItem.send

Can this be modified for Outlook express?

thanks

J8ram



Mon, 25 Nov 2002 03:00:00 GMT  
 vbs script to test my users?
No.  OE has no programmable objects.

steve


Quote:



> > Const olMailItem = 0
> > set network = createobject("wscript.network")
> > set otlOutlook = CreateObject("outlook.application")
> > set otlMailItem = otlOutlook.createItem(olMailItem)
> > otlMailItem.subject = "your subject"
> > otlMailItem.body = network.username & vbcrlf & network.computername

> > otlMailItem.send

> Can this be modified for Outlook express?

> thanks

> J8ram



Mon, 25 Nov 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST

2. Test if a user exists in a domain through script

3. vbs Timer script to run other script

4. Launching 6 .vbs scripts simultaneously from a single script

5. Cannot Start debugging .vbs-Script in MS Script Debugger

6. Using VBS in Users Logon Script

7. please help in writing errors for testing windows scripting host with vbscript tests

8. Running a .vbs script from within a .vbs script

9. Newbie question - calling a VBS script from another VBS script

10. Include another VBS script file in a main VBS script

11. TEST TEST TEST TEST

12. alt.test,comp.test,misc.test,news.test

 

 
Powered by phpBB® Forum Software