"Go" Transfer the package cache folder, transfer the Windows Installer folder

Source: Internet
Author: User
Tags schtasks robocopy

See http://blogs.msdn.com/b/heaths/archive/2014/02/11/how-to-relocate-the-package-cache.aspx

(Note: If the Windows Installer file path cannot be found after Windows auto-Update, you can re-map the installer virtual disk to C:\Windows Installer in Disk Management)

Open the DiskPart tool in CMD

DiskPart

Create a virtual disk with a maximum of 16G space

Create Vdisk file= "E:\VHD\Cache.vhd" type=expandable maximum=16384

Connect and create partitions

Select Vdisk file= "E:\VHD\Cache.vhd"

Attach Vdisk

Create partition primary

Format partition, volume name package Cache, drive letter P

Format Fs=ntfs label= "Package Cache" quick

Assign Letter=p

Exit

Copy the package cache to the virtual disk you just created P

Robocopy "%programdata%\package Cache" P:\/e/copyall/move/zb

... Wait.....

mkdir "%programdata%\package Cache"

echo y | cacls foo/s: "O:bag:dud:pai (A;OICIID;FA;;; BA) (a;oiciid;fa;;; SY) (A;OICIID; Frfx;;; BU) (A;OICIID; Frfx;;; WD) "

View the GUID of the P-drive

Mountvol

and point to the package cache directory

Mountvol "%programdata%\package Cache" \\?\volume{xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\

Unload Drive Letter P

DiskPart

Select Vdisk file= "E:\VHD\Cache.vhd"

Select partition 1

Remove Letter=p

Exit

Boot automatically mounts virtual disks and deletes drive letter

echo Select Vdisk file=e:\vhd\cache.vhd > E:\VHD\Cache.txt

echo Attach vdisk >> E:\VHD\Cache.txt

Schtasks/create/ru system/sc onstart/rl highest/tn "Attach package Cache"/tr "%systemroot%\system32\diskpart.exe/s E:\VHD\Cache.txt "

With this method, create a C:\Windows\Installer virtual disk

Open the DiskPart tool in CMD

DiskPart

Create a virtual disk with a maximum of 16G space

Create Vdisk file= "E:\VHD\Installer.vhd" type=expandable maximum=16384

Connect and create partitions

Select Vdisk file= "E:\VHD\Installer.vhd"

Attach Vdisk

Create partition primary

Format partition, volume name package Cache, drive letter Q

Format Fs=ntfs label= "Installer" quick

Assign Letter=q

Exit

Copy the package cache to the virtual disk you just created Q

Robocopy "C:\Windows\Installer" Q:\/e/copyall/move/zb

... Wait.....

mkdir "C:\Windows\Installer"

echo y | cacls foo/s: "O:bag:dud:pai (A;OICIID;FA;;; BA) (a;oiciid;fa;;; SY) (A;OICIID; Frfx;;; BU) (A;OICIID; Frfx;;; WD) "

View the GUID of the P-drive

Mountvol

and point the installer directory

Mountvol "C:\Windows\Installer" \\?\volume{xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\

Unload Drive Letter P

DiskPart

Select Vdisk file= "E:\VHD\Installer.vhd"

Select partition 1

Remove Letter=q

Exit

Boot automatically mounts virtual disks and deletes drive letter

echo Select Vdisk file=e:\vhd\installer.vhd > E:\VHD\Installer.txt

echo Attach vdisk >> E:\VHD\Installer.txt

Schtasks/create/ru system/sc onstart/rl highest/tn "Attach Installer"/tr "%systemroot%\system32\diskpart.exe/s E:\V Hd\installer.txt "

"Go" Transfer the package cache folder, transfer the Windows Installer folder

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.