Tuesday, July 30, 2013

10 Useful Windows Commands You Should Know

windows-8-command-prompt

There are some things you can only do from the command line, even on Windows. Some of these tools don’t have graphical equivalents, while others are just plain faster to use than their graphical interfaces.
We can’t possibly cover all the useful commands you can use in the Command Prompt or PowerShell here. We’ll be focusing on commands that should be useful even if you’re not a command-line person.

ipconfig – Quickly Find Your IP Address

You can find your IP address from the Control Panel, but this takes quite a few clicks. The ipconfig command is a fast way of determining your computer’s IP address and other information, such as the address of its default gateway — useful if you want to know the IP address of your router’s web interface.
To use the command, just type ipconfig into a Command Prompt window. You’ll see a list of all the network connections your computer is using. Look under Wireless LAN adapter if you’re connected to Wi-Fi or Ethernet adapter Local Area Connection if you’re connected to a wired network.

ipconfig /flushdns – Flush Your DNS Resolver Cache

If you change your DNS server, the effects won’t necessarily take place immediately. Windows uses a cache that remembers DNS responses it’s received, saving time when you access the same addresses again in the future.
To ensure Windows is getting addresses from the new DNS servers instead of using old, cached entries, run the ipconfig /flushdns command after changing your DNS server.

ping, tracert – Troubleshoot Network Connection Issues

If you’re experiencing issues connecting to a website or other network connection issues, Windows and other operating systems have some standard tools you can use to identify problems.
First, there’s the ping command. Type ping google.com and Windows will send packets to Google.com. Google will respond and let you know it’s received them. You’ll be able to see if any packets didn’t make it to Google.com — perhaps you’re experiencing packet loss — and how long it took you to hear back — perhaps the network is saturated and packets are taking a while to reach their destinations.
There’s also the tracert command, which traces the route it takes for a packet to reach a destination. For example, run tracert google.com and you’ll see the path your packet takes to reach Google. If you’re having issues connecting to a website, tracert can show you where the problem is occurring.
For more information about using these commands, read our introduction to troubleshooting Internet connection problems.

shutdown – Create Shutdown Shortcuts on Windows 8

The shutdown command is particularly useful on Windows 8. You can use it to create your own shortcuts and place them on your Start screen or desktop, allowing you to more easily shut down Windows without digging through the charms bar or logging out first.
This command can also be used to restart your computer. On Windows 8, you can even use a special switch to restart your computer into the advanced startup options menu.
  • Shut Down: shutdown /s /t 0
  • Restart: shutdown /r /t 0
  • Restart Into Startup Options: shutdown /r /o

recimg – Create Custom Recovery Images

The Refresh Your PC feature on Windows 8 allows you to restore your computer’s system state to its original state — either from a clean Windows install or as the computer came from its manufacturer. You can create your own custom recovery images, but this feature is hidden — you have to do it with the recimg command from a command line. This allows you to remove manufacturer-installed bloatware or add your favorite desktop programs to your recovery image.
For more information about using recimg, read our overview of everything you need to know about creating and using custom recovery images on Windows 8.

wbadmin start backup – Create System Recovery Images

Windows 8.1 removes the Windows 7 backup interface, which allowed you to create system backup images. These system images contain a complete snapshot of every single file on the system, so they’re different from Windows 8′s recovery images.
While the graphical interface has been removed, system administrators and geeks can still create system image backups by running the wbadmin start backup cmdlet in a PowerShell window. Unlike all the other commands here, this command-line tool must be run from within PowerShell, not the Command Prompt.

sfc /scannow – Scan System Files for Problems

Windows includes a system file checker tool that scans its system files and looks for problems. If system files are missing or corrupted, the system file checker will repair them. This may fix problems with some Windows systems.
To use this tool, open a Command Prompt window as Administrator and run the sfc /scannow command.

telnet – Connect to Telnet Servers

The telnet client isn’t installed by default. You’ll have to install it from the Control Panel. Once installed, you can use the telnet command to connect to telnet servers without installing any third-party software.
You should avoid using telnet if you can help it, but if you’re connected directly to a device and it requires that you use telnet to set something up — well, that’s what you have to do.

cipher – Permanently Delete and Overwrite a Directory

The cipher command is mostly used for managing encryption, but it also has an option that will write garbage data to a drive, clearing its free space and ensuring no deleted file can be recovered. Deleted files normally stick around on disk unless you’re using a solid state drive. The cipher command effectively allows you to “wipe” a drive without installing any third-party tools.
To use the command, specify the drive you want to wipe like so:
ciper /w:C:\

netstat -an – List Network Connections and Ports

