Can you install a Windows OS on an external hard drive?

I have a basic computer with a windows operating system, I also have an external hard drive. I was wondering weather i'm able to install my other windows os on the external hard drive while my primary computer is running and logged in. I don't mean dual booting im just talking about installing a separate system while my main one is running.
 
I very much doubt it. The installation early on sets up a boot sector on the hard drive, but that is active at the time if you are running Windows from it.

Normally the install is running from the CD, having booted from the CD. It is possilbe to copy the install CD to other media, but you still need to boot from that media, as far as I know,
 
The answer is yes. When logged onto windows insert the windows media disc. The windows screen wll appear as in the image below. Simply click on the install windows button and follow the prompts. Note, however, you may end up with a dual boot and have to edit the boot.ini file in your original windows installation after the you have completed the secondary installation. I'm curious as to why you would want to do this. Care to share?

 
You can, with help from VMWare Player. With VMWare player (a free virtual machine software from VMWare) you can create a "dummy" virtual machine (VM) and install your windows there while still running the main Windows. The trick is you have to set physical drive access to the external hard drive for the "dummy" VM instead of giving it virtual disk/drive.
 
I probably can give a hint to what the person is trying to achieve as its very similar to my situation.
My desktop configuration is pretty old and one of my IDE HDDs is its last few years. I dont want to buy another IDE HDD and want to see if I can still boot up windows and use this desktop PC booting up to my external HDD or pen drive (whatever). Is it possible? And if there is no HDD installed on my desktop PC, will it work?
 
Back