Archive for the ‘Windows’ Category

How to get the directory structure of a drive or path

The tree command displays the directory structure of a drive or path graphically.

tree [drive:][path] [/F] [/A]

/F Display the names of the files in each folder.
/A Use ASCII instead of extended characters.

tree c: /F

The dir command allows you to see the available files in a directory.

dir [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

dir /s /b

Windows 8 Startup Programs

One can find the directory of the startup programs here:

C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Categories: Windows, Windows 8

Deleting the Windows.old directory and setup files after upgrading to Windows 8

  • Go to your Computer
  • Right click on C and select properties
  • Click on Disk Cleanup.
  • Click on Clean up system files. This will change the options in the ‘Files to delete:’ section.
  • Select ‘Older version of Windows’ option and press OK.
Categories: Windows, Windows 7, Windows 8

Disable the lock screen in Windows 8

  • Hit Window Key + R, type gpedit.msc into the box and hit Ok. The Local Group Policy Editor appears.
  • Navigate to Computer Configuration -> Administrative Tools -> Control Panel -> Personalization.
  • Double click on ‘Do not display the lock screen’.
  • Select Enabled and click Ok.
Categories: Windows, Windows 8

Start Windows 8 with Desktop

Download the File Explorer Command File from here and move it to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp.

Another easy way to go to the Desktop is to press the Escape key.

Categories: Windows, Windows 8

Substitute paths as virtual drives on Windows

With the subst command you can associate a path with a drive letter.

subst [drive1: [drive2:]path]
  • drive1:               Specifies a virtual drive you want to assign a path.
  • [drive2:]path     Specifies a physical drive and path you want to assign to a virtual drive.

Create new virtual drive

subst Z: "C:\Documents and Settings\All Users\Shared Documents"

Display a list of current virtual drives


Delete a substituted (virtual) drive

subst Z: /d

Persistent Substituted Drives

Drive letters mapped in this way are not available during system startup for services nor do they persist across a reboot. To use persistent mapping you have to create a new registry entry or you can use psubst:

Categories: Windows XP

Edit Windows hosts (file)

For Windows NT, 2000 and above


Registry key under \HKEY_LOCAL_MACHINE\Comm\Tcpip\Hosts

Categories: Windows 7, Windows XP

Create a symlink / hard links with Windows 2000 and above


Download and install Windows Server 2003 Resource Kit Tools:

Create a symlink

linkd "c:\newdir" "c:\existingdir"

Check symlink

dir /al

Remove symlink

linkd "c:\newdir" /d


Download junction:

Place the junction.exe file e.g. in your C:\WINDOWS\system32 directory so it would be on your system path.

Create a symlink

junction "c:\newdir" "c:\existingdir"

Check symlink

dir /al

Remove symlink

junction "c:\newdir" /d


Only the junction tool knows that these folders are actually symbolic links, the rest of the Windows file system thinks they are normal folders. For example you can delete a junction via Explorer and it will moved to your recycle bin and the folder that it points to stays where it was. But if you then empty your recycle bin it also empties the contents of the folder that this junction was pointing to! So always remember to use the junction command to create & delete junctions.

Junction Link Magic

Download Junction Link Magic:

Version 1 for Windows 2000/XP

Version 2 for Windows 2003/Vista/7

Junction Link Magic is a utility that lets you create junction points. Junction Link Magic automatically lists existing junction points, and it offers an easy interface to add, modify or remove junction points. Junction points can only be created on volumes formatted with NTFS 5.0 or higher.

Link Shell Extension

Link Shell Extension (LSE) provides for the creation of Hardlinks , Junctions , Volume Mountpoints , and Windows7’s Symbolic Links, (herein referred to collectively as Links) a folder cloning process that utilises Hardlinks or Symbolic Links and a copy process taking care of Junctions, Symbolic Links, and Hardlinks.

Categories: Windows 7, Windows XP

Disable or Stop Windows startup programs – speed up your system

Using a program’s own configuration options – Windows 7/Vista/XP/2K/NT/Me/9x

The best option is to check if a program gives you an option to disable the function you’re interested in – via a right-click on a System Tray icon or maybe an “options” menu within the program. If this isn’t available then you have to try something else.

For example, the popular Skype internet telephony/chat program can be disabled via Tools → Options → General Settings → deselect “Start Skype when I start Windows”.

Windows StartUp folder – Windows 7/Vista/XP/2K/NT/Me/9x

If you click on Start → All Programs → StartUp (Windows 7/Vista/XP) or Start → Programs → StartUp (Win9x/Me/NT/2K) you may find programs loading from here via shortcuts. If this is the case, you have two options :

  • Delete the shortcut from the StartUp directory (based on your OS):
    • Windows 7/Vista
      • C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup (Note – this directory is hidden by default)
      • C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
    • XP/2K
      • C:\Documents and Settings\All Users\Start Menu\Programs\Startup
      • C:\Documents and Settings\<username>\Start Menu\Programs\Startup
    • NT
      • C:\Winnt\Profiles\All Users\Start Menu\Programs\Startup
      • C:\Winnt\Profiles\<username>\Start Menu\Programs\Startup
    • Win9x/Me
      • C:\Windows\Start Menu\Programs\Startup (single-user machine)
      • C:\Windows\Profiles\<user>\Start Menu\Programs\Startup (multi-user machine)
  • Create a temporary directory for your OS called “Disabled StartUp Programs” and move the shortcuts there. If a program doesn’t work as expected you can always move the relevant shortcut back again
    • Windows 7/Vista – C:\ProgramData\Microsoft\Windows\Start Menu\Programs
    • XP/2K – C:\Documents and Settings\All Users\Start Menu\Programs
    • NT – C:\Winnt\Profiles\All Users\Start Menu\Programs
    • Win9x/Me – C:\Windows\Start Menu\Programs

AutoRuns – Windows 7/Vista/XP/2K/NT/Me/9x

With the introduction of Windows 7, Microsoft recommends using AutoRuns for controlling which programs run when your computer starts. This utility can be downloaded from here. AutoRuns is a free utility developed by SysInternals and has now been taken under the Microsoft TechNet umbrella.

To use it to identify start-up programs do the following:

  1. AutoRuns requires no installation so move to the directory where it is located and Double-click on Autoruns.exe to run it.
  2. Select the Logon tab.
  3. Disable the startup programs.

MSConfig – Windows 7/Vista/XP/2K/Me/9x

You can also use the “System Configuration Utility” (referred to as MSConfig from now on) to identify startup programs. MSConfig is available for all Windows 7/Vista/XP/2K/Me/9x users (9x/2K users can use the respective versions from here).

  • Click Start and search for msconfig or click StartRun, type msconfig and then click on OK.

  • Select the Startup tab and disable the startup programs.

Registry Editor – Windows 7/Vista/XP/2K/NT/Me/9x

You can both disable and permanently stop programs from running during start-up by editing the relevant entries from the System Registry using the Registry Editor. This option isn’t for the faint hearted and should only be used by those who are comfortable with editing the System Registry and understand what implications any changes may have. If you delete something from the System Registry accidentally, it may be corrupted to the extent that Windows may not re-start at all so beware.

For information about the Windows registry and editing it’s contents try the Windows Guide Network registry pages.

  1. Click StartRun
  2. In the Open box type regedit and then click on OK or press Enter

The most common keys you’re interested in are as follows:


Occasionally the following keys will also be used – primarily by malware:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Install\Software\Microsoft\Windows\CurrentVersion\Run
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

In all cases:


Categories: Windows 7

Reinstall Grub 2 after installing Windows 7 or reinstalling Windows Bootmanager (MBR)

An easy way is to use a Ubuntu livecd.

  • Boot Ubuntu 11.10 with the livecd
  • Start the disk utility with the command palimpsest to find the partition where Ubuntu was installed to. On my hard disk it was /dev/sda5.

  • Use your partition number instead of the 5…:
sudo -i
mount /dev/sda5 /mnt
grub-install --root-directory=/mnt/ /dev/sda
  • restart
Categories: Linux, Ubuntu, Windows 7