Installing Windows Vista (or Windows 7) via a USB drive

This is archived from:

http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9013119&pageNumber=1


March 16, 2007 (Computerworld) — In a world where there’s too much to do — and too little time to do it in — we’re always looking for shortcuts. So when we stumbled upon a blog entry by Kurt Shintaku over on Windows Live Spaces that promised to let us install Vista from a flash drive instead of an optical disc, there was certainly interest.

Why? Well, if we needed to install Vista on only one computer, it would be a case of “Who cares?” However, running down an aisle of 20 or 50 or 100 PCs with a flash drive in hand, pouring out data at 20MB/sec. – 25MB/sec. sure beats doing the same thing with a disc in hand and an optical drive pumping away at 16MB/sec. – 21MB/sec. Sure, it doesn’t sound like much of a speed boost on paper, but when you start multiplying those small transfer rates by the length of each operation and then the number of repetitions, time can fly or it can crawl. The claim for the flash drive was that it soars, as much as 50% faster in some instances (assuming your PC’s BIOS will let you boot from a USB device in the first place).

If that wasn’t bait enough, fast 4GB flash drives aren’t expensive, they can be recycled as Vista ReadyDrives when you’re done, and best of all, the instructions for transferring our Vista disc to flash looked so easy a caveman could …, well you get the picture. There were only 10 steps:

diskpart

select disk 1

clean

create partition primary

select partition 1

active

format fs=fat32

assign

exit

xcopy d:\*.* /s/e/f e:\

All right, you’ve just had a panic attack. What the heck are those? They’re command-line instructions. You need to start things off by clicking your way through Start/All Programs/Accessories/Command Prompt. It sets up a DOS (remember that?) command screen. “Diskpart” starts a scripting subroutine that lets you enter line commands (which are the next eight things in the list), after which you exit the subroutine and use xcopy to transfer the contents of the disc to flash. See? Simple.

All right, it would be if it worked, but try as we might — and we did for hours and hours and hours of iterations — it didn’t. We could manually start the install from the flash drive from a computer that was already up and running, but it wouldn’t boot — and that’s important when you’re beginning with a blank PC.

The situation was very surprising because Ken Shintaku “works for Microsoft as a Principal Technology Specialist in Southern California.” Then we noticed that Ken had stripped some of the front-end stuff from a colleague’s blog and, in that way that technicians can often be careless with simple things, he forgot to mention something his colleague did: You need to do this from a Vista PC.

Again there’s a why? Under XP, diskpart doesn’t seem to recognize the flash device as a drive. It will display the device as a volume, but the remaining diskpart commands couldn’t care less about that. Vista, on the other hand, recognizes the flash device as a drive. That’s why we could transfer the contents of the Vista disc under XP, but we couldn’t use the diskpart commands to make it a boot device. Needless to say, our first Vista install was from disc.
And it still didn’t work! You know how it is when you pull a key out of your pocket and it won’t unlock the lock even though you’re positive it’s the correct key. It might be the right key, but if so, it must be the wrong lock. Throwing caution to the wind, we reformatted the flash drive, this time under Vista, and tried again. Still nothing. The diskpart commands weren’t working.

One more time into the breach. Formatted again, we took a look at the screen and saw that Vista recognized the drive as H: when there was no G: drive. It had skipped a letter. That shouldn’t be a big thing. Diskpart commands work with disk numbers, not letters, and they’re assigned consecutively irrespective of the letter assignment. Still, just in case, we took a quick trip into the Control Panel’s Disk Administrative Tools application and changed the drive letter to G:.

Suddenly the skies cleared, the waters parted, and the commands worked flawlessly (almost — Vista automatically reassigned the drive to H: after the “assign” command, and we needed to used that designation when we executed xcopy). The flash drive booted, Vista was installed, and, yes, it was faster than disc. Oh happy day!

But you’re not quite done yet. Although the diskpart commands are very straightforward, they’re also quite generic as shown. Let’s take a last look at the list:

diskpart starts the “diskpart” scripting subroutine
select disk 1 focus all subsequent commands on a particular disk
clean clean all configuration information from the disk
create partition primary create a partition (of type)
select partition 1 move the focus to the partition just created
active mark the partition as an active boot partition
format fs=fat32 format the partition with a fat32 file system
assign assign a drive letter to the disk
exit exit diskpart
xcopy d:\*.* /s/e/f e:\ copy all files and directories from one device to another

After you’ve run the DOS command prompt screen and entered the diskpart command, you need to focus the rest of the subroutine commands on the disk you’re about to work with by selecting it. It will probably not be “1″ as shown. In fact, if you use the command as is, you’ll destroy the contents of drive 1, whatever it might be.

