Month: February 2009

Windows – Disable automatic update from VBS

Sono stufo di cliccare..

Const AU_DISABLED = 1

Set objAutoUpdate = CreateObject(“Microsoft.Update.AutoUpdate”)
Set objSettings = objAutoUpdate.Settings

objSettings.NotificationLevel = AU_DISABLED
objSettings.Save

Windows – Symlink

Hahahah,

I’m burst in laughter when I read this NTFS (under win 2000 or above) specific, obviously Microsoft called with Junction name.

Unfortunately, Windows comes with no tools for creating junctions, for use this funtion there’s two additional program:

– Get Resouce Kit and use “linkd” program

– Use “junction” program form Sysinternal tool

More info:

http://support.microsoft.com/?kbid=205524

http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

IIS maxupload limit ASP

IIS 6 on Windows Server 2003 or R2 has a limit of 200 KB for ASP requests in general and file uploads. To change this limitation you need to edit the Metabase file, which can be found at c:\Windows\System32\Inetsrv\MetaBase.xml.
Follow these steps:
– Stop IIS from command line

iisreset /STOP

– Open MetaBase file, find the variable AspMaxRequestEntityAllowed limits the number of bytes in the page request (by default 200KB); change the value to 1073741824 (unlimited) or to a limit of your choice.

– Start IIS from command linet:

iisreset /START

There’s another way for do this change without stop the service but sincerly IIS is a Microsoft program, I’m no sure about this operation..

Go to IIS and right click the server, select Properties, and check the box “Allow changes to MetaBase configuration while IIS is running” then try to edit metbase file.

Discovery Subnet with Ping

Sometime we need to discover an entire subnet.

This is a small script not so fast but easy:

#!/bin/sh
subnet=10.10.10.
addr=1
while [ $addr -lt 256 ]; do
ping -c 1 -t 1 $subnet$addr > /dev/null && echo $subnet$addr Is Alive
let addr=addr+1
done

Windows – Change IP from command line

Yes, is possibile don’t make lot of click to reconfigure network interfaces under Windows, using “netsh” command like this:

For set up static address and metric 1 gateway:

netsh interface ip set address name=”Local Area Connection” static ip.ip.ip.ip 255.255.255.0 gw.gw.gw.gw 1

For set up static dns:

netsh interface ip set dns “Local Area Connection” static xx.xx.xx.xx
netsh add dns “Local Area Connection” addr=xx.xx.xx.xx index=2

For setup ip by dhcp:

netsh interface ip set address name=”Local Area Connection” source=dhcp
netsh interface ip set dns name=”Local Area Connection” source=dhcp