Archive

Archive for the ‘Windows 7’ Category

Windows 7: Unveil hidden themes

Windows 7 comes with a few default themes which you can view from “Control Panel” -> “Appearance and Personalization” -> “Change the theme”. While exploring something today, I came across a hidden location where a few more window 7 themes are available.

To access the location, go to start -> Run and type “c:\Windows\Globalization\mct”. This lists the folders and here you can see the themes for “AU – Australia”, “CA- Canada”, “US – United States”, “GB – United Kingdom”,  and “ZA – South Africa”. Out of these we generally see United Stated theme only in control panel. This is because of most of us select Country/language as US during the installation. If we choose some other country during the installation, the respective theme will get added.

If you like any theme in these hidden ones, just go to that folder and execute the file inside themes folder to install and activate it. I liked ZA theme among them :-)

 

Command line to disable network connection in windows 2008/Windows 7

July 11, 2011 1 comment

I inspired from my previous post,  and decide to do some network interface related operations from command line as they helps me when managing Windows 2008 Core Operating system. Another command that I am going to provide now is to disable network connection from command line.

netsh interface set interface name=”Local Area Connection 1″ admin=DISABLED

In about command, “Local Area Connection 1″ is the name of the connection that you want to disable. You can change the value of “Admin” to “Enable” to enable back the network connection. Similarly, if you want to rename the network connection, you can use newname parameter. Below is the command.

netsh interface set interface name=”Local Area Connection 1″ newname=”My NIC1″

Above command renames “Local Area Connection 1″ network to “My NIC1″.

Hope this helps…

Disable Windows firewall from command line

When you are working on Windows 2008 core, you get requirement to disable firewall functionality to allow all programs communication. The default firewall settings blocks most of the ports(including remote management) and administrator has to explicitly open them on need basis. The default Core console allows you to perform only few network operations like listing and assigning IP address, but if you want to perform advanced operations like disabling firewall functionality in all profiles(see my post http://techibee.com/windows-2008/what-is-domain-public-and-private-profiles-in-windows-2008-firewall/478 for different profiles in 2008 firewall), you need to rely on some command line options.

Netsh is one of the very useful command line utilities in windows environment. Now in this post, I will show you how to disable firewall profiles(Private, public, domain) on a windows 2008 Core. You need this command in Server Core environment because, you cannot manage firewall remotely as there is a provision and you can not manage it from local host as core supports no GUI. Only option is command line utility.

Now, let us see how we can disable firewall functionality from all profiles

netsh advfirewall set allprofiles state off

If you want to turn off the firewall for individual  profiles use the below commands

netsh advfirewall set domainprofile state off

netsh advfirewall set privateprofile state off

netsh advfirewall set publicprofile state off

You can turn on firewall back by simply replacing “off” with “on” in above commands.

Netsh utility allows us to perform more set of operations on different components of operating system. You can explore the help(netsh /?) to lean about it further.

You can also download a NetSH Technical reference guide from MS website. Refer to http://techibee.com/general/download-netsh-technical-reference-for-windows-2008windows-7/494 for more details.

Hope this helps.

Wake on LAN is not working in Windows 7 — Found the solution

I have been struggling for a while to identify why Wake On LAN is not working since I installed Windows 7 on my computer. It worked fine with Windows XP but after moving to windows 7, it never worked. After lot of testing and trying various things, I finally reached the solution.

So, here you go…

There is something called PME(Power Management Event) in Network connection properties which should be in enabled state to make your Windows 7 computer process the magic packets to wake up your computer.

To enable PME, follow the below steps.

  •  Go to Start -> Run -> Type “ncpa.cpl” and click OK
  • This opens up the network connections available in the computer. Here identify the NIC on which your computer will receive magic packets and go the properties of it.

  • Click on Configure and Switch to advanced tab and select “Enable PME” property list and change the value to “Enable”

  • Click on OK to complete the configuration.

This will make your network connection to blip briefly. Once your network connection is back your computer is ready to process the WOL packets. Shutdown your computer and try sending magic packet again. It should work without any issues.

Relavant articles:

http://www.intel.com/support/network/sb/cs-008459.htm

Feel free to post any questions that you have about WOL in windows.

Categories: Windows 7 Tags:

Disable TCP/IP “Auto Tuning” in windows 7/vista/windows 2008 R2

April 13, 2011 2 comments

Since last one and half year, I have been working on Windows 7 Operating system and in my experience “Auto Tuning” in windows 7/vista/windows 2008 R2 is the most possible culprit for any network related problems. If you see a network related problem in these operating systems and cannot determine what is the cause, I suggest you try disabling “auto tuning” first.

I know that “auto tuning” is one of the features introduced with windows 7/vista to improve OS operations on network. Basically what it does is, it adjusts the TCP window size to improve the network operations. Though it sounds good in theory, I have seen numerous amount of posts over internet where disabling “auto tuning” addressed many issues like, slow data copy, slowness in email delivery, slow outlook mail caching times, and a few application data transfer related issues. Most of these issues you will see when performing the transfer operations over a WAN link.

So, considering above all, I would like to share the procedure for disabling/enabling “Auto Tuning” in windows 7 environment which may come handy for you in troubleshooting network related issues…

Procedure:

  1. Open Command prompt with elevated rights
  2. Run the command netsh interface tcp set global autotuning=disabled
  3. This disables the auto tuning
  4. Similar to enable auto tuning back, use the command netsh interface tcp set global autotuningl=normal

 If you want to see the current status of auto tuning, use netsh interface tcp show global

Hope this helps you.

Categories: Windows 7 Tags: ,

Block installation of Windows 7/Windows 2008 R2 Service Pack 1

Microsoft has released a tool which helps you in blocking the installation of Windows 7/Windows 2008 R2 Service Pack 1 through windows Updates. You can download it from here.

This download contains three files.

1. SPBlockingTool.exe — A microsoft executable

2. SPReg.bat  –  A batch script

3. NoSPUpdate.ADM — A ADM file to use with GPOs

The installation of service pack 1 through Windows Update can be stopped with one of the above above given tools. If you plan to use the executable, you need to pass /B switch to it to block the installation and /U switch to unblock the installation. Similar functionality can be achieved with BAT script also. It helps you to run against remote system as well. Third approach is using the ADM file in your Group Policies. This GPO procedure is very straight forward and like using any other ADM file.

Irrespective of approach you use, it creates a key value name “DoNotAllowSP” and sets it to “1” under HKLMSoftwarePoliciesMicrosoftWindowsWindowsUpdate registry key to block the installation. It deletes this newly created key when you instruct it to unblock the installation restriction.

Hope this helps you.

Categories: Tips, Windows 2008, Windows 7 Tags:

Take easy screen shots using snipping tool in windows 7

Till windows XP, taking a screenshot of active windows or a selected area is more than an easy task. You need to be familiar and always remember the key selection(Ctrl+PrintScn) to do that. These headaches are gone with windows 7.

To capture a screenshot in windows 7, follow the below steps.

  1. Get the required screen to top of all windows — essential for any screen capture mechanism :-)
  2. Go to START -> RUN -> type “SnippingTool.exe”
  3. This will gray out your screen and launch the tool.
  4. Select the screen area that you want to screen shot and at the end of selection it will automatically converted to a image file and prompts you for saving.
  5. Before you save, it allows you to make any modifications to it if you want — like pointing some item etc.

