Nov 18, 2010

What is svchost.exe service And Why Is It Running on Windows?

So What Is It?
According to Microsoft: “svchost.exe is a generic host process name for services that run from dynamic-link libraries”. Could we have that in english please?
Some time ago, Microsoft started moving all of the functionality from internal Windows services into .dll files instead of .exe files. From a programming perspective this makes more sense for reusability… but the problem is that you can’t launch a .dll file directly from Windows, it has to be loaded up from a running executable (.exe). Thus the svchost.exe process was born.


Why Are There So Many svchost.exes Running?
If you’ve ever taken a look at the Services section in control panel you might notice that there are a Lot of services required by Windows. If every single service ran under a single svchost.exe instance, a failure in one might bring down all of Windows… so they are separated out.
Those services are organized into logical groups, and then a single svchost.exe instance is created for each group. For instance, one svchost.exe instance runs the 3 services related to the firewall. Another svchost.exe instance might run all the services related to the user interface, and so on.

So What Can I Do About It?
You can trim down unneeded services by disabling or stopping the services that don’t absolutely need to be running. Additionally, if you are noticing very heavy CPU usage on a single svchost.exe instance you can restart the services running under that instance.
The biggest problem is identifying what services are being run on a particular svchost.exe instance… we’ll cover that below.
If you are curious what we’re talking about, just open up Task Manager and check the “Show processes from all users” box:

Guide to Using Check Disk in Windows 7 or Vista

image
Anytime somebody has hard drive errors, I always recommend that they run chkdsk—what geek wouldn’t? Here’s a full guide to using the Check Disk feature built into every version of Windows.
The chkdsk or “Check Disk” utility is used in Windows to scan through your entire hard drive and find problems… it’s like a lot like doing inventory… it’s boring, but it has to be done sometimes. I recommend that you run through a check disk every month or two.
Image by Nemo

Using CheckDisk the GUI Way

Open up Computer and then right-click on the drive you want to check, and choose Properties, or just click the drive, and then click the Properties button.

Then select the Tools tab, and click the “Check Now” button.
image
A little dialog will pop up to allow you to choose the options you want for the disk check. You should check both options if you want to really check the disk properly, but if you just want to do a quick check you could select only the first one.

Nov 13, 2010

How to remote your PC from anywhere


Ever been at a friend's house and wanted to show off a photo you left saved on your home computer? Ever wanted to check from the office that your daughter's doing homework and not instant messaging with friends at home? Ever need to grab a file on your home hard drive when you're miles away? An age-old protocol called VNC and some free software lets you control your home computer from anywhere.
In this tutorial, we'll set up a VNC (Virtual Network Computing) server on your home computer, which will let you connect to your desktop and drive it from any Internet-connected computer.

Notes and warnings: Running a server and opening up a port on your home computer to the Internet is a risky undertaking. Make sure your computer has all the latest security patches, has been checked for spyware and viruses and that you're using strong passwords. The VNC protocol is not inherently secure. This how-to assumes you're comfortable with basic networking concepts. If you're scared off by the fine print, check out an easier alternative [1] to VNC. Still with me? Read on.


The Virtual Network Computing (VNC) protocol remotely controls another computer over a network. Think of it as a window into your home computer's desktop from any other computer. Your key presses and mouse clicks get transferred over the network and happen on the remote computer in real time, and anyone at the remote computer can watch the action as it happens.
A few things you can do with a VNC server running at home:
  • Start a downloading a large file, like a movie, in the morning so it's there when you get home in the evening
  • Search your home computer's IM logs, address book or file system for important information
  • Help Mom figure out why Microsoft Word doesn't start without having to go to her house (even though Mom would like to see you more often)
  • Control a headless (monitor-less) machine like a media center or file server in another room in the house from the laptop on the couch
VNC requires two components for a successful connection: the server on your home computer, and the viewer on the remote computer. Let's set up each component to get going. Here's how.

Step 1. Install the VNC server.

