Posts Tagged Windows

Installing and configuring a PPP null-modem connection on Windows 7

Part 1: Install the modem device

  1. Start > Control Panel > Phone and Modem
  2. Modems tab, click Add
  3. Check Don’t detect my modem, I will select it from a list and click Next
  4. Under Manufacturer, select (Standard Modem Types)
  5. Under Models, select Communications cable between two computers
  6. Click Next
  7. Click Selected Ports radio button and select the serial port that you will be connecting the cable to (default: COM1)
  8. Click Next
  9. Windows sets up the modem
  10. Click Finish
  11. Click Ok to close the Phone and Modems dialog box

Part 2: Setting up the connection

  1. Start > Control Panel > Network and Sharing Center
  2. Set up a new connection or network
  3. Select Set up a dial-up connection
  4. Select Communications cable between two computers
  5. For dial-up phone number, enter any dummy number.
  6. Enter a meaningful connection name
  7. Click Connect, then click Skip on the screen that appears
  8. Windows states that the connection is ready for use
  9. Click Close

Part 3: Configuring the connection

  1. Start > Control Panel > Network and Sharing Center > Change adapter settings
  2. Right-click on the connection you created from step 2 and click Properties
  3. Under Connect Using, be sure Communication cable between two computers is checked.
  4. Click Configure
  5. For Maximum Speed, select 115200 from the drop-down
  6. Ensure Enable hardware flow control is checked
  7. Uncheck Enable modem speaker
  8. Click Ok
  9. Click the Options tab
  10. Click PPP Settings
  11. Ensure Enable LCP Extensions and Enable software compression are checked
  12. Click Ok
  13. Click Networking tab
  14. Highlight TCP/IP (or TCP/IPv4, or applicable variant)
  15. Click Properties
  16. Ensure Obtain IP address automatically and Obtain DNS server addresses automatically are selected
  17. Click Advanced
  18. Uncheck Use default gateway on remote network
  19. Click Ok three times

Comments are welcome.

, ,

Leave a comment

How to script a change to a static IP address or DHCP IP address in Windows using a batch file

More and more I find myself needing to temporarily set static IPs on my laptop to access equipment for configuration or management, and changing IP addressing in Windows is easy enough, but I often either forget the settings I need or need to switch back and forth quickly and it becomes veryb time-consuming or tedious.

After searching around for a way to do this I found that scripting the IP changes via netsh in a batch file was a great way to not only change the IPs quickly and easily, but relieve myself from having to remember the IP addresses — I could simply save each configuration in a seperate batch file and name it appropriately. I could then switch back and forth quickly.

So here’s how to do it:

First, you’re going to need to know the basics of creating a batch file. If you’re not sure how to do it, click here to read how; it’s actually quick and easy.

Next, I’m going to show you some examples and the parameters, and then further below there will be a template batch file you can copy and easily edit.

Syntax of setting IP address:

netsh int ipv4 set address name=<interface name> source=<'static' | 'dhcp'> [address=<IP address[/bitmask]>] [mask=<netmask>] [gateway=<gateway>]

Syntax of setting DNS server address:

netsh int ipv4 set dns name=<interface name> source=<'static' | 'dhcp'> [address=<address | 'none'>] [register=<'none' | 'primary' | 'both'>] [validate=<'yes' | 'no'>]

Here’s a short run-down of what the various parameters mean. For further reading, consult the Microsoft Technet article on netsh.

Frequently used ‘address’ parameters are…

  • name = Interface name or index.
    (If you’re setting this up on a wired LAN connection, it’s usually “Local Area Connection” (not case sensitive), check control panel if you’re unsure.)
  • source = ‘dhcp’ or ‘static’
  • address = IP address, optionally the subnet prefix length192.168.1.1 or
  • mask = The IP subnet mask for the specified IP address
    (use subnet prefix length in address -or- mask, not both)
  • gateway (optional) = ; or ‘none’ (default)

