BAT/CMD Script Log Generator
BAT/CMD scripts are very much helpful to do a monotonous job automatically and sometimes the outputs of the batch script file are very much required. We can generate log file from batch file, but we can't get the 100% log within batch file, so I was looking for a tool which generate log files from a batch script. After a few search, finally I found a tiny utility called wtee.exe on wintee.
To use it properly, I have created a batch file with which u can execute any batch script, and after executing the batch file it will automatically archive the entire output log, also there is an option to send mail notification with the output file as mail attachment (optional). For sending mail notification I used blat.exe from www.blat.net.
146 views
Automatic NT-Backup (System State Backup) with retention period and e-mail notification after complete.
A simple script for automatic System State backup where you can easily set backup retention period and it also send you an e-mail notification after completion. With this script you can also archive backup log and if you wish u can also set backup log retention period. It can also set backup files with date stamp.
For e.g., SysBackup_ComputerName_24-03-2009.bkf
You need two small utility,
- Blat.exe for sending mail, you can get details from here.
- Forfiles.exe for checking old files, you can get details from here.
Just download following zip file and extract its content to %windir%\ or %windir%\system32 folder.
System32.zip (75.5 KiB, 904 hits)
Mail Notification

1,835 views
Disable Print Screen Function Via VBS Script (By using GPO Startup/Shutdown Script)
Another requirement, now customer need to disable default windows Print Screen function on all of their user desktop,
So, we started our searching again, and easily we able to find out how to disable print screen on windows by importing following registry.
1 2 3 | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,37,e0,00,00,54,00,\ 00,00,00,00 |
So, again we start working to create a custom adm file. As because this is a HKLM key, so we need Privilege to import it into registry, and only way to do so is to apply some policy via Computer Configuration, whit which we can force policy on each computer not on individual user.
But suddenly we discover that ADM files don't support reg_binary values, so we have to find out any other alternatives.
5,690 viewsOS Dependent Logoff/Logon Script run via GPO
Use following VBS script Startup or Shutdown script.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Option Explicit Dim objItem, colItems, objWMIService, strComputer, objShell strComputer = "." Set objShell = CreateObject("WScript.Shell") Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48) For Each objItem in colItems If InStr(objItem.Caption,"2000") Then 'Add your line here for 2000 objShell.Run "regedit", 1, True End If If InStr(LCase(objItem.Caption),Lcase("XP")) Then 'Add your command line here for 2000 objShell.Run "calc", 1, True End If If InStr(LCase(objItem.Caption),Lcase("2003")) Then 'Add your command line here for 2000 objShell.Run "notepad", 1, True End If Next |
with above script, on Windows 2000 it will execute regedit.exe, on Windows XP it will execute calc.exe, and on Windows 2003 it will execute notepad.exe.
You can change the file as you wish..
209 views

(4 votes, average: 4.50 out of 5)