To find out where your flash drive resides in the hierarchy, use the “list disk” command. (If you type “help” at the diskpart prompt you’ll see a list of all available commands.) It will display each disk on your computer with its corresponding number. In our case, our Corsair Readout flash drive was shown as “3″ so our select command was actually “select disk 3.” From that point on, any command we issued within diskpart was used on disk 3 without needing to mention it specifically again.

The xcopy command is also device-specific. Our optical drive was actually F: and, as mentioned, the flash drive was H:. (After you exit diskpart and before you use xcopy, you can check with Vista to see what your drive assignments are. The DOS command prompt window will just cycle out of sight as you do, but you can select it again to bring it to the top). Our xcopy command, therefore, looked like this:

xcopy f:\*.* /s/e/f h:\

(If you’re DOS savvy, you’ve probably realized that the /s and /e switches are contradictory. /s copies directories and subdirectories, but not empty ones, while /e copies directories and subdirectories, including empty ones. It didn’t seem to cause a problem, so we let it be. The /f switch displays the full source and destination file names while copying is going on, and a file called install.wim, the actual installation image itself, will seem to take forever to get from disc to flash. Don’t get anxious. Just sweat it out).

When xcopy has completed transferring files, close the command prompt window. That’s it. You’re done. You can boot from the flash drive and do all your installations from there. Now you just have to figure out what you’ll be doing with your free time… (And should you want to use your flash drive as a ReadyDrive when all your installs are completed, you’ll have to reformat it so it’s blank and, once connected to your Vista computer, right-click its icon and set it to work as one from its Properties box).

Taking Ownership of System Files in Windows Vista

This is archived from:
http://www.winmatrix.com/forums/index.php?showtopic=13157


If your are replacing or changing system files like (uxtheme.dll or imageres.dll) in Windows Vista then first you have to take ownership of the file and then grant your username full control of the file.

Image

Just add this file to your registry and right click on the file you want to own and click on “Take Ownership”.
Download (Installation Tool)
To remove the feature just run this file.
Download (Removal Tool)

If you don’t like above registery files, then follow these steps to do this manually:
Start button > All Programs > Accessories > Right-click on Command Prompt > Select Run as administrator > Click Continue.
At the command prompt, input takeown /f filepath
Now input icacls filepath /grant yourusername:f

Or You can use the following:


Take Control

Image

TakeControlb2.zip (Mirror) (LOCAL Mirror — Hosted on XtraSimplicity)

Take Control lets you take ownership and get full control of any system file with ease (Windows Vista only)

Current version: 1.0 Beta 2

Note: For Windows Vista only

Enabling PAE on 32-bit Windows Vista

This is archived from:

http://www.thegeeksweek.com/blog/enabling-pae-on-32-bit-windows-vista.html

On 32-bit Windows Vista computers with 4Gb of memory installed you may enable the PAE boot switch to allow the operating system to see the maximum amount of memory. The BOOT.INI file no longer exists in Windows Vista, to configure boot options you must use the “BCDEdit” boot configuration editor, in Administrator mode obviously, that is included in Windows Vista.

To Enable PAE Boot Option

  1. Start the command prompt by typing “CMD” in the Start menu’s Search space, hold CRTL+Shift+Enter and this will launch the command windows in Administrative mode.
  2. At the command prompt type
    BCDEdit /set PAE forceenable

Your machine must meet the requirements specified in http://support.microsoft.com/kb/929605

DEP and PAE Boot Parameters
On Windows Vista, DEP and PAE are enabled at boot time and are configured by setting values for the nx and pae parameters using the BCDEdit /set command. These boot parameters have conflicting effects. To configure DEP and PAE, use only the parameter combinations that are recommended. Do not experiment with conflicting parameters, especially on a production system.

The Interaction of DEP and PAE Boot Parameters

There are two types of DEP:

  • Hardware-enforced DEP enables DEP for both kernel-mode and user-mode processes. It must be supported by the processor and the operating system.
  • Software-enforced DEP enables DEP only on user-mode processes. It must be supported by the operating system.

DEP is supported by Windows XP with SP2, Windows Server 2003 with SP1, and Windows Vista, and Windows Server 2008. On 32-bit versions of Windows, hardware-enforced DEP requires PAE, which is supported by all Windows operating systems that support DEP. When DEP is enabled on a computer with a processor that supports hardware-enforced DEP, Windows automatically enables PAE and ignores the boot parameter values that disable it.

BCDEdit /set Command List (from www.microsoft.com)

The /set command sets a boot entry option value in the boot configuration data store. Use this command to configure specific boot entry elements, such as kernel debugger settings, data execution protection (DEP) and processor address extension (PAE) options, and to load alternate hardware abstraction layer (HAL) and kernel files.

bcdedit  /set [{ID}] datatype value

Parameters

{ID}