Frequently used ‘dns’ parameters….

  • name = The name or index of the interface. (See note above)
  • source = ‘dhcp’ or ‘static’
  • address = IP address or ‘none’
  • register = One of the following values:
  • none: Disables Dynamic DNS registration.
  • primary: Register under the primary DNS suffix only.
  • both: Register under both the primary DNS suffix, as well as under the connection-specific suffix.
  • validate = Specifies whether validation of the DNS server setting will be performed. The value is yes by default. (Passing ‘no’ is suggested to prevent scripting issues)

The following are a few examples of how to set addresses and DNS servers. Feel free to use them or change them however you like.

Example to set static IP, mask, and gateway address:

netsh int ipv4 set address name="Local Area Connection" source=static address= mask= gateway=

An example to set static DNS (you may have to use this in conjunction with the above)

netsh int ipv4 set dns name="Local Area Connection" source=static address= register=primary validate=no

So if you needed, you could combine the above two commands into a single batch file, like so:

netsh int ipv4 set address name="Local Area Connection" source=static address= mask= gateway=
netsh int ipv4 set dns name="Local Area Connection" source=static address= register=primary validate=no

Important: If you are using this on a Windows XP or another system without iPv6 support, change ‘ipv4’ to ‘ip’. Also, make sure your cable is unplugged before setting a static IP, else the command will freeze.

To set both address and DNS to DHCP:

netsh interface ipv4 set address name="Local Area Connection" source=dhcp
netsh interface ipv4 set dnsservers name="Local Area Connection" source=dhcp

Important: There is a confusing disconnect between netsh setting DHCP and what is reported in the network connection properties. If you set a static IP, then later set DHCP, the static IP will still appear in the network connection properties dialog. However, once you plug into a DHCP-enabled network, your network adapter will configure properly. It doesn’t look like it will work, but it does.

If you want to make easy-to-use static IP scripts, create some batch files with helpful prompts like the following:

@echo Be sure NIC cable is unplugged and
netsh interface ipv4 set address name="Local Area Connection" source=static address= mask=

An example of a user-friendly DHCP script

netsh interface ipv4 set address name="Local Area Connection" source=dhcp
netsh interface ipv4 set dnsservers name="Local Area Connection" source=dhcp
@echo It may take a few moments for changes to take effect. You may close this window or

Important: In order for any batch file changes to work, you MUST right-click and ‘Run as administrator’ on Windows Vista and Windows 7.

If you have any comments or feedback from the above, please feel free to share in the comments section below. Thank you!

, ,

Leave a comment

OpenVPN Connection to Synology NAS on Windows 7

Initially I had some trouble getting this to work, but figured this out and figured I would pass it on.

This guide assumes you are attempting to set up a VPN tunnel to your Synology NAS over WAN using OpenVPN. While a PPTP VPN connection is much easier to set up and doesn’t require third-party software, OpenVPN has been shown to be signifigantly more secure.

For this, I’m using Windows 7 64-bit. While file locations will likely differ on other OSes, the overall configuration is likely smiliar.

Base configuration

Log in to your Synology NAS using the admin account and install the OpenVPN server from within Package Center.

Once installed, start VPN Server and enable OpenVPN under OpenVPN Server > Settings > OpenVPN.

The following pop-up message will appear instructing you to make sure UDP port 1194 is open:

If your NAS is behind a router, make sure you have port forwarding set up to forward UDP port 1194 to your NAS.

If you are using the Synology Router Config tool, you can set the port forwarding from Control Panel > Router Configuration > Create. You’ll find the port setting under Built-In Applications as shown below:

If you’re setting up port forwarding in your router, then the Synology Router Configuration tool isn’t needed. Use one or the other, whichever you prefer.

Install OpenVPN

Download and install the OpenVPN application for your OS from OpenVPN community downloads. Install using the defaults.

Getting the configuration from the Synology OpenVPN server

Before the client software can be configured, a few files (specifically the OpenVPN configuration files and the certificate) need to be downloaded from the Synology NAS. from the NAS, go to OpenVPN Server > OpenVPN and click on Export Configuration. This will download a zip file containing the two needed files plus a third README file. You can either refer to the README for instructions or simply continue reading.

Configure the OpenVPN client software

