Showing posts with label Miscellaneous. Show all posts
Showing posts with label Miscellaneous. Show all posts

Wednesday, June 1, 2011

Re-Create Desktop Icon In Win XP

Recently I ended up in deleting the Show Desktop icon from my Quick Launch Bar accidentally. I needed the button back in place badly since I mostly have lot of windows open most of the time. Show Desktop icon was a handy for accessing my Desktop. So I was researching ways to restore my Show Desktop icon back in place and I have found the following solution.

Manually recreate the Show Desktop icon
Create a text file with the extension .scf (preferably Show Desktop.scf). SCF stands for Shell Command File. SCF files are executed by shell32.dll and the file extension is one of the special ones that remain hidden even if you instruct Windows to show file extensions. Paste the following code into the file.

[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop

Save the file and place the same in Quick Launch bar and now you’re done.

Using the Regsvr32 command
This one is pretty simple, just go to run prompt or command prompt and type in the following command.
regsvr32 /n /i:U shell32.dll

The regsvr32 command line tool used to register .dll as command components into the registry. The above command with instruct Windows to register shell32.dll with optional install string, which enables Show Desktop icon back into place.
The Show Desktop icon file should be available now automatically in Quick Launch bar after executing the regsvr32 command.

Monday, August 31, 2009

Batch files for changing IP Address and Domains

The following post provide information about how to create batch files for changing IP Addresses and Domains easily. Just copy the contents marked between ****** into a text file and give the file extension as .bat


CHANGING IP ADDRESS

We use the netsh command to change the IP address. The following batch files help in changing the IP Address from dynamic to static and vice versa:

Provide Static IP
********************************************************************************
@ECHO OFF

set varip=192.68.10.12
set varsm=255.255.255.248
set vargw=68.23.41.1
set vardns1=68.23.41.1
set vardns2=68.23.41.2

REM ***** You don’t need to change anything below this line! ******

ECHO Setting IP Address and Subnet Mask
netsh int ip set address name = "Local Area Connection" source = static addr = %varip% mask = %varsm%

ECHO Setting Gateway
netsh int ip set address name = "Local Area Connection" gateway = %vargw% gwmetric = 1

ECHO Setting Primary DNS
netsh int ip set dns name = "Local Area Connection" source = static addr = %vardns1%

ECHO Setting Secondary DNS
netsh int ip add dns name = "Local Area Connection" addr = %vardns2%

ECHO Here are the new settings for %computername%:
netsh int ip show config

pause
********************************************************************************

Remove Static IP and change to Dynamic
********************************************************************************
@ECHO OFF

ECHO Setting IP Address and Subnet Mask to Dynamic
netsh int ip set address name = "Local Area Connection" source=dhcp
ECHO Setting DNS Server Address to Dynamic
netsh int ip set dns name = "Local Area Connection" source = dhcp

ECHO Renewing IP Address
ipconfig /renew

pause
********************************************************************************

CHANING DOMAINS

To change the domain, we need to use the netdom.exe, which will get installed along with the Windows XP Support Tools.

To Join to a Domain
********************************************************************************
netdom join %computername% /d:domainName /ud:userName /pd:password /reboot:XX in seconds after which computer reboots
********************************************************************************

To Remove from Domain
********************************************************************************
netdom remove %computername% /d:domainName /ud:userName /pd:password /reboot:XX
********************************************************************************


Installing Netdom.exe

Installation File Name: WindowsXP-KB838079-SupportTools-ENU
Download Location: Download
Command Information: See Here

After installation of the support tools, the netdom.exe will be available in C:\Program Files\Support Tools. Copy this file into the location where you will be running the batch file.