The netstat command is particularly useful, displaying all sorts of network statistics when used with its various options. One of the most interesting variants of netstat is netstat -an, which will display a list of all open network connections on their computer, along with the port they’re using and the foreign IP address they’re connected to.

This isn’t a comprehensive list of all the commands you might find useful, but we hope it’s given you some idea of the many powerful tools lurking under the surface. Linux isn’t the only operating system where users can benefit from learning some commands.

How to Send and Receive Faxes Online Without a Fax Machine or Phone Line


fax-and-copier-machine
Some slow-moving businesses and government agencies may not accept documents over email, forcing you to fax them in. If you are forced to send a fax, you can do it from your computer for free.
We’ve previously covered ways to electronically sign documents without printing and scanning them. With this process, you can digitally sign a document and fax it to a business — all on your computer and without any printing required.

How Fax Machines Work (and Why They’re So Inconvenient)

This isn’t as easy as it should be. Fax machines are all connected to the plain old telephone lines. When you use a standard fax machine, that fax machine places a phone call to the number you specify. The fax machine at the destination number answers and the document is transmitted over a telephone call.
This process was invented before the Internet and seems laughably archaic at this point. To perform a fax, a person may type up a document, print it out, and scan it into the fax machine which sends it over the phone line. The person receiving the fax may then scan the faxed document and turn it back into a digital file. They’ve come full circle — the document was sent from one computer to another computer with much additional work and lost image quality.
Ideally, you’d be able to submit a document via email or a more secure online method. Many businesses consider fax a secure method of transmitting documents, but it really isn’t — if someone was snooping on the phone line, they could easily intercept all the faxed documents.
There’s no way to connect to a fax machine directly over the Internet, as the fax machine is only connected to telephone lines. To perform a fax online, we’ll need some sort of gateway that accepts documents via the Internet and transmits the document to a fax machine. That’s where the below services come in. Give them a document and they’ll do the annoying work of dialing up the fax machine and sending your document over the telephone line.

You Could Fax With Just Your Computer, But…

You could skip the below services, of course. Microsoft Windows even contains a Fax and Scan application that allows you to send faxes. The catch is that you’d need your computer connected to the phone line — yes, this means that you’d need a dial-up fax modem. You’d also need a landline telephone connection and you’d have to tell people to stay off the phone when you’re sending faxes, just like in the old dial-up Internet days. Of course, if you were faxing a lot, you could pay for a a dedicated fax telephone line — this might even be necessary if you were receiving a lot of faxes.
This obviously isn’t ideal. Sure, if you need to send quite a few faxes, go ahead and buy a fax machine or modem and hook it up to your landline. But you probably don’t need to send and receive faxes this often — you hopefully just need to send the occasional fax whenever you bump into an organization that’s stuck in the past.

Scan the Document or Use an Existing Digital File

The basic process is simple. First, you’ll need to scan the document you want to fax, just as if you were going to send that document over email. if you don’t have a scanner lying around, you may want to try scanning it with your smartphone. If the document is already a file on your computer, congratulations — you don’t have to scan anything.
With the document now in digital form, you can send it along to a service that will do the annoying fax work for you.

Send Faxes Online, Free

Most online fax services charge money for subscription plans. These only may make sense if you’re a heavy user.
If you do need to send the occasional fax, we recommend HelloFax. It lets you send five free fax pages per month. This doesn’t sound like much, but it’s more pages per month than most people have to fax per year. HelloFax will have you covered in the rare case you need to send a fax.
To send a fax with HelloFax, just create an account on the website, upload the document file you want to fax, and enter the fax number you want to send it to. It’s as simple as sending a fax should be in the first place.
HelloFax also offers a 30-day free trial of their more expensive plans, so you could use the trial if you ever needed to send more pages.
If you need to send more than five faxes per month, try FaxZero. It allows you to send up to five three-page faxes per day, entirely free. You don’t even have to create an account. The downside is that there’s an advertisement on the cover page included with the fax. Depending on who you’re sending the fax to, this may or may not be a problem.

Receiving Faxes

If you do need to receive faxes, you’ll have to sign up for a paid service. The service will need to establish a dedicated phone number for your fax line, and that costs money. HelloFax and many other services will do this if you pay.
Luckily, you should at least be able to get a free trial — HelloFax offers 30 days of free fax receiving, for example.

4 Easy Ways to Remotely Print Over the Network or Internet

network-printer