Open windows explorer and navigate to “C:Program Files (x86)OpenVPNconfig”. Copy the openvpn.opvn and ca.crt files from the file you downloaded earlier to this directory.

Right-click on openvpn.ovpn and open it with notepad (or your favorite text editor) and make the edits explained below:

Change the line starting with remote to specify your or your server’s IP address or hostname. For example, if your OpenVPN server is at, change it as follows:

remote 1194

If your host’s IP address frequently changes, uncomment the float option, by changing




Or, you can specify an IP address, like so:

remote 1194

Also, if you want to redirect ALL traffic across the OpenVPN connection (strongly recommended), uncomment the redirect-gateway option by changing




Connecting to the OpenVPN Server

Right-click the OpenVPN GUI desktop icon and select “Run as administrator”. (You can edit the shortcut to always start with administrative privileges by right-clicking on it, selecting Properties, then Compatibility, then checking Run this program as an administrator.)

The OpenVPN GUI icon will appear in your taskbar, and it will appear red. Right-click on it and select Connect. You will be prompted for your username and password (as used on your Synology NAS) to connect.

If you’re having trouble authenticating make the account you are trying to connect as has access to the VPN server. Look in VPN Server > Privilege to verify account access.

That’s it! You should have a working OpenVPN tunnel connection working after following these steps. If you have any suggestions, comments, or feedback, or just want to share your thoughts, please do it in the comments section below. Thanks!

, , ,

Leave a comment

How to delete all Windows Event logs at once

When troubleshooting Windows it’s often very helpful to start with clean log files. This shows you what’s happening with a system in the moment and you don’t waste time digging through log files and waiting for them to load.

To clear all Windows events from the logs, simply open an administrator-level command prompt and enter:

for /f %x in ('wevtutil el') do wevtutil cl "%x"

After a few moments all of the log files will be cleared.

Batch file use: If you’re using this in a batch file, you need to add an extra % sign to the variable names. Also, make sure you’re running the batch file as an administrator or you will get a lot of access denied messages. %x is valid on the command line only; it needs to be %%x in batch file. Here’s the updated code:

for /f %%x in ('wevtutil el') do wevtutil cl "%%x"

Thanks to stefan for bringing this up in the comments.



Leave a comment

Migrating password data from LastPass to 1Password

This explains a fairly simple way to migrate your LastPass data to 1Password using Windows.

First, open your LastPass vault by going to and logging in.

Next, under the Actions column on the left, click Export.

For the next part, you’ll have to save the decrypted data to a CSV file. I was using Chrome when I did this, but I’m certain the instructions for any other browser aren’t too much more difficult.

When your decrypted LastPass vault data appears, click the wrench icon and choose ‘Save Page As…

In the file prompt that appears, name the file something you can remember and give it an extension of .CSV. For example, lastpass.csv

NOTE: Your exported CSV contains ALL your LastPass vault data in PLAIN TEXT.

Now, open 1Password and import your LastPass data as follows:

From within 1Password, select File > Import and select the CSV file you just exported from LastPass.

On the Select Columns screen, map the fields as follows:

  • Title -> name
  • username -> username
  • password -> password
  • location -> url
  • description -> extra

Click OK, then click “Yes to all” on the next screen.

After a few moments your password data should be loaded into 1Password.

Note: Your LastPass secure notes will import with ‘sn’ in the location field.

, , ,

Leave a comment

Solving Spiceworks “Test Failed: Check account, password, or WMI configuration” in Windows 7

If you’re setting up Spiceworks and are having an issue authenticating to a remote Windows 7 system, this may be the solution you’re looking for. This will help you solve this issue in 3 steps:

Step 1: Create a local user with admin rights and a password

This is needed if you’re not using the local “Administrator” account or a domain administrator account. Simply create a user as an Administrator and give them a password.

Step 2: Turn UAC off

Go to Control Panel > User Accounts > Change User Account Control settings. Set to the lowest setting. You will have to reboot after making this change.

Step 3: Enable WMI in Windows Firewall

