Task automation with Visual Basic Script

In case you want to automate some tasks, for example backing up a specific folder from your computer every time you plug in a specific USB-Stick.
All you need to do is to execute the following Visual Basic Script on your computer.
Place it in the Startup folder of Windows if you want it to run every time you login.
Script on your computer

Set Shell = CreateObject( "WScript.Shell" )
Set fso = CreateObject("Scripting.FileSystemObject")
Set oWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colME = oWMI.ExecNotificationQuery("Select * from Win32_VolumeChangeEvent")

' Name of the Volume we are after
strVolumeName = "BACKUPDISK"

' Watch for new Drives
Do
Set oLE = colME.NextEvent
If oLE.EventType = 2 Then
' New Drive arrived
Set d = fso.GetDrive(oLE.DriveName)

If d.VolumeName = strVolumeName Then
Shell.Run oLE.DriveName & "\backup.vbs"
End If
End If
Loop

The Script will check for the Drivename (here: „BACKUPDISK“) and if the Drive is found it will execute the BackupScript on the USB-Stick.

Script (backup.vbs) on the USB-Stick

' This Script must be on the USB-Drive in the root directory
Set Shell = CreateObject( "WScript.Shell" )
Set fso = CreateObject("Scripting.FileSystemObject")

' Get the Userprofiledirectory & Computername
strUP = Shell.ExpandEnvironmentStrings( "%USERPROFILE%" )
strCN = Shell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
strDRV = fso.GetDriveName(WScript.ScriptFullName)

' Create a subfolder on the USB-Drive if it doesn't exist
If Not(fso.FolderExists (strDRV & "\Backup\" & strCN)) Then
fso.CreateFolder strDRV & "\Backup\" & strCN
End If

' Backup the Data (Overwrite existing files)
fso.CopyFolder strUP & "\Pictures", strDRV & "\Backup\" & strCN & "\", vbTrue

In this case all your pictures from the Picturefolder in your Userprofile are backed up.

Aktivierungszeitraum von Windows erweitern (Rearm Windows)

Vor kurzem stand ich vor dem Problem das Windows Aktiviert werden musste, ich aber noch etwas Testen musste zum Abschluss.
Daher hab ich mich im Internet auf die Suche nach einer Lösung gemacht und diese auch gefunden.

Für Windows XP sowie 2003 Server:

  • Starten im Abgesicherten Modus mit Eingabeaufforderung
  • In der Konsole folgendes ausführen:
    rundll32.exe syssetup,SetupOobeBnk
  • Zum Schluss noch mit dem Eventviewer kontrollieren ob die Reaktivierung erfolgreich war.
  • Neustarten und fertig.

Windows 7/8/2008 R2/2012:

  • Eingabeaufforderung als Administrator starten und folgendes ausführen:
  • slmgr.vbs /rearm

  • Neustarten

Auf folgenden Seiten findet man noch weitere Infos darüber:
Windows Server 2008 R2 Aktivierungszeitraum erweitern
How to rearm and change activation key on Windows

HOWTO Setup more simultaneous TCP connections

TcpNumConnections

Registry:

HKLMSYSTEMCurrentControlSetServicesTcpipParameters

Keyname: TcpNumConnections

Data type Range Default value
REG_DWORD 0x0 – 0xFFFFFE 0

Description
Determines the maximum number of connections that TCP can have open simultaneously.
If the value of this entry is 0, you cannot establish any connections.

Note Image Note
Windows 2000 does not add this entry to the registry. You can add it by editing the registry
or by using a program that edits the registry.

LINKS
http://technet.microsoft.com/en-us/library/cc938216.aspx
http://www.windowspage.de/frame.php?http://www.windowspage.de/tipps/021202.html