Remote printing doesn’t have to be hard, whether you want to print to a printer down the hall or half-way around the world. We’ll cover some simple ways you can print without being directly connected to your printer.
We’re going to focus on the easiest options here. We’re won’t cover setting up the Internet Printing Protocol (IPP) or JetDirect and allowing it through your firewall or complicated Windows networking configurations, as these are options best-suited for the IT Professional.

Get a Wireless Printer

Even if you still print, you don’t need a separate printer connected to every computer in your house. Many new printers are network printers that can connect to your network via Wi-Fi. Once connected, you install the appropriate driver software on each computer and all the computers can print to that printer over the network.
Unlike sharing a local printer with Windows, you don’t have to leave the main computer on — as long as the printer is on, you can print directly to it.
These printers only allow you to print to them over the local network, so you’ll need some other tricks if you want to print to them over the Internet.

Share a Printer on Your Local Network

Windows makes it easy to share printers between computers on your local network. This is ideal if you have local printer that connects to your computer via USB. Once you set up printer sharing, the printer will function almost like a networked printer. As long as the computer the printer is connected to is powered on, any other authorized computer on the network can print to it.
The easiest way to do this on Windows 7 or Windows 8 is with the Homegroup feature. Simply set up a Homegroup and check the Printers option to share your connected printers. Join your other computers to the Homegroup and they’ll see the networked printer appear in their list of available printers, assuming the computer sharing the printer is online.
As with standard networked printers, this only works over the local network. You can shareprinters between computers that aren’t on the same Homegroup, but it’s easier to just use a Homegroup.

Access Remote Printers With Google Cloud Print

Google Cloud Print is Google’s remote-printing solution. Many new printers include built-in support for Google Cloud Print. If a printer doesn’t include Cloud Print support, you can make it available via Google Cloud Print by setting up Google Cloud Print in Google Chrome.
Once a printer is configured to work with Google Cloud Print, it’s associated with your Google account. You can then remotely access the printer with your Google account credentials. You can also share one of your printers with another Google account, so you can allow other people to remotely print to your computer as easily as if you were sharing a file with them via Google Drive.
Up until recently, Google Cloud Print has been a bit of a novelty. Google Chrome includes support for Cloud Print, and you can use Cloud Print apps on iOS and Android to remotely print to Cloud Print printers. However, Google recently launched a Google Cloud Printer service for the Windows desktop. Install it and Google Cloud Print will be available in the standard print dialog, so you can remotely print to Cloud Print printers from Microsoft Office or any other desktop app.
For printing over the Internet, Google Cloud Print offers the most polished experience and easiest setup experience for average users.

Use a VPN to Access Printers on Remote Networks

If you want to access standard network printers or printers shared via Windows networking when you’re away from the local network, you can use a virtual private network, or VPN. Connect to a VPN and your computer will create a secure tunnel to the VPN server on the remote network. All your traffic will be sent over this tunnel, so your computer will behave as if it were connected to the remote network. This means that locally shared printers, as well as other network resources like Windows file shares, will be accessible.
Once your computer is connected to the VPN, the printer will be available and you can print to it just as if you were on the same local network. Many businesses networks set up VPNs so their employees can remotely connect to the business network, so you may already be able to do this with your existing VPN connection.
Setting up your own VPN is more complicated than using Google Cloud Print, but it can be done. Windows includes hidden support for setting up a VPN server. Hosting your own VPN server isn’t ideal for security — it’s easier to just use Google Cloud Print if you don’t want to worry as much about security.

There are a wide variety of other different ways to print remotely. For example, some networked printers may be able to accept documents at an email address and automatically print all documents that arrive at that address. Some may work with Bluetooth or Apple’s AirPrint to accept print jobs wirelessly.

Saturday, July 13, 2013

How to Make Your Own Windows Registry Hacks

Over the years, we’ve created many Registry hacks to customize and tweak your Windows computer. Today we’re going to give you the keys to making your own registry hack files that you can use on any computer.
Before we go further, it’s worth noting that even reading this article and thinking about the registry will make your computer melt, and we’re not responsible if you break stuff, which… you will.

So what is a Registry Hack?

Whenever you customize a key or value in the registry, you could arguably call it a registry hack… but in this context, we’re referring to those downloadable registry hack files with the .reg extension that do magical things to your computer. Like break it. Be afraid.
In simpler terms, a registry hack file is a backup of all the changes that you’ve done to your registry, saved in a file so that you can apply those same changes to your computer should you reinstall, or on another computer when you get a new one.
If you want some examples of registry hacks, flip through and read some of the ones we’ve covered over the years:
If you’re really determined to continue reading, please proceed. Just don’t blame us if your computer breaks.

Making a Registry Hack