Click Start and type “firewall” in the box. Click “Allow a program through Windows Firewall.” Check Windows Management Instrumentation (WMI) for Home/Work (Private) networks.

After those three changes are made you should be able to authenticate using Spiceworks. If you’re using a 3rd party firewall, you may need to make sure WMI is allowed through it.

Have any other suggestions for resolving this issue? Please feel free to share in the comments below. Thank you!

, ,

Leave a comment

Set up an encrypted VPN using DD-WRT

DD-WRT is feature-rich alternative firmware for a large number of home router models. It adds a wonderful array of new features, VPN being one of them. This walkthrough will show you how to quickly and easily configure a PPTP VPN server on your DD-WRT-powered router, so you can connect to your home network from afar, create a secure tunnel so you can safely use a public Wifi point with your laptop, or secure your iOS or Android device.

Setting up the VPN Server

So here’s how to get started. First, you’ll need a build of DD-WRT supported by your router which includes the VPN software. If you’re doing this on an Internet connection which has an IP address that changes periodically (i.e. residential), you’ll likely want a Free DynDNS hostname to point to your IP address. You’ll also need a basic familiarity of networking.

For the remainder of this guide, I will assume your router’s internal (LAN) IP address is

Start by going to and login to your router’s administration panel.

Go to Services > VPN and set PPTP Server to enable. After doing that, a few new options will appear. The only ones you need to set are Server IP, Client IP(s), and CHAP Secrets. Set them as follows:

Server IP: You can set this to your router’s LAN IP, i.e.

Client IPs: Set this to an IP range OUTSIDE your DHCP range (See Setup > Basic Setup to figure your DHCP range) A good example value would be for clients to receive addresses within that range.

CHAP Secrets: This is the username/password combinations for your VPN clients. Format is:
myname * mypassword *

Neither the username nor password can contain spaces, and must be all-lowercase.

You’re done with this page; Click Apply Settings.

Now go to Security > VPN Passthrough and make sure PPTP is set to Enabled. Click Apply Settings if you had to change the setting.

You should now be able to connect to your VPN using your Windows, Mac, or Linux computer by setting up a PPTP connection to your public (WAN) IP or hostname.