The {ID} is the GUID that is associated with the boot entry. If you do not specify an {ID}, the command modifies the current operating system boot entry. If a boot entry is specified, the GUID associated with the boot entry must be enclosed in braces { }. To view the GUID identifiers for all of the active boot entries, use the bcdedit /enum command.

Datatype Value

bootlog [ yes | no]

Enables the system initialization log.

hal file

Directs the operating system loader to load an alternate HAL file. The specified file must be located in the %SystemRoot%\system32 directory, and its file name must conform to 8.3−character format.

increaseuserva Megabytes

Specifies the amount of memory, in megabytes, for user-mode virtual address space. This variable can have any value between 2048 (2 GB) and 3072 (3 GB) megabytes in decimal notation. Windows uses the remaining address space (4 GB minus the specified amount) as its kernel-mode address space.

kernel file

Directs the operating system loader to load an alternate kernel. The specified file must be located in the %SystemRoot%\system32 directory, and its file name must conform to 8.3−character format.

nolowmem [ on | off ]

Controls the use of low memory. When nolowmem on is specified, this option loads the operating system, device drivers, and all applications into addresses above the 4 GB boundary, and directs Windows to allocate all memory pools at addresses above the 4 GB boundary.

nx [Optin |OptOut | AlwaysOn |AlwaysOff]

Enables, disables, and configures Data Execution Prevention (DEP), a set of hardware and software technologies designed to prevent harmful code from running in protected memory locations.

  • Optin Enables DEP only for operating system components, including the Windows kernel and drivers. Administrators can enable DEP on selected executable files by using the Application Compatibility Toolkit (ACT).
  • Optout Enables DEP for the operating system and all processes, including the Windows kernel and drivers. However, administrators can disable DEP on selected executable files by using System in Control Panel.
  • AlwaysOn Enables DEP for the operating system and all processes, including the Windows kernel and drivers. All attempts to disable DEP are ignored.
  • AlwaysOff Disables DEP. Attempts to enable DEP selectively are ignored. On Windows Vista, this parameter also disables Physical Address Extension (PAE). This parameter does not disable PAE on Windows Server 2008.
onecpu [ on | off ]

Forces only the boot CPU to be used in a computer that has more than one logical processor. For example, the following command configures the current operating system loader to use one processor. bcdedit /set onecpu on

pae [ Default | ForceEnable | ForceDisable ]

The pae parameter is valid only on boot entries for 32-bit versions of Windows that run on computers with x86-based and x64-based processors. On 32-bit versions of Windows, PAE is disabled by default. However, Windows automatically enables PAE when the computer is configured for hot-add memory devices in memory ranges beyond the 4 GB region, as defined by the Static Resource Affinity Table (SRAT). Hot-add memory supports memory devices that you can add without rebooting or turning off the computer. In this case, because PAE must be enabled when the system starts, it is enabled automatically so that the system can immediately address extended memory that is added between restarts. Hot-add memory is supported only on Windows Server 2008, Enterprise Edition, Windows Server 2003, Enterprise Edition and Windows Server 2003, Datacenter Edition, and only on computers with an ACPI BIOS, an x86-based processor, and specialized hardware. On a computer that supports hardware-enabled Data Execution Prevention (DEP) and is running a 32-bit version of the Windows operating system that supports DEP, PAE is automatically enabled when DEP is enabled and, on all 32-bit versions of the Windows operating system, except Windows Server 2003 with SP1, PAE is disabled when you disable DEP. To enable PAE when DEP is disabled, you must enable PAE explicitly, by using /set nx AlwaysOff and /set pae ForceEnable. PAE is required to support Cache Coherent Non-Uniform Memory Architecture (known as ccNUMA or NUMA) on computers with x86 processors, although Windows can run in non-NUMA mode on NUMA-capable computers without PAE. Even when it is required, PAE is not enabled automatically. NUMA is supported in all editions of Windows XP and Windows Vista, and in the Enterprise and Datacenter editions of Windows Server 2003.

quietboot [ on | off ]

Controls the display of a high-resolution bitmap in place of the Windows boot screen display and animation. In operating systems prior to Windows Vista, the /noguiboot serves a similar function.

removememory Megabytes

Removes memory from the total available memory that the operating system can use.

sos [ on | off ]

Controls the display of the names of the drivers as they load during the boot process. Use sos on to display the names. Use sos off to suppress the display.

truncatememory address

Limits the amount of physical memory available to Windows. When you use this option, Windows ignores all memory at or above the specified physical address. Specify the address in bytes.

usefirmwarepcisettings [ yes | no ]

Enables or disables the use of BIOS-configured peripheral component interconnect (PCI) resources.

vga [ on | off ]

Forces the use of the VGA display driver.

For a really detailed explaination why the 4Gb memory hole exists on a 32-bit system (any 32-bit system) have a look at this article http://www.codinghorror.com/blog/archives/000811.html