Once you’ve mucked around and changed the Registry values to your liking, you’ll want to use the Export feature to save everything out into a text file with the .reg extension — otherwise known as a registry hack file. These files follow a standard format, so you could probably create them from scratch if you really wanted to, but when you can export directly from the Registry Editor, why bother?
When exporting keys, you should make a point of drilling down to the lowest level on the left-hand side that you can get to while still seeing the value on the right-hand side that you’re trying to save into a file. Then right-click, choose Export, and then save it somewhere.
Now that you’ve successfully saved the file, you can either double-click it to merge the values back into the registry, which wouldn’t make sense right now, or copy it to another computer and merge the values into the registry, which would set the same values.
And in the case of this particular registry hack, that would work just fine because there is only a single value on the right — but most of the time, you’re going to need to edit the file. So right-click on it and choose Edit to open in Notepad.
And now we see the registry hack format, which is pretty simple, but requires a little explanation. Every registry hack contains this line at the top, which identifies it as a registry hack — without this line, it’s not going to work right.
Windows Registry Editor Version 5.00
You only need this line once in the file, and it must be the very first line. If you’re trying to combine more than one registry hack, keep that in mind — you only want it at the top line, once.
The next section can be as long or as short as your registry hack needs to go, and is arranged into sections for the Keys (the stuff on the left-hand side of the Registry Editor) and then a set of values for that key. For instance, if you had two keys that you wanted to set values for, you could have them each in the file like this — the SomeVariableName would be the value on the right-hand side under the SOMEKEYHERE that is on the left-hand side — and SomeValue would be underneath ANOTHERKEY.
[HKEY_LOCAL_MACHINE\SOFTWARE\SOMEKEYHERE]
"SomeVariableName"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\ANOTHERKEY]
"SomeValue"=dword:00000001
We should really give you an example where you need to do some editing, what we’ll do is open up the Registry Editor and browse down to the following key on the left-hand side. This key determines whether User Account Control blacks out the rest of the screen when the popup shows up, but that’s not important now.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Now go ahead and Export from the System key on the left-hand side, since that’s the lowest we can drill down while still seeing the key on the right. Open up the registry hack file and you’ll see a whole bunch of different stuff in it — yes, our PromptOnSecureDesktop is there in the file, but what about all the other stuff?
If you were to take this registry hack file to another computer and import it, everything else that was set on this machine underneath that Key… would end up being set on the new computer. For instance, the EnableLUA key that you see in the file? That disables or enables UAC depending on how it is set. So if you just wanted to set the Secure Desktop value and didn’t want to change UAC on the other computer, you could inadvertently change that value too — along with everything else in the file.
Luckily there is a very simple answer: it’s a text editor! Just delete everything that isn’t the value or values you want to set. In our case we’ll delete everything but this single value, but if you had five settings in here you wanted to change, you could leave all five of them.
The important thing is that you don’t delete the first line, and you don’t delete the [HKEY_LOCAL_MACHINE\SOFTW....etc] line right above the value, because the Registry Editor needs to know where to put the value.

Combining Registry Hacks Together

Remember that first example with the NoAutoReboot stuff? That’s one of my favorite registry hacks. Now what if we wanted to include that one in our registry hack file along with the Secure Desktop stuff? Luckily, it’s simple, you just have to remember the rule: the Windows Registry Editor Version 5.00 line… only goes in the file once, at the top.
So if you copy and paste the two files into each other, and make sure that top line is only in there once, you’ll end up with a registry hack that contains both settings.
And you can do this as many times as you want — if you want to put every single tweak that you’ve ever done into a single file so that you can use it every time you reinstall, we’d be interested to hear about it.

Deleting a Registry Value

And now, the thing they don’t teach you in school… how to delete a registry value.
There are some scenarios where a registry hack entails creating a new key that didn’t exist before, and changing the setting back requires deleting that registry key. The way this works in registry hack land is pretty simple:
Export the key and change the value that it is set to so that it is just a minus sign. For instance:
“NoAutoRebootWithLoggedOnUsers”=dword:00000001
Would become…
“NoAutoRebootWithLoggedOnUsers”=-
Not terribly hard once you do it once.
So what if you wanted to delete the registry Key instead of the value? You know, the stuff on the left-hand side of the Registry Editor? Again, it involves a minus symbol placed into a registry hack file. So if you wanted to delete the entire key shown in the above screenshot, you’d change it from this:
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mic...]
To this:
[-HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mic...]
See that little minus sign? That will tell the Registry Editor to completely delete that key, and every value underneath it.
You should use this with great caution. With great power comes greatly messed up computers when you screw up. In fact, you shouldn’t be doing any of this. Give me back the keys!