UnixServerAdmin

Server Administration & Management

test ping.bat

: loop 0
ping -n 10 8.8.8.8

IF  %ERRORLEVEL%==0   ( goto loop 1 )

start c:1.mp3
ping -n 13 localhost > NUL

: loop 1
ping -n 5 192.168.1.1

IF  %ERRORLEVEL%==0   ( goto loop 0 )

start c:1.mp3
ping -n 13 localhost > NUL  ( goto loop 0 )

 

Note:- 8.8.8.8 to check Internet Connectivity & 192.168.1.1 to check Gateway Connectivity and 01.mp3 is siren ring.

Advertisements

April 20, 2014 Posted by | Tips & Tricks, Windows | , , | Leave a comment

How to Remove Windows is not genuine Notification in Windows Se7en

Sometimes when we buy Windows 7 CD/DVD from the market, if it is pirated, So after installation we will get error message like windows is not genuine as shown below. So we can remove this notification follow the below mentioned steps :-1

Step:1 – Open the command prompt as Administrator.

Step:2 – In the Command prompt type the command “SLMGR -REARM” and hit enter.

Step:3 – When we press enter, it will start executing the above command and below window will appear .

Step:4 – Now reboot your Machine and now onwards you will not get message like “Windows 7 build 7600 This copy of windows is not genuine”.

September 30, 2013 Posted by | Windows | | Leave a comment

How to fix “Fatal Error C0000034…” Error during installation of Windows Se7en SP1

When applying SP1 for windows se7en there is a specific error that can happen during reboot. If you get this error “Fatal Error C0000034 Applying Update Operation 282 of…”, follow the steps below to fix the SP1 installation :-

1. Reboot your computer while it’s starting up.

2. When your computer starts up again, choose the option “Launch Startup Repair

If you do not have this module installed in the OS, you’ll need a Win7 install disc that is the same architecture (i.e. 32 or 64-bit) as the OS installed. Just boot to the CD and go from there.

3. When the Startup repair starts, click cancel.

4. After you click cancel it will show a box. Click “Don’t Send”, then click the link “View advanced options for recovery and support

5. In the new window click Command Prompt at the bottom.

6. In Command Prompt type this and press enter: %windir%\system32\notepad.exe

7. Notepad will open. In notepad go to File–>Open.

8. Change the type of files notepad views from .txt to All Files

9. Now in Notepad, go to C:\Windows\winsxs\ (or whichever drive Windows is installed on)

10. In that folder, find pending.xml and make a copy of it as pending_bak.xml

Just copy and paste it in the same folder, this is just in case something happens to the original so you don’t lose it.

11. Now open the original pending.xml

It will usually take a while to load because it’s a huge file.

12. Press CTRL+F and search for the following exactly: 0000000000000000.cdf-ms

That’s sixteen (16) zeroes ;)

13. Delete the following text (yours may be a little different):

<Checkpoint/>
<DeleteFile path=”\SystemRoot\WinSxS\FileMaps\_0000000000000000.cdf-ms”/>
<MoveFile source=”\SystemRoot\WinSxS\Temp\PendingRenames\
\e56db1db48d4cb0199440000b01de419._0000000000000000.cdf-ms”
destination=”\SystemRoot\WinSxS\FileMa\_0000000000000000.cdf-ms”/>

NOTE :- Your PC might not have all 3 sections of code (<Checkpoint>, <DeleteFile>, <MoveFile>). Just make sure you delete section “Checkpoint” and whatever other sections have “000000000000000.cdf-ms”. They will be right next to each other.

14. Save the file, close notepad, close command prompt, restart your computer.

Conclusion :- Once your computer starts up, do a normal startup (it may stall for 5-10 minutes at the “starting windows” screen, but leave it going) and the Service Pack will install some more stuff and restart a few times and then everything should be working! For some people, it reverts everything and cancels the service pack installation. For other people, the service pack installation completes. Either result is fine, the computer should be functioning normally now without any data loss.