Can’t get connected? First, try setting up your connection to the router itself, using the LAN IP ( If that works, then the VPN server is set up correctly; the problem is likely on the WAN side. Keep reading for suggestions. If you weren’t able to get connected, go back to the top and double-check your settings.

iOS-Specific changes

You may need to make the following settings adjustment if you are having trouble connecting specifically from your iOS device running iOS 4.3 or above. Go to Administration > Commands and paste the following in the box. Click Save Startup.

echo "nopcomp" >> /tmp/pptpd/options.pptpd
echo "noaccomp" >> /tmp/pptpd/options.pptpd
kill `ps | grep pptp | cut -d ' ' -f 1`
pptpd -c /tmp/pptpd/pptpd.conf -o /tmp/pptpd/options.pptpd

(Source: DD-WRT Wiki)

If you can connect from the LAN side, but are still having trouble connecting from the WAN side, it’s likely your ISP or your gateway device (modem) is blocking the needed GRE protocol or the needed PPTP port or traffic. Contact your ISP for further assistance.

Do you have any experience or tips to share regarding VPN connections to a DD-WRT-powered router, or any suggestions in addition to the above? Please feel free to share them in the comments below. Thank you!

, , , , , , , , , ,

Leave a comment

How to enable BitLocker TPM+PIN after encrypting hard drive

BitLocker by itself is great drive encryption, but unfortunately it has some shortcomings in its default configuration. Namely, there’s no safeguard at boot time preventing the drive from being accessed. If your computer is stolen or physically compromised, the drive is ready and willing to give access to your data.

Fortunately BitLocker supports a PIN code which would can be required to be entered at boot time to unlock the drive. To enable the BitLocker PIN, simply open an administrator-level command prompt and run the following:

manage-bde -protectors -add c: -TPMAndPIN

You should receive output similiar to the following, during which you’re prompted for your PIN (no confirmation of keystrokes will appear on the screen during PIN entry):

BitLocker Drive Encryption: Configuration Tool version 6.1.7601
 Copyright (C) Microsoft Corporation. All rights reserved.
Type the PIN to use to protect the volume:
 Confirm the PIN by typing it again:
 Key Protectors Added:

If you get the following error…

ERROR: An error occurred (code 0x80310060):
Group Policy settings do not permit the use of a PIN at startup. Please choose a
different BitLocker startup option.

… then you will need to edit the local computer policy to allow a PIN to be set by performing the following steps:

  1. Click Start > Run and type mmc
  2. If Local Computer Policy is not visible, or Group Policy Object is not already added, add it by going to File > Add/Remove Snap-In > Group Policy Object
  3. Browse to Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Bitlocker Drive Encryption > Operating System Drives
  4. Open the key Require additional authentication at startup
  5. Enable that Key and set Configure TPM startup Pin to Require startup PIN with TPM

Now you can set the PIN by running the manage-bde command once more.

, , ,

Leave a comment

How to create a multi-page PDF from multiple image files using OpenOffice

I ran into a scan a document to send it via email. PDF format would have been preferable, but Windows Scan and Fax wouldn’t export as a PDF. Fortunately OpenOffice is quite capable of converting a multi-page document to a PDF, and does it quite easily. I had already scanned my documents, so I wanted something that would work with the existing scans. Side note: OpenOffice also works on Linux.

Here’s how I did it.

Step One:

Scan your pages into JPG files and save them where you can find them. In this example, I have four scanned JPG files which I want to convert into a single PDF.

Step Two:

Start OpenOffice Writer

Step Three:

Click Insert > Picture > From File

Step Four:

Select the image to insert. Repeat with any additional images you wish to insert. Once you have all your images inserted, go to…

Step Five:

Click File > Export as PDF.

Step Six:

Set the PDF export options. If you aren’t sure what to do here, accept the defaults as they are fine. Click Export and you’ll be prompted to give the file a name and save it.

That’s it!

, , ,

Leave a comment

How to backup and restore Windows NTFS EFS certificates

Starting with Windows XP, the Encrypting File System (EFS) allowed for transparent, in-place encryption of files on your computer using automatically-generated certificates tied to your user profile. This would prevent access to encrypted files in case the data on the hard drive became compromised. However, if the user profile became corrupted or you were unable to log in normally, the encrypted files would become inaccessible.

You can prevent this from happening by backing up your certificates while the system is in a working state, so that you are able them to restore them later if the need arises.

In Windows XP, you can backup the certificate by doing the following:

  1. Log into the computer
  2. Click Start > Run and type mmc, then press enter.
  3. From the menu, choose File > Add/Remove Snap-in.
  4. Click Add, select Certificates, click Add, select My user account.
  5. Click Finish, click Close, click OK.
  6. Browse to Certificates – Current userPersonalCertificates.
  7. Right-click the certificate that you want to export.
  8. Click All Tasks then click Export.
  9. Follow the steps in the Certificate Export Wizard. Make sure to select that you want to export the private key along with the certificate.

In Windows XP, you can import the certificate by doing the following:

  1. Log into the computer
  2. Click Start > Run and type mmc, then press enter.
  3. From the menu, choose File > Add/Remove Snap-in.
  4. Click Add, select Certificates, click Add, select My user account.
  5. Click Finish, click Close, click OK.
  6. Browse to Certificates – Current userPersonal.
  7. Right-click Personal.
  8. Click All Tasks, click Import.
  9. Follow the steps in the Certificate Import Wizard. When browsing for the certificate, you should select Personal Information Exchange (*.pfx; *.p12) from the Files of type dropdown list box. You will need to enter the password you supplied when you exported the certificate from the destination computer.

In Windows Vista and Windows 7, you can manage your EFS certificates by going to Control Panel > User Accounts > Manage your file encryption certificates. From here, you can backup and restore your EFS certificates.

Do you have a method of backing up or restoring the EFS certificates not mentioned above, or have other feedback related to Windows EFS? Please feel free to share it in the comments below. Thank you!

, ,

Leave a comment