Start Kontakt

Scripts

WSH/VBScript documentation is available for download at http://msdn.microsoft.com/scripting/. You have to follow the download links to see the real current version and date of the latest WSH.
Direct links to WSH downloads are also available on my Windows page.
If you're searching for the old CHOICE command (that's CHOICE.COM) have a look here, and if you need SLEEP.EXE for Windows XP/2000 get the Windows Server 2003 Resource Kit (or via MS download search).

All following scripts are developed by myself, and are free to use and open source. Exceptions from this will be mentioned separately.

All these scripts were developed to automate installation of programs after a clean Windows installation, especially for programs (and games) that just need only some registry entries, and hence must not be installed on the system partition (which reduces image size for me).

DOS/Windows command line escaping

english Have you ever wondered how you have to mask a parameter on the command line if the parameter contains a special character like the quote or the percent symbol?
Joe Beda checked it all out, found a solution how to escape them correctly and posted it on his homepage: Put quotes around the parameter and inside ... It turns out that you must replace the double quote (") with the following sequence: "^"". You must also quote the percent character (%) with this sequence: "^%".

german Schon mal sich gefragt wie man einen Parameter auf der Kommandozeile maskieren muss, wenn der Parameter ein Sonderzeichen wie das Anführungszeichen oder das Prozent-Symbol beinhaltet?
Joe Beda hat alles ausprobiert, eine Lösung gefunden und auf seiner Homepage veröffentlicht: Umschliessen des Parameter mit Anführungszeichen und innen ... It turns out that you must replace the double quote (") with the following sequence: "^"". You must also quote the percent character (%) with this sequence: "^%".

Fix Shortcut

english Did you ever moved several documents or a simple application or game to another folder or drive?
Did you experienced that all you shortcuts to those files were broken and fixing them through the properties dialog is annoying and time consuming?
Did you also recognize that the icons kept broken after this, and it was even harder and more annoying to fix the icons too?
If so, then do not fear moving files around anymore, because when I got p**sed about this i wrote a small VBScript to do this task with comfort: the Shortcut Script.
It supports interactive and batch mode, drag and drop, and features an easy to use search and replace functionality.

german Schon mal mehrere Dokumente in andere Ordner oder Laufwerke verschoben, oder eine Anwendung oder ein Spiel?
Hast Du Dich darüber geärgert, dass alle Verknüpfungen nicht mehr funktionierten und das Korrigieren über den Eigenschaften-Dialog zeitraubend und nervend ist?
Auch festgestellt, dass die Symbole dadurch nicht korrigiert wurden, und es noch schwieriger und zeitraubender ist diese auch zu korrigieren?
Wenn ja, dann keine Angst mehr davor, weil als es mich angeko**t hat, habe ich eine kleines VBScript geschrieben um diese Aufgabe mit Leichtigkeit zu erledigen: Fix Shortcut Script.
Es bietet einen interaktiven und einen Batch Modus, Drag-and-Drop, und eine leichte zu nutzende Suchen und Ersetzen Funktion.

Download Fix Shortcut 1.2

Simple Replace

english An easy-to-use, search and replace tool.
Specify an input file, what phrase to replace with what and an output file. It also supports special features for registry file (.reg) processing, one is doubling backslashes for strings and the other is converting a text into a string with a hex byte row.

german Ein einfach zu benutzendes Suchen & Ersetzen Tool.
Gebe eine Eingabe-Datei an, welcher Text mit was ersetzt werden soll und eine Ausgabe-Datei. Ausserdem bietet es besondere Funktionen für Registry Dateien (.reg), eine ist das Verdoppeln von Backslashen für Zeichenketten und die andere ist das Konvertieren eines Text in eine Zeichenkette mit einer Hex-Byte Reihe.

Download Simple Replace 1.1

Convert To DOS

english Small tool to convert an ANSI ASCII file into a DOS OEM ASCII file or vice-versa.
Currently this only converts "äöüÄÖÜß", but you can easily adapt the script to convert any character into every character you want, because all my scripts are open source.
It allows to convert several files in one call.

german Kleines Programm um eine ANSI ASCII Datei in eine DOS OEM ASCII Datei, oder andersherum, zu konvertieren.
Dieses Tool konvertiert nur "äöüÄÖÜß", aber es kann sehr leicht von Euch für andere Buchstaben adaptiert werden, da open source.
Es erlaubt auch die Konvertierung von mehreren Dateien mit einem Aufruf.

Download Convert To DOS 1.0

Read Environment

english A simple script to read an environment variable. Also allows to append the value to a file.

german Ein einfaches Skript zum Ermitteln einer Umgebungsvariablen. Erlaubt auch das Anhängen des Wertes an eine Datei.

Download ReadEnv 1.0

Get Special Folders

english A simple script to determine some special Windows folders (e.g. "Desktop", see WSH Helpfile under WshSpecialFolders object for more). Also allows to append the value to a file.
v2.0 now allows to use CSIDL via Shell.NameSpace for getting even more special Windows folders (e.g. "CSIDL_PROGRAM_FILES", see CSIDL on MSDN). The package also contains an VBScript "include" with ShellSpecialFolderConstants.

german Ein einfaches Skript zum Ermitteln einiger besonderer Windows-Verzeichnisse (z.B. Programme, siehe WSH Hilfedatei unter WshSpecialFolders Objekt für mehr). Erlaubt auch das Anhängen des Wertes an eine Datei.
v2.0 erlaubt nun die Verwendung von CSIDL via Shell.NameSpace um noch mehr besondere Windows-Verzeichnisse zu ermitteln (z.B. "CSIDL_PROGRAM_FILES", siehe CSIDL auf MSDN). Das Packet enthält auch ein VBScript "Include" mit ShellSpecialFolderConstants.

Download Get Special Folder 2.0

Read Registry

english A simple script to read the value of a wanted registry key. Also allows to append the value to a file.

german Ein einfaches Skript zum Auslesen eines gewünschten Registrierungs-Schlüssel. Erlaubt auch das Anhängen des Wertes an eine Datei.

Download ReadReg 1.0

Set Global Environment

english A simple script to set the value of a system(!) environment variable. Also allows to append a value to a environment variable without resolving variables within it.

german Ein einfaches Skript zum Setzen einer System(!)-Umgebungsvariable. Erlaubt auch das Anhängen des Wertes an eine Umgebungsvariable ohne darin enthaltene Variablen aufzulösen.

Download WinSetGlobal 1.0

Clean Value

english A simple script to clean a value from quotes and trailing spaces. Also allows to append the cleaned value to a file.

german Ein einfaches Skript zum Entfernen von Anführungszeichen und nachfolgenden Leerzeichen von einem Wert. Erlaubt auch das Anhängen des gesäuberten Wertes an eine Datei.

Download Clean Value 1.0

Create "Set Variables" Batchfile

english Based on the previous scripts I created a batchfile that determines several pathes and settings of a Windows installation (ProgramFiles, CommonProgramFiles, several StartMenu pathes for the current and all users), which are useful for handling shortcut and configuration files, and puts them into a new batchfile in the windows directory called "SetVariables.bat". This way the created script is always accessible for other script files.
The creating batchfile shows how to redirect a scripts' result and get it into a new environment variable.
This batchfile was not tested on Windows 9x/ME, so I don't know if the results for the StartMenu pathes are non-sense or not, but it will give you the ProgramFiles and CommonProgramFiles variables like on Windows NT/2000/XP.

german Basierend auf den vorherigen Skripten habe ich eine Batchdatei erstellt die verschiedene Pfade und Einstellungen einer Windows-Installation ermittelt (ProgramFiles, CommonProgramFiles, verschiedene StartMenü Pfade für den aktuellen User und AllUsers), welche hilfreich bei der Handhabung von Verknüpfungen und Konfigurationsdateien sind, und diese in eine neue Batchdatei namens "SetVariables.bat" im Windows-Verzeichnis schreibt. Auf diese Weise ist die erstellte Batchdatei immer verfügbar für andere Skripte.
Die erstellte Batchdatei zeigt auch wie man die Ergebnisse der Skripte in eine Datei umleitet und diese in neuen Environment Variablen ablegt.
Diese Batchdatei wurde nicht unter Windows 9x/ME getestet, so dass ich nicht weiss ob die Ergebnisse für die StartMenü Pfade non-sense sind oder nicht, aber es wird Euch die ProgramFiles und CommonProgramFiles Variablen wie unter Windows NT/2000/XP geben.

Download Create Set Variables 1.0

RegRights

english This is a small C program which can give a group or an user full access to a registry key.
It is important that you can give normal users access to registry values of games and applications, so these can be used them too.
The program was coded by a good friend just for me. It only fulfills my purpose, of course it would be better if you could give more specific rights. I think he doesn't have anything against someone working on this program, but then please give us a copy, so we can learn from it too.

german Es handelt sich hier um ein kleines C-Programm mit dem einer Gruppe bzw. einem Benutzer Vollzugriff auf einen Registry-Zweig gegeben wird.
Wichtig ist auch das man mit RegRights einem einfachen Benutzer Zugriff auf Registry-Einträge von Spielen und Anwendungen geben kann, so dass man diese auch mit diesem nutzen kann.
Das Programm wurde von einem guten Freund extra für mich programmiert. Es erfüllt genau den von mir gewünschten Zweck, natürlich wäre es schöner wenn man etwas differenzierter die Berechtigungen vergeben könnte. Ich denke er hat nichts dagegen wenn jemand das Programm erweitern möchte, dann aber bitte auch eine Kopie an uns, damit wir auch was davon lernen können.

Download RegRights

Re-Installing without Installing

english All previous scripts and tools just serve one purpose: getting programs, that are not installed on C:, to run correctly on a fresh system without installing, especially games.
Some games, like egoshooters from id Software, run without adding anything, but the autostarts of the cds always want to install again instead of letting me play. Other games need specific registry entries or INI files to run and for Unreal Tournament you have to have correct file associations to (de-)install/handle UMODs. But also applications, that run autonomically from another drive, can be configured very fast with them.
As examples for the download package I choosed my reinstallation files for the games Battlefield 1942 and Doom 3 as well as for the application DeEnEs. For BF1942 the input request for the cd key is called automatically too, Doom needs an INI file and for DeEnEs the registry rights for normal users are very important.
Additional batch files are provided, that define groups for games and applications, and assign users to them automatically. Another batch file replaces pathes in startmenu links with place holders. For BF1942 also exists a batch file, that renames the intro movie files und deactivates them by doing this, so you get to the main menu on startup within seconds.
The InstallShield files of the games (ca. 15MB) have been left out as these are normally not very important and the main principle is still obvious.
So next time you apply a backup image or rather make a new install of Windows just run some short scripts and start playing :)

german Alle vorherigen Skripte und Programme dienen eigentlich nur einem Zweck: Programme, insbesondere Spiele, die nicht auf C: installiert sind auf einem frischen System ohne Installations-Orgie zum korrekten Laufen zubekommen.
Einige Spiele, z.B. Egoshooter von id Software, laufen zwar auch ohne Zutun sofort, aber die Autostarts der CDs wollen immer nochmal installieren anstatt mich spielen zulassen. Andere Spiele benötigen zum Starten besondere Registry-Einträge oder INI-Dateien und bei Unreal Tournament müssen entsprechende Verknüpfungen zum (De-)Installieren/Verwalten von UMODs vorhanden sein. Aber auch Anwendungen, die autonom auf anderen Laufwerken funktionieren, können damit sehr schnell eingerichtet werden.
Als Beispiele für das Download-Paket habe ich meine Reinstallationsdateien für die Spiele Battlefield 1942 und Doom 3 sowie die Anwendung DeEnEs ausgewählt. Bei BF1942 wird auch automatisch die Eingabe des CD-Keys aufgerufen, bei Doom ist eine INI-Datei dabei und bei DeEnEs sind die Registry-Berechtigungen für normale Benutzer sehr wichtig.
Zusätzlich sind Batch-Dateien enthalten, die automatisch Gruppen für Spiele und Anwendungen definieren und diesen Benutzer zuweisen. Ausserdem ist eine Batch-Datei dabei mit der man Pfade in Startmenü-Einträgen durch Platzhalter ersetzen kann. Und für BF1942 gibt es noch eine weitere Batch-Datei, welche die Intro-Movies umbenennt und damit deaktiviert, damit befindet man sich innerhalb von wenigen Sekunden im Hauptmenü.
Die InstallShield-Dateien der Spiele (ca. 15MB) habe ich weggelassen, da diese eigentlich nicht besonders wichtig sind und das Prinzip trotzdem ersichtlich ist.
Also beim nächsten Zurückspielen eines Images bzw. Neuinstallation von Windows einfach kurz ein paar Skripte ausführen und loszocken :)

Download Reinstall Sample

Make Big (New Edition)

english This is a re-creation of PC Magazine's MakeBig utility. It just creates an empty file of a given size. Under Windows 2000 or XP you can also use the following command "fsutil file createnew <filename> <size>".

german Dies ist eine Neugestaltung von PC Magazine's MakeBig Utility. Es kann nur eine leere Datei in einer gewünschten Grösse erstellen. Unter Windows 2000 oder XP kann man auch das folgende Kommando benutzen "fsutil file createnew <filename> <size>".

Download MakeBigN 1.0

more...
WSH Info, just displays information about your current WSH installation.
KeepAlive, a small XP/2K/NT script for a friend which pings a machine every x seconds. He wanted to keep a dial-up connection alive, because he was dropped by the RAS server after 2 minutes of idle time, which is too short for examing source code.


Top Start Kontakt