July 16, 2013 Posted by | Windows | , | Leave a comment

shutdown.bat

shutdown -t 120

# Shutdown within 2 Minutes.

June 11, 2013 Posted by | Shell Script, Windows | , | Leave a comment

open-browser.bat

cd c:\
cd Program Files\Internet Explorer
start IEXPLORE.EXE

cd c:\
cd Program Files
cd Mozilla Firefox
start firefox.exe

June 6, 2013 Posted by | Shell Script, Windows | , | Leave a comment

backup_via_system.bat

@echo off

REM ———
REM BACKUP
REM ———
ECHO ——————————————————-
ECHO CLOSE ALL PROGRAMS and APPLICATIONS NOW!!
ECHO ——————————————————-
ECHO.
ECHO Your hard drive is about to be searched for Documents,
ECHO Databases, Spreadsheets, and Email storage files.
ECHO.
ECHO All files of these types will be saved to
ECHO your REMOVABLE DEVICE in their original
ECHO directories\folders.
ECHO.
ECHO This will replace any previous backup on the
ECHO removable drive.
ECHO.

pause

echo %computername%
cd c:\
set mm=%date:~4,2%
set dd=%date:~7,2%
set yy=%date:~10,4%
mkdir e:\datasrv\%dd%-%mm%-%yy%
xcopy d:\datasrv\* e:\datasrv\%dd%-%mm%-%yy% /e /s /y

June 1, 2013 Posted by | Shell Script, Windows | , | 2 Comments

backup_via_network.bat

@echo off

REM ———
REM BACKUP
REM ———
ECHO ——————————————————-
ECHO CLOSE ALL PROGRAMS and APPLICATIONS NOW!!
ECHO ——————————————————-
ECHO.
ECHO Your hard drive is about to be searched for Documents,
ECHO Databases, Spreadsheets, and Email storage files.
ECHO.
ECHO All files of these types will be saved to
ECHO your REMOVABLE DEVICE in their original
ECHO directories\folders.
ECHO.
ECHO This will replace any previous backup on the
ECHO removable drive.
ECHO.

pause

set mm=%date:~4,2%
set dd=%date:~7,2%
set yy=%date:~10,4%
net use \\192.168.1.2
md \\192.168.0.2\backup\%mm%-%dd%-%yy%
xcopy c:\backup\data\* \\backup\datasrv\%mm%-%dd%-%yy% /e

May 27, 2013 Posted by | Shell Script, Windows | , | Leave a comment

backup_via_date.bat

cd c:\
set mm=%date:~4,2%
set dd=%date:~7,2%
set yy=%date:~10,4%
md e:\backup\%mm%-%dd%-%yy%
xcopy c:\backup\* e:\backup\%mm%-%dd%-%yy% /E /F /H

May 22, 2013 Posted by | Shell Script, Windows | , | Leave a comment

backup_all_drive.bat

set mm=%date:~4,2%
set dd=%date:~7,2%
set yy=%date:~10,4%
md e:\backup\%mm%-%dd%-%yy%
xcopy c:\backup\data\*   e:\backup\%mm%-%dd%-%yy% /e

May 17, 2013 Posted by | Shell Script, Windows | , | Leave a comment

Remote Desktop Connection Default Session Command

When I connect from Windows 7 PC to our Windows 2003 server using Remote Desktop Connection, RDC connect me to a different session. But I need to connect to the default admin session when I log in to the server physically because if I connect to a different session I could
not access my software agents that are already running and I cannot run two agents at the same time.

To overcome this issue I used the following command

mstsc /admin
or
mstsc /v:IP /admin

where IP is Windows servers IP.

September 19, 2012 Posted by | Windows | | Leave a comment

How to activate Windows Server 2008 R2 Evaluation

Use Windows Server 2008 R2 Editions 180day Evaluation Key