I assume you felt this very easy. You can read more about this at http://windows.microsoft.com/en-IN/windows7/products/features/snipping-tool.

Categories: Tips, Windows 7 Tags:

Disconnect Wireless network command line

November 4, 2010 2 comments

I troubleshooted a peculiar problem today and to implement a workaround for that issue, I have to disconnect wireless at the time of logoff. I did some search in google and the below command helped me.

netsh wlan disconnect

Btw, this command is Vista/Windows 7 compatible. I am not sure about other operating systems. I did some more research and came across bunch of commands using which we can manage wireless on windows 7 computers very easily.

Refer to this Microsoft Document to know the commands.

Happy learning and happy Diwali.

Categories: Tips, Windows 7 Tags: ,

How to get Pop up message box using Powershell

October 19, 2010 3 comments

AFAIK, there are two ways available to generate a Pop-up message box using powershell.

Simple way:-

In this powershell relies on a method which is available in windows shell object(WSH). In this you can control four factors, “Message box title”, “Message”, “timeout for message box”, “box type”.

Below is a simple example.

$a = new-object -comobject wscript.shell
$b = $a.popup(“This is a test message from http://Techibee.com “,0,”Test message from techibee”,1)

Second and effective method:-

In this we can make use of dotnet windows forms to generate the pop-up message boxes. Though code looks bit heavy it works very well and has lot of flexibility.

[System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)
[Windows.Forms.MessageBox]::Show(“Test message from Techibee.com!. Subscribe to news letters, RSS feeds at http://techibee.com to stay tuned”, “PowerShellScripts.blogspot.com”, [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)

Categories: PowerShell, Windows 7 Tags:

Query for error events in Event log using PowerShell

PowerShell has a built in cmdlet(Get-Eventlog) which directly interacts with Event Viewer. You can query the data in the way you want using this cmdlet. Below are some of the examples…

Get-Eventlog -logName System

This queries all events in System event.

Get-EventLog -LogName System | ? {$_.Entrytype -match “error” }

This queries all error events in System event viewer.

$fromtime = (get-date).Adddays(-1)

Get-EventLog -LogName System | ? {$_.Entrytype -match “error” -and $_.timegenerated -gt $fromtime }

This queries all error events in last one day. You can similarly use the methods of (get-date) to query events in last few seconds, minutes, hours, days, etc.