Posts Tagged ‘Windows 7’
Block a program’s internet access with Windows 8 firewall
If you have some peculiar program installed that you need to have but want all its internet communication blocked you can do that easily with Windows’ built in firewall. On Windows 8 just hit the Windows key to get to the main menu and
- type Firewall.
- Click on Settings on the right pane and
- go to Windows Firewall.
- Click on Advanced settings on the left side of the window.
- On the left pane of the new window, right-click on Outbound Rules and
- select New rule…
Now follow the setup wizards few steps to set the rule up. That’s it! If you happen to need to deactivate the rule for a short time, you can just right-click it and do so:
Turn Off Screen-Keyboard on Windows 7
The screen-keyboard is a useful Windows feature on some occasions, e.g if you want to find out if it’s the new keyboard’s drivers that suddenly make your machine crash, or when you just need to unplug your keyboard for other reasons.
However it can happen that, if you turn on the screen-keyboard a few times on the login screen, it will stick to the desktop and open up every time you log in (be it a bug or adapted behavior). This is annoying if you just unplugged your keyboard to test stuff.
But fortunately we can turn that behavior off easily in the Control Panel:
Open it up and go to the Ease of Access section. Under Explore all settings, click on Use the computer without a mouse or keyboard:
Now uncheck the Use On-Screen Keyboard check-box under Type using a pointing device:
Click OK to save the settings and you’re done!
Take Ownership of a File or Folder by Command in Windows
Taking ownership of files in Windows is necessary to edit or delete system or program files that you have no access to by default. There are multiple ways to achieve that goal, like doing everything manually through the Properties menu, applying a registry tweak or, as described here, executing a command in the Command Prompt. Note that taking ownership will not let you edit every system file. Windows has set precautions so that you don’t edit any of the most important files which may be helpful in some cases but can be really, really annoying in other.
To start off, you need an elevated command prompt which is simply a command prompt opened as administrator. In Windows 8 you can open that by right-clicking the bottom left corner of the screen and selecting Command Prompt (Admin). In Windows 7 and previous, search the main menu for cmd, right-click it and select Open as administrator.
You need two commands now: one to actually take ownership of the file or folder and one to grant yourself access rights. These are the two commands you will want to use:
For folders, use:
takeown /f folder_name /r /d y
icacls folder_name /grant username_or_usergroup:F /t /q
For files, use:
takeown /f file_name /d y
icacls file_name /grant username_or_usergroup:F /q
The commands basically only differ in a few switches that make the folder procession run recursively. If you want to edit only one folder instead of the whole recursive lot, remove the /r and /t switches from the commands. For more info on the commands, simply enter takeown /? or icacls /? into the command prompt.
If I wanted to take control of my Program Files folder, I’d need to enter the following:
takeown /f “C:\Program Files” /r /d y
icacls “C:\Program Files” /grant christian:F /t /q
Delete Windows.old Folders from Previous Windows Installations
Windows takes a nice precaution for us when it comes to installing a clean Windows system on a hard drive or partition that already has a version of Windows installed: If you forgot to backup files from your old installation but already have the fresh one installed you still have a way of getting what you want:
When installing Windows onto an already existing Windows, most of the old files are stuffed into a folder called windows.old which is placed on your newly formated C:\ drive. That folder contains the most important data from your previous installation, which is the Users folder as well as the Windows and Program Files folders. This way, you have an automatic backup of your files that you can get back to if you forget to backup yourself.
Now there is one downside to this procedure: the folders that are backed up tend to get very large. They can take up several gigabyte of data, depending on how large your folders were. So if you don’t actually need that backup, why keep it?
All of you who have ever tried to delete Windows system files will already see where this is going: part of the windows.old folders are old system files and Windows still recognizes them as those. But Windows actually has a neat little trick to delete them anyway!
Open up the Control Panel and head to the System and Security section. Now click on Free up disk space under Administrative Tools:
A window comes up that is usually used to cleanup temporary files and stuff. But we need to clean up system files, so click on the appropriate button in the Description panel:
A similar window will upon but this time we’ll have different cleanup options. Previous Windows installation(s) is the one that we want to remove:
As you see it is 25 GB large on my machine which is a lot of space for files i don’t need anymore. That’s why, after we have double-checked if we really, really don’t need them, we check the box next to it and click on the OK button. Confirm by clicking Delete Files on the next window and you are good to go with a whole lot of free space.
Relocate Library Folders in Windows 7 and Windows 8
The library folders where your documents, music, videos, contacts, etc are stored in are located in the users’ folders by default. This is fine as long as you have everything on your computer on just one partition, but it may be helpful to relocate those libraries if you want to split your operating system from your data files on a separate partition because these folders tend to become the largest on the average home computer.
Before you start moving, you need to create new folders that will be used as libraries later on. Go to the location where you want to move your libraries to and create folders to replace the old ones (Desktop, Downloads, Favorites, Links, My Music etc.).
Now to get going, open your user folder, in my case that’s C:\Users\christian. This is where the library targets are that you want to move. Start with any of them and right-click it, then click on Properties. On the Location tab, you’ll see the path to the folder that the library is using right now, which points to our Users folder:
Click on Move… and a folder browser appears. Browse the corresponding folder that you have just created and click Select Folder. Now click Apply – if you had files in your old library target, it is recommended to move them to the new folder; Windows will do this automatically upon clicking Yes on the appearing prompt:
Switch between multiple desktops on Windows with Sysinternals
Surely you have witnessed this feature on a Linux system before: with a simple key combination the user is able to switch between multiple instances of the same desktop to reduce the clutter that you get when you open everything on just one desktop. That way, you can have your mail client open on one desktop, switch to another to surf the web and to another one to chat with your pals.
This feature is also accessible on any version of Windows and the only thing we need for that is a little tool that comes with Microsoft’s SysInternals Suite which is a package downloadable directly from their website filled with handy executables, most of them used to troubleshoot problems on your computer.
You can download the SysInternals Suite here: http://technet.microsoft.com/en-US/sysinternals/bb842062.aspx
After you have acquired it, start the program called Desktops that came with it. There, you can define the key combination that switches between the different desktops – of course you can also do that manually with the help of the tray icon. You can also set it to launch on system start-up which you should do if you are planning on using it regularly.
Desktop is also compatible with the new Windows 8 user interface. One desktop is unaffected by another one with the Windows 8 UI open.
Map SkyDrive as network drive in Windows 7
SkyDrive is a cloud service native to Windows 8 and can be accessed right on if you are logged in with your Windows live account. Since you don’t do that naturally on Windows 7, accessing your SkyDrive from the Windows explorer is a little harder than in Windows 8. However you can still map it as a network drive if you know how (this is also possible in Windows 8 if you prefer using it as network drive instead of going in with the Windows 8 interface).
To link your Windows 7 account to your Windows Live account, you need to download and install an “Online ID Provider” which in our case comes with Windows Live essentials. You can download it easily in the Control Panel’s submenu User Accounts and Family Safety > User Accounts > Link online IDs. Click on the Add an online ID provider panel:
You will be directed to following website where you can download Windows Live Essentials:
After installation,WindowsLiveID should be listed as online ID provider:
After you have arranged that, head to the SkyDrive homepage where you log in with your Windows Live credentials. When you get to see the contents of your SkyDrive, take a look at your browser’s URL bar. It should have a cid in it (I will examplarily use 5555555555 as my CID from now on):
Note that CID, because you will need it in a second. Head back to My Computer where all your drives are listed and click on Map network drive:
A window will open where you need to specify a drive letter and the folder which the drive shall be mapped to. Select an unused drive letter, enter the following into the folders path and click the Finish button (replace my examplary CID with yours):
\\d.docs.live.net@SSL\DavWWWRoot\5555555555
You will be asked for your Windows Live credentials once more. Once you entered them, the drive will be available among the listed drives and can be accessed the same way as one of your hard drives:
If you want to do the same for Windows 8, you basically only need to map the drive, since you are connected with your Windows Live account all the time.
Remove wireless connections in Windows 7
If for some reason, you have a wireless connection stuck in your system’s selection that doesn’t go away, it’s not that easy to figure out how to do so:
To remove such an entry,
- left-click on the connections icon and on Open Network and Sharing Center
- in the left pane, click on Manage wireless networks
- click on the network you want to remove once
- click on Remove network above the list
PowerShell script for toggling network configuration between dynamic and static on Windows 7
Changing network configuration can be a real pain if you use your computer, a notebook for example, in more than one different network where you need a static configuration instead of a dynamic. Although Windows offers one alternate configuration it is quite circumstantial to access. The following PowerShell script will change network configurations with only a few clicks. It toggles them between dynamic and static, while it uses either static values you can enter or the ones the DHCP used itself before (default) (if you haven’t executed any PowerShell scripts on your computer before, you will need to change your execution policy first – follow this tutorial to do so):
Get-WmiObject win32_networkadapterconfiguration | foreach-object { if($_.dhcpenabled -eq “true”) {$akku = $_}}
if ($akku) {
$wmi = Get-WmiObject win32_networkadapterconfiguration | where{$_.ipenabled -eq “true” -and $_.dhcpenabled -eq “true”}
$ip = ($wmi.IPAddress[0])
$gate = $wmi.DefaultIPGateway
$subnet = ($wmi.ipsubnet[0])
$wmi.enablestatic($ip,$subnet)
$wmi.setgateways($gate)
$dns=”8.8.8.8″,”8.8.4.4″
$wmi.setdnsserversearchorder($dns)
}
else {
$wmi = Get-WmiObject win32_networkadapterconfiguration | where {($_.DefaultIPGateway) -and !($_.dhcpenabled)}
$wmi.enabledhcp()
$wmi.setdnsserversearchorder()
}
$akku = “”
This script will use the same values the DHCP used for your static configuration – you will want to set your own IP, Gateway and Subnet though. To do that just replace the bold printed values with the appropriate IPs in double-quotes (e.g. “192.168.1.100″).
To actually execute the script, you need to paste it into a notepad document and save it as .ps1 file. It has to be run with administrative rights, so either run it from an elevated powershell or create a link to the file’s context menu that runs it in elevated mode.
If you experience issues with the character set, make sure that all double-quotes in the copied text look the same. If not, rewrite the appropriate ones.