Windows Web Server 2008 R2 = KBV3Q-DJ8W7-VPB64-V88KG-82C49
Windows Server 2008 R2 Standard = 4GGC4-9947F-FWFP3-78P6F-J9HDR
Windows Server 2008 R2 Enterprise = 7PJBC-63K3J-62TTK-XF46D-W3WMD
Windows Server 2008 R2 Datacenter = QX7TD-2CMJR-D7WWY-KVCYC-6D2YT

You can rearm the Evaluation version of Windows Server 2008 R2 up to 5 times.

To check how much rearms you have left click Run in the Start menu, enter slmgr.vbs -dlv and click OK

How to manually rearm the 10 day activation grace period

When the initial 10-day activation period nears its end, you can run the slmgr.vbs script to reset it back to 10 days. To do this, follow these steps:

1. Click Start, and then click Command Prompt.

2. Type slmgr.vbs -dli, and then press ENTER to check the current status of your activation period.

3. Type slmgr.vbs -rearm, and Rearm the Windows.

4. Type slmgr.vbs -dlv, and After restarting your system verify that the rearm has worked by running slmgr.vbs -dli again.
The remaining time should now be reset to 10 days!

5. To reset the activation period, type slmgr.vbs –rearm, and then press ENTER.

6. Restart the computer.

November 10, 2011 Posted by | Windows | , | Leave a comment

How To Disable Control Panel in Windows Se7en

If you have a shared computer that your family and friends can access, you might not want them to mess around in the Control Panel, and luckily with a simple tweak you can disable it.

Disable Control Panel with Group Policy

Note: This process uses Local Group Policy Editor which is not available in Home versions of Windows 7. Skip down below for the registry hack version that works on Home editions as well.

1. First type gpedit.msc into the Search box in the Start menu and hit Enter.

2. When Local Group Policy Editor opens, navigate to User Configuration Administrative Templates then select Control Panel in the left Column. In the right column double-click onProhibit access to the Control Panel.

3. In the next window, select Enable, click OK, then close out of Local Group Policy Editor.

4. After the Control Panel is disabled, you’ll notice it’s no longer listed in the Start Menu.

5. If the user tries to type Control Panel into the Search box in the Start menu, they will get the following message indicating it’s restricted.

Disable Control Panel with a Registry Tweak

1. You can also tweak the Registry to disable Control Panel. This will work with all versions of Windows 7, Vista, and XP. Making changes in the Registry is not recommended for beginners and you should create a Restore Point, or backup the Registry before making any changes.

2. Type regedit into the Search box in the Start menu and hit Enter.

3. In Registry Editor navigate to

HKEY_CURRENT_USER –> Software –> Microsoft –> Windows –> Current Version –> Policies –> Explorer

Then right-click in the right pane and create a new DWORD (32-bit) Value.

4. Name the value NoControlPanel. Then right-click on the new Value and click Modify…

5. In the Value data field change the value to “1” then click OK. Close out of Registry Editor and restart the machine to complete the process.

6. When you get back from reboot, you’ll notice Control Panel is no longer listed in the Start menu.

7. If a user tries to access it by typing Control Panel into the Search box in the Start menu.

8. If you want to re-enable the Control Panel, go back into the Registry and change theNoControlPanel value back to “0” then reboot the computer.

9. This comes in handy if you have inexperienced users working on your machine and don’t want them messing with Control Panel settings.

July 19, 2011 Posted by | Windows | , | Leave a comment

How to uninstall MSDN Visual Studio

Next Step: Uninstall additional components

Additional components might have been installed on your computer by Visual Studio during setup. These components must be manually uninstalled using Add or Remove Programs in the order listed below.

Note: Uninstalling these components might affect other applications you have installed that rely on these components.

The following components might have been installed with Visual Studio:

