Win 7
start /w ocsetup SNMP
Win XP
sysocmgr /i:%SystemRoot%\inf\sysoc.inf /u:\\%userDomain%\netlogon\snmp.txt /x /q /r
C:\>type \\%userDomain%\netlogon\snmp.txt
[Components]
netoc = on
[NetOptionalComponents]
SNMP = 1
source:
http://thwack.com/blogs/orion-product-team-blog/archive/2010/11/08/remotely-enable-snmp-on-windows/
http://technet.microsoft.com/en-us/library/cc750391.aspx
netsh firewall set icmpsetting 8
netsh firewall set icmpsetting 8 disable
set servers=servers.txt
for /f "delims=" %%x in (%servers%) do (
psexec \\%%x -s -i -d netsh firewall set icmpsetting 8
)
source http://www.petri.co.il/enable-ping-windows-2008-server.htm
Script prompt for password and automatically mount encrypted file into free drive letter volume. By default truecrypt.exe is stored in %FlashDiskDrive%:\truecrypt\truecrypt.exe and encrypted file is on root.
echo off
set TrueCryptPath=\truecrypt\truecrypt.exe
set TrueCryptFile=\vault01.tc
for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
cd %%a: 1>> nul 2>&1
if errorlevel 1 (
set FreeDrive=%%a:
)
)
Set Dir=%cd:~0%
Set Drive=%Dir:~0,2%
%Drive%%TrueCryptPath% /q /a /l%FreeDrive% /v %Drive%%TrueCryptFile%