Windows users: TightVNC is free Windows VNC server and client software. TightVNC is a nice choice because it also allows for file transfers and high compression levels for slow connections. Download TightVNC from here and run the installation on your home computer. Start the server, and set a password for incoming connections.

TightVNC can be set to run as a Windows service, which means your Windows usernames and passwords can be used to authenticate on the VNC server connection. Be sure all your Windows passwords are set and strong, and that any passwordless guest accounts are disabled.
Mac users: OSXvnc is a free Mac VNC server. Download, install, set up a password and start the server.
If your VNC server is connected directly to the Internet, it is now listening for Internet requests [2] on port 5900, VNC's default port (which is also configurable). Visit WhatIsMyIP from your home computer to determine its IP address and write it down.
 
Step 2. Install the VNC client.
On the remote Windows computer, also download and install TightVNC, but this time, start the viewer, NOT the server. If you're on a Mac, download the free Chicken of the VNC Mac viewer to connect to your home PC. Enter your home computer's IP address [3] and password to connect.
Here's a screengrab of a VNC connection to my Windows PC from my Mac. Click on the image to see a larger version.




And that's that! You're virtually sitting at your home desktop from anywhere in the world.
A few extra VNC tips to chew on:
  • For slower network connections, set the compression to "best." The window image quality will be lower, but the connection response will be snappier.
  • Bring a VNC viewer with you on a USB memory stick so you don't have to download and install on every computer you want to use to connect to your server.
  • Avoid having to install a server on Mom's computer; email her the 166K self-extracting SingleClick UltraVNC server for your next tech support phone session. More on SingleClick in an upcoming Lifehacker feature.


FOOTNOTES:
[1] LogMeIn is a web-based application that also provides this remote desktop control and may be a better option for some folks. I prefer VNC because it's more of a challenge and doesn't require third party intervention. [back to top]
[2] If your home computer is behind a home network router with a firewall, remote computers will not be able to connect. You must open up a port on your router's firewall and forward requests to it to your computer, a how-to that's beyond the scope of this article but will be covered in an upcoming Lifehacker feature is covered in the Lifehacker feature How to access a home server behind a firewall. [back to top]
[3] Alternately, you can enter your home computer's domain name. For more information on setting that up, see previous Lifehacker feature Assign a domain name to your home server. This way, when connecting using the VNC viewer, you can enter an address like mycomputer.dyndns.org instead of an IP address. [back to top]

by Gina Trapani is the editor of Lifehacker. Her special feature Geek to Live appears every Wednesday and Friday on Lifehacker.

Nov 10, 2010

How a Web Browser Works? (ilustration by comic)

Comic strip depicting how a browser works.


How to create Free Proxy Server with Google App Engine

Google Proxy
A simple Google search and you’ll find dozens of really good PHP scripts on the Internet to help you create proxy servers in minutes for free. The only limitation with PHP based proxies is that you require a web server to host the proxy scripts and second, you also need a domain name to act as an address for your proxy site.
If you don’t own a domain or server space, you can still create a personal proxy server for free and that too without requiring any technical knowledge.

How to get a list of SQL Server tables and their row counts

Obvious methods

The most straightforward method for determining the number of rows in a table, is to use the following:

SELECT COUNT(*) FROM tablename

You can also use the system stored procedure, sp_spaceused, to determine other information, such as data and index size:

EXEC sp_spaceused 'tablename'

To get an *approximate* count for all tables, you can use the following:

Ask.com, The End of an Era for Search

Today marks the end of Ask.com as a search engine, the search giant will lay off once powerful the vast majority of its engineers and to grant a small piece of the search market from Google and Microsoft.
Ask.com, formerly known as Ask Jeeves, was once one of the search engines the world's most recognizable. It launched in 1996 and quickly gained popularity with its emphasis on natural language queries, in addition to keyword searching. At its peak, Ask.com has taken care of 2 million queries per day. Its mascot, Jeeves the butler, was well known by millions of people.