1.    Microsoft MSDN 2005 Express Edition
2.    Microsoft Visual Studio 2005 Tools for Office Run-time Language Pack
3.    Microsoft Visual Studio 2005 Tools for Office Run-time
4.    Microsoft Device Emulator version 1.0
5.    Microsoft .NET Compact Framework 1.0
6.    Microsoft .NET Compact Framework 2.0
7.    Microsoft SQL Mobile 2005 Development Tools
8.    Microsoft Visual J# 2.0 Redistributable Package
9.    Microsoft Visual J# 2.0 Redistributable Language Pack
10.    Microsoft Document Explorer 2005
11.    Microsoft Document Explorer 2005 Language Pack
12.    Microsoft Data Access Components 2.8 SP1 (Windows 2000 only)

Uninstall is complete.

Next Step: Uninstall additional components

Additional components might have been installed on your computer by Visual Studio during setup. These components must be manually uninstalled using Add or Remove Programs in the order listed below.

Note: Uninstalling these components might affect other applications you have installed that rely on these components.

The following components might have been installed with Visual Studio:

1.    Microsoft MSDN 2005 Express Edition
2.    Microsoft Visual Studio 2005 Tools for Office Runtime Language Pack
3.    Microsoft Visual Studio 2005 Tools for Office Runtime
4.    Microsoft Device Emulator version 1.0
5.    Microsoft .NET Compact Framework 1.0
6.    Microsoft .NET Compact Framework 2.0
7.    Microsoft SQL Mobile 2005 Development Tools
8.    Microsoft Visual J# 2.0 Redistributable Package
9.    Microsoft Visual J# 2.0 Redistributable Language Pack
10.    Microsoft Document Explorer 2005
11.    Microsoft Document Explorer 2005 Language Pack
12.    Microsoft Data Access Components 2.8 SP1 (Only on Windows 2000)
13.    Microsoft Visual Studio 2005 64bit Prerequisites (Only on 64bit)
14.    Microsoft .NET Framework 2.0 SDK (x64) (Only on 64bit)
15.    Microsoft Visual Studio 2005 Remote Debugger (x64) (Only on 64bit)
16.    Microsoft Visual Studio 2005 Remote Debugger Light (x64) (Only on 64bit)

The following components might have been installed with SQL Server Express, and need to be removed in the order listed below:

Note: Uninstall of the SQL Express instances will leave behind the user-created databases, which can then be re-attached to the new instance.

17.    Microsoft SQL Server 2005 Express CTP
18.    Microsoft SQL Server 2005 Express Tools CTP
19.    Microsoft SQL Server Setup Support Files
20.    Microsoft SQL Native Client

The following components must be uninstalled last:

21.    MSXML 6.0 Parser and SDK (only on 32bit)
22.    MSXML 6.0 Parser and SDK x64 (Only on 64bit)
23.    Microsoft .NET Framework 2.0 Language Pack
24.    Microsoft .NET Framework 2.0

July 18, 2011 Posted by | Windows | , | Leave a comment

MSDN Visual Studio just in time debugger unhandled win32 exception occurred

Method – 1

1. Install Internet Explorer 7.0 instead of  Internet Explorer 6.0

2. Restart the PC.

Method – 2

1. Start –> Run –> regedit –> OK

2. After Visual Studio is installed on a server, the default behavior when an unhandled exception occurs is to show an Exception dialog that requires user intervention to either start Just-In-Time debugging or ignore the exception. This may be undesirable for unattended operation.

3. To configure the server to no longer show a dialog when an unhandled exception occurs (the default behavior prior to installing Visual Studio), use the registry editor to delete the following registry keys:

HKEY_LOCAL_MACHINE –> SOFTWARE –> Microsoft –> Windows NT –> CurrentVersion –> AeDebug –> Debugger

HKEY_LOCAL_MACHINE –> SOFTWARE –> Microsoft –> .NETFramework –> DbgManagedDebugger

detect this value and restart…….debugger error will not seen….

July 17, 2011 Posted by | Windows | | 1 Comment

How to configure Windows Server 2003 to display a message when users log on

