Rob van der Woude's Scripting Pages

Rexx, KiXtart, VBScript and batch

Scripts for Windows administrators

Warning: Many scripts on this page are very powerful tools.
Like most powerful tools they could cause a lot of damage in the hands of insufficiently skilled users.
Treat these scripts like you would treat a chainsaw: with utmost care. Do not use them if you do not fully understand what they do or how they do it.
Any damage caused using these scripts is completely your own responsibility.

 

0..9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 

💾 Click the floppy disk or package (for third party scripts) 📦 icons to download the ZIPped sources

Click the question mark icons to view the MD5 and SHA1 checksums for the ZIPped sources

 

💾 Name Description OS (1) Last modified
(DD/MM/YYYY)
💾 4AllCtxSrv.bat Executes a command once for each member of a Citrix farm, substituting the "#" character by the server name 2000 2005-02-14
💾 4AllMembers.bat Executes a command once for each member of a global group, optionally substituting the "#" character by the user ID.
The 2000 version will handle local, domain local and global groups.
2000 2002-09-11
💾 4AllMembers.bat NT 2002-02-20
💾 4AllMembers.cmd OS2 2000-06-04
💾 ActUsr.bat Display computers on the network and their logged on users NT 2002-09-30
💾 AddIPPrn.bat Add a local TCP/IP printer on any W2K/XP computer in the network.
(Uses PRNADMIN.DLL and several VBScripts from the Windows 2000/2003 Server Resource Kit)
2000+RK 2006-01-31
💾 AddPrint.bat Add a network printer on any W2K/XP computer in the network.
(Uses Windows' native RUNDLL32)
2000 2005-06-11
💾 AdminGrp.bat Remotely update Local Administrator groups on all PCs in a domain (except PCs listed in an exclusion file)
Written by Kenneth C. Mazie, Kaiser Permanente National Server Operations - Walnut Creek, Ca
NT+RK 2000-11-29
💾 ADSHelp.bat Create a (HTML) help file for "all" Directory Service Command Line Tools in Windows Server 2003.
(Will only display help for the OS in which the HTML file was created — in the language of that OS version, as is demonstrated here.
W2K3 2007-06-04
💾 AllHelp.bat
AllHelp.vbs
More details and samples of generated HTML pages on my AllHelp page. NT 2006-10-26
2008-10-16
💾 Apipa.bat Display or modify Windows 2000 IP Autoconfiguration (APIPA) settings 2000 2002-03-03
💾 CheckDST.bat Lists active computers that don't have automatic DST adjustment enabled. NT 2005-07-28
💾 CheckPrn.rex Checks the default printer set in the registry and displays a message if it isn't an HP LaserJet III or if it isn't on your own client PC (sorry, hard coded, you'll have to adapt the "valid." variable yourself). Add this script to the logon scripts and save yourself lots of calls for support.
Uses REXX.EXE from the NT Resource Kit.
TS+RK 2000-06-04
💾 ChkNAV.bat List all viruses found on all servers by Norton Antivirus NT+RK 2001-07-14
💾 CLLUN.bat Clear Last Logon User Name: clears the last user name from the login dialog box once, or replaces it with a different name.
(Use DDLU.bat instead if you never want the last logon user name displayed again)
95 98 NT 2002-08-13
💾 CloneUsr.bat Create a new domain user account by cloning an existing account (requires Windows Server 2003's DS Tools & SystemTools.com's TSCmd) 2000 2005-08-18
💾 CompName.bat
CompName.kix
Change the computer name 95+Kix 2003-10-12
💾 DDLU.bat Don't Display Last Username: clears the last user name from the login dialog box permanently.
(Use CLLUN.bat instead to remove the last logon user name just this once)
NT 2001-12-20
💾 DeadProf.bat Delete inactive corrupted profiles for current user NT 2000-09-15
💾 DelProf.bat Delete any profile NT 2003-12-17
💾 Desktop.bat Uses SHORTCUT.EXE to save all desktop shortcuts as a batch file that can recreate those shortcuts again (Desktop backup) NT+RK 2000-07-18
💾 Disabled.bat Lists all disabled user accounts NT 2000-09-21
💾 Expires.bat Lists all user accounts that have "Password expires" set to "Never" NT 2000-09-21
💾 FOR This example of FOR's /D parameter restores or removes the shares on all home directories on an NT server. NT (RK) 2000-10-17
💾 FreeSpace.rex Display a disk usage summary for the local computer NT OS2 2002-12-23
💾 FreeSpace.vbs Display a disk usage summary for any WMI enabled computer on the network WSH 2002-10-12
💾 FtpDir Show directory of remote FTP site NT 2001-11-23
💾 GetID.bat Search and display login and full names based on part of a user's full name (fails on migrated NT 4 user accounts) W2K3 2004-08-06
💾 GetIP.cmd Show PC's IP address NT OS2 1999-10-15
💾 GetPrn.bat
GetPrn2.bat
Display default printer for current user and list all printers for local system.
GetPrn works on NetBIOS/LAN Manager networks, GetPrn2 works on "real" NT networks.
NT+RK 2001-03-08
💾 GetRAM.bat Show the amount of RAM in MB.
Use Memory.bat instead for more speed (Memory.bat needs the NT Resource Kit).
The VBScript version can display the amount of RAM on remote computers as well (if WMI enabled).
NT 2001-07-17
💾 GetSID.vbs Display any user's Security ID. WMI 2005-12-03
💾 GrMember.bat Displays the members of the specified group(s).
This batch file uses DSGET and DSQUERY (native in Windows Server 2003, will work in Windows 2000 and XP if available).
2000 2005-04-03
💾 Hardware.vbs Display a basic hardware summary for any WMI enabled computer on the network.
Created with Microsoft's Scriptomatic tool.
WMI 2002-09-04
💾 HostName.bat Version 1.00 shows the host name for a specified IP address.
Available as Rexx script for OS/2 as well.
NT OS2 2000-06-04
💾 HostName.bat Version 2.00 not only shows the host name for a specified IP address, but the Mac address, NetBIOS name and domain or workgroup too. NT4 2001-04-21
💾 Hotfixes.bat Display a list of hotfixes installed locally.
Also available in KiXtart and VBScript.
NT 2002-11-24
💾 InvShare.bat Show Event Log entries concerning invalid share names NT+RK 2000-06-05
💾 JTHelp.bat Create a HTML help file for Microsoft's JT command NT 2005-03-05
💾 KillDisc.bat Kills all disconnected sessions on all Terminal Servers TS 2000-06-05
💾 KillNTPr.bat Kills a process specified by its program name and extension (no path!). Uses TLIST and KILL from the Windows NT 4 Resource Kit, or modify it to use PSLIST and PSKILL from SysInternals's PsTools set or XP's native TASKLIST and TASKKILL commands.
(KillProg.cmd will do the same in OS/2)
NT+RK XP OS2 2001-03-14
💾 KixAssoc.bat Associates the KIX extension with KIX32 executable. After executing this batch file once, you can call any *.KIX directly, without the need to precede it with KIX32.EXE.
With SET PATHEXT=.KIX;%PATHEXT% (better yet: set it as a global variable in Control Panel, System) you won't need to type the .KIX extension to run .KIX scripts.
Adapt the (hard coded) path for KIX32.EXE to your own situation.
NT 2000-09-19
💾 ListICA.bat List all IP addresses associated with Citrix' ICA round robin alias in DNS NT 2004-10-25
💾 ListPRN.cmd List specified (NT) or all (NT and OS/2) network printers' UNC path NT OS2 2000-06-05
💾 LiveUpd.kix Run Symantec's LiveUpdate unattended using Kix's SendKeys() function. 95 NT 2001-08-12
💾 LogHist.bat Read URLs from IE history and write them to a file named %UserName%.hst NT 2003-10-20
💾 Lock program This example of redirection to a temporary batch file locks single user programs when in use on a network. NT DOS OS2 1999-07-13
💾 MacAddress Batch files that store the network adapter's MacAddress in an environment variable 95 NT OS2 2002-12-07
💾 Manage.bat Open a remote Computer Management Console 2000 2005-09-26
💾 MemberOf.bat Recursively list all groups of which the specified user is a member.
This batch file uses DSGET and DSQUERY (native in Windows Server 2003, will work in Windows 2000 and XP if available).
2000 2004-10-27
💾 Memory.bat Show the amount of RAM in MB.
Use GetRAM.bat instead if you do not have the NT Resource Kit available.
The VBScript version can display the amount of RAM on remote computers as well (if WMI enabled).
NT+RK 2002-05-05
💾 MyPRN.bat List all printers and printer drivers installed on the local PC NT 2002-01-09
💾 MyAccess.bat Check the current user's permissions for the specified resource.
This batch file uses MYTOKEN.EXE, part of the Platform SDK (source only). A compiled version is available in the lab files for Microsoft's course 2154B, "Implementing and Administering Microsoft Windows 2000 Directory Services".
2000 2004-01-18
💾 NetSetXX.bat, available in Dutch, English and French A Windows 98 batch file that stores the Computer name, User name and Workgroup in environment variables, to be used in logon scripts.
Use PCNAME.BAT if you want to store the computer name without leading backslashes.
98 2000-11-01
💾 NetWho.bat
NetWho2.bat
NET WHO (as in OS/2) "ported" to NT: show every requester plus who is logged on.
NetWho assumes requester names are in PC1234 format (to ignore servers), NetWho2 doesn't assume anything but may also show servers
NT 2000-06-05
💾 NoBrowse.bat Prevent the local workstation from becoming a master browser NT 2002-03-14
💾 NoTrkIco.bat Disable "smart shortcut tracking" on the local PC.
Based on a tip by Sander Jousma.
2000 2002-04-16
💾 NoWinUpd.bat Disable Windows' Update feature (also available as Kix script) 95 NT 2002-04-10
💾 WinUpd.bat Reenable Windows' Update feature (also available as Kix script)
💾 NTRole.bat Displays the role (server or workstation) of the PC where this batch file is run NT 2001-11-18
💾 OUMember.bat Displays the members of the specified OU(s).
This batch file uses DSGET and DSQUERY (native in Windows Server 2003, will work in Windows 2000 and XP if available).
2000 2004-11-03
💾 Own.bat Recursively take ownership of a specified directory tree (BETA!) 2000+RK 2002-10-01
💾 Owner.bat Display the owner of specified file(s) 2000 2002-02-03
💾 PCName.bat Store computer name in environment variable.
This batch file stores the computer name without leading backslashes, as opposed to the NETSETxx.BAT batch files.
95 2002-03-06
💾 PMSoon.bat A "clone" of the Microsoft Windows NT 4 Server Resource Kit's SOON command using NT's native NET TIME and AT commands only. NT 2001-02-17
💾 Printers.kix PRINTERS.KIX is a KiXtart script that will map ports to network printers, based on the settings it reads from a (personal) INI file; if no mapping is specified for LPT1, LPT1 will be mapped to the default printer. NT 2000-10-17
💾 RemoteSID.bat Shows who is logged on to a remote computer, displaying both user ID and Security ID (SID).
Uses PSLOGGEDON.EXE from SysInternals' PsTools "suite"
NT+RK 2001-11-15
💾 RmUserID.bat Delete a user account and the associated data and share.
Uses the following tools: DSGET and DSQUERY (native in Windows Server 2003, will work in Windows 2000 and XP), RMTSHARE and TAKEOWN (Windows NT 4 Server Resource Kit), TSCMD (www.systemtools.com) and OWN.BAT.
Modify the server and share names to match your own environment.
2000+RK 2004-10-23
💾 RxAssoc.bat Associates the REX extension with Regina Rexx executable. After executing this batch file once, you can call any *.REX directly, without the need to precede it with REXX.EXE.
With SET PATHEXT=.REX;%PATHEXT% (better yet: set it as a global variable in Control Panel, System) you won't need to type the .REX extension to run .REX scripts.
Adapt the (hard coded) path for REXX.EXE to your own situation.
Better still, use REGINA.EXE instead of REXX.EXE.
NT 2000-02-11
💾 ScrnRes.bat Change remote PC's screen resolution (requires PSEXEC from SysInternals' PSTools and 12noon's Resolution Changer) NT 2004-08-25
💾 Servers.bat Display size, free space and used space (both in MB and as a percentage of disk size) for every partition on every server.
Also available in Rexx and VBScript as FreeSpace.*
NT+RK 2001-05-24
💾 SetOwn.bat Restore ownership and permissions for roaming (TS) profile directories.
Requires several (third party) tools, you will be prompted for downloads if these tools are not available.
W2K3 2005-07-02
💾 ShareMig.bat 1.00
ShareMg2.bat 2.00
ShareMg2.vbs 2.00
Migrate all non-printer shares from one server to another.
Version 1.00 needs to be run on the server, and fails on share names containing spaces, but it is "universal" for both Windows 2000 and Windows Server 2003.
Version 2.00 requires both the batch and the VBScript file, and needs manual modifications for Windows 2000, but it can be run from any computer in the domain and it won't fail on share names containing spaces.
(For printer migration, use Microsoft's PrintMig; for Scheduled Tasks migration, copy the scheduled tasks — %windir%\Tasks\*.job — to the new server, and use JT.EXE to re-set the "Run as:" property for each migrated task.)
2000 2005-11-02
💾 ShortExt.bat Display or modify "extension truncation" registry setting.
(Based on a tip from the Windows Registry Guide)
NT 2002-03-02
💾 SNDisk.bat Display harddisk characteristics gathered by IBM's E-Gatherer tool.
May work in XP and Server 2003 too, tested only in 2000.
May generate an error message on non-IBM systems, but will still show the desired results.
More info on EGatherer's undocumented switches.
This batch file depends on E-gatherer's backwards compatibility with older versions, which is entirely up to IBM.
2000 2005-03-05
💾 SrvInv.vbs Show and log a server hardware and software inventory.
Created using Microsoft's Scriptomatic tool.
WMI 2005-09-14
💾 SrvSpace.bat Display free space for every partition on every server. TAB delimited screen output for easy export of output.
For Windows XP use DiskSpc.bat instead.
NT 2000-06-05
💾 Startup.vbs Display all startup commands (Startup folder and registry Run) for any WMI enabled computer on the network WMI 2003-01-16
💾 TaskMgr.bat Disable or reenable task manager NT 2002-03-15
💾 TempNWD.bat Temporarily map a network drive or use an existing mapping, and remove it afterwards (unless an existing mapping was used). NT 2001-04-29
💾 UniqueID.bat Remove Intel LANDesk agent's ID and force creation of a new unique ID 95 NT 2001-07-13
💾 UpTime.bat
UpTime.vbs
Two scripts that display the amount of time a system has been up and running.
More or less equivalent to my OS/2 Rexx script LastBoot.cmd and Windows VBScript script LastBoot.vbs.
NT+RK/WMI 2006-04-22
💾 VMList.vbs List all Virtual Machines and their associated files on the local Virtual Server Host W2K3 2006-04-22
💾 WANIP.bat Display your WAN connection's IP address and host name.
Idea: Gregg Dotoli.
Requires WGET.
NT 2005-05-16
💾 WhoAmI.bat Show info on workstation and current user
Also available for OS/2 as WhoAmI.cmd
NT OS2 2000-06-12
💾 WhoHasIt.bat Show info on remote workstation and current user.
Uses DSQUERY & DSGET from Windows Server 2003.
2000 2004-10-21
💾 WhoIsIt.bat Show specified domain user's display name.
Uses DSQUERY & DSGET from Windows Server 2003.
2000 2004-10-21
💾 WhoRU.bat Remote WhoAmI (Who Are You) NT+RK 2000-10-15

 

0..9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 

Windows version:      95      Windows 95/98
  NT   Windows NT, usually version 4, including Terminal Server, and most likely Windows 2000 and XP as well
  2000   Windows 2000 and probably XP as well
  XP   Windows XP
  W2K3   Windows Server 2003
  TS   Windows NT 4 Terminal Server Edition or Citrix WinFrame
  WMI   Any Windows with WMI
  +RK   Uses either Regina Rexx or some utilities from the Microsoft® Windows NT® 4.0 Resource Kit
(RK) means that the Resource Kit does add some functionality, but is not absolutely necessary.
  DOS   May be adapted to use in DOS as well
  OS2   Multi-platform (NT plus OS/2) or available separately for OS/2

 



page last modified: 2016-09-19; loaded in 0.0494 seconds