You can configure Windows Server to display a message to users when they log on. You can use the message display functionality to personalize the logon process, provide news or information, and for other similar purposes. The message appears after the user presses CTRL+ALT+DEL and disappears after the user clicks OK. After the message disappears, the user can complete the logon process.

How to Use a Group Policy Setting to Turn On the Message Display

To configure Windows Server to display a message, you can either use a Group Policy setting to configure a domain, an organizational unit, or a computer or you can use Registry Editor to modify the registry on the target computers.

Configuring a Group Policy Setting for a Domain

1) On the domain controller, start the Active Directory Users and Computers snap-in.
2) Right-click the domain objects in the left pane, and then click Properties.
3) Click the Group Policy tab.
4) Click Default Domain Policy, and then click Edit.
5) Expand the following folder:

Configuration –> Windows Settings –> Security Settings –> Local Policies –> Security Options

6) In the right pane, double-click Policies, and then follow these steps to create the message text:

6.1) On a Windows Server 2003-based domain controller:
6.1.1) Click Interactive logon: Message title for users attempting to log on, and then type the text that you want to appear in the title bar of the message dialog box.
6.1.2) Click Interactive logon: Message text for users attempting to log on, and then type the text of the message that you want to appear in the message dialog box.

6.2) On a Windows 2000-based domain controller:
6.2.1) Click Message title for users attempting to log on, and then type the text that you want to appear in the title bar of the message dialog box.
6.2.2) Click Message text for users attempting to log on, and then type the text of the message that you want to appear in the message dialog box.

Configuring a Group Policy Setting for an Organizational Unit

1) On the domain controller, start the Active Directory Users and Computers snap-in.
2) Right-click the organizational units object in the left pane, and then click Properties.
3) Click the Group Policy tab, and then click New.
4) Type a name for the Group Policy object (GPO), and then press ENTER.
5) Click Edit.
6) Expand to the following folder:

Computer Configuration –> Windows Settings –> Security Settings –> Local Policies –> Security Options

7) In the right pane, double-click Policies, and then follow these steps to create the message text:

7.1) On a Windows Server 2003-based domain controller:
7.1.1) Click Interactive logon: Message title for users attempting to log on, and then type the text that you want to appear in the title bar of the message dialog box.
7.1.2) Click Interactive logon: Message text for users attempting to log on, and then type the text of the message that you want to appear in the message dialog box.

7.2) On a Windows 2000-based domain controller:
7.2.1) Click Message title for users attempting to log on, and then type the text that you want to appear in the title bar of the message dialog box.
7.2.2) Click Message text for users attempting to log on, and then type the text of the message that you want to appear in the message dialog box.

Configuring a Group Policy Setting for Windows XP

1) Click Start, click Control Panel, click Performance and Maintenance, and then click Administrative Tools.
2) Double-click Local Security Policy.
3) In the left pane, expand Local Policies, and then click Security Options.
4) In the right pane, click Interactive logon: Message title for users attempting to log on, and then type the text that you want to appear in the title bar of the message dialog box.
5) In the right pane, click Interactive logon: Message text for users attempting to log on, and then type the text of the message that you want to appear in the message dialog box.

Configuring the Group Policy Setting by Using Registry Editor

1) Click Start, click Run, type regedit, and then click OK.
2) Locate and then click the following registry key:

HKEY_LOCAL_MACHINE –> Software –> Microsoft –> Windows –> CurrentVersion –> policies –> system

3) In the right pane, double-click legalnoticecaption, and then type the text that you want to appear in the title bar of the message dialog box.
4) In the right pane, double-click legalnoticetext, and then type the text that you want to appear in the message dialog box.
5) Close Registry Editor.

Troubleshooting

If you use a Group Policy setting to configure Windows Server to display a message when users log on, the operating system writes the registry changes that are described in the preceding section. However, the same registry values appear in the following registry key:

HKEY_LOCAL_MACHINE –> Software –> Microsoft –> Windows NT –> CurrentVersion –> Winlogon

You can set the registry values described in the preceding section to this key to get the same results as if you configured a Group Policy setting. However, if you set the registry values in both registry keys, the values in the following registry key take precedence:

HKEY_LOCAL_MACHINE –> Software –> Microsoft –> Windows –> CurrentVersion –> policies –> system

Note If you do not use carriage returns in your display message, the maximum number of characters that you can add to the logon box is 512. If you add carriage returns, you can add up to 2048 characters (512 characters per line).

July 16, 2011 Posted by | Windows | , | Leave a comment

Add Administrator Account to Log In Screen

When Windows XP is first installed it requires you to enter at least one name of a user who will access the computer. Once you create this name the default Administrator account vanishes. To access it, press Ctrl-Alt-Delete twice at the Welcome screen to retrieve the standard Windows 2000 logon dialog. Log on as Administrator from this point. To log the Administrator off, click [Start] [Log Off] and [Log Off] when the [Log Off Windows] selection box appears. The Log On screen with the available users will be displayed.

To Make the Administrator Account Always Visible on the Login Screen

Start –> Run –> Regedit –> Registry Key

HKEY_LOCALMACHINE –> SOFTWARE –> Microsoft –> Windows NT –> CurrentVersion –> Winlogon –> SpecialAccounts –> UserList –> Modify/Create the Value Data Type(s) and Value Name(s) as detailed below

Data Type: DWORD// Value Name: Administrator
Setting for Value Data: [0 = Disabled / 1 = Enabled]
Exit Registry and Reboot

July 14, 2011 Posted by | Windows | | Leave a comment

How to speed up Windows Se7en booting

Here are some tricks you can use to speed up the boot time of Windows 7. From the start menu, run msconfig and then select the Boot tab. You can then do the following:

1) Check the box next to No GUI boot.

2) Set the Timeout value to 0.

3) Click the Advanced Options… button. Then check the box next to Number of processors and underneath this, select the actual number of processors that your computer has.

Click OK then click OK again to save your changes. Time your boot speed before and after your making these changes, you’ll see it get faster.

July 13, 2011 Posted by | Windows | , | Leave a comment

How to speed up Windows Se7en Thumbnails

In Windows 7 the thumbnail previews that show up in the taskbar have about a 1/2 second delay before they are shown. If you want them to show up quicker, you can configure this with a registry edit.

1. Open the registry editor (Start –> Search, then type in regedit and hit Enter).

2. Once regedit is running, in the left pane navigate to HKEY_CURRENT_USER –> Control Panel –> Mouse.

3. In the right pane, double click on MouseHoverTime to change the value (which should be 400 by default).

4. Enter a new value. The value you enter is the delay, in milliseconds. Do not enter 0 as some people reported odd behavior when they do this. If you want the thumbnails to show up instantly, enter a value like ’10 or so.

Once your edit is done, close the registry editor. You’ll then need to reboot your machine for the changes to take effect.

July 12, 2011 Posted by | Windows | , | Leave a comment

Show hidden folders are not shown even after check the options has hide folders

Do change in registry

1. HKEY_Local Machine –> Software –> Microsoft –> Windows –> Current Version –> Explorer –> advance –> folder –> Hidden –> showall

change checked value to 1

2. HKEY_current User –> Software –> Microsoft –> Windows –> Current Version –> Explorer –> advance 

change hidden to 1

July 11, 2011 Posted by | Windows | | Leave a comment

Permission to Add a Workstation/Server on Domain

By default authenticated user can add 10 Pc on network, to remove this setting may be change in

Start  –> program –> administrative tools –> domain security policy –> security settings –> local policies –> use right assignment –> add workstation to diomain.

Start –> program –> administrative tools –> domain controller –> security policy –> security setting –> local policies –> user right assignment –> add workstaion to domain

July 10, 2011 Posted by | Windows | | Leave a comment