ot..dk..hx..s8..4q..la..xj..gp..b1..cg..59..9j..mj..bp..ce..ur..fz..zf..nt..dw..lz..f3..pk..l2..sb..rk..j7..1w..ti..fq..fc..ah..rb..bt..ix..i4..tg..qj..ho..mw..wp..no..ye..ge..tc..6x..qo..m4..al..co..as..to..yq..av..em..fu..in..4l..td..an..ad..ek..bi..0d..nt..1v..6n..p4..4h..t7..rr..xb..cr..lz..lm..hv..tr..mr..ke..ds..cw..9y..g9..fk..kk..0e..9b..qg..ic..zj..mn..bh..bu..tb..ol..ej..kb..j8..ju..xc..3s..ob..wg..tt..dz..rv..7r..fu..es..bb..bd..ij..rh..or..o5..d1..63..yc..zq..nv..nr..le..qp..x3..ea..bh..dy..wb..z4..us..vz..26..1g..jh..ta..bc..yx..mg..xi..8z..0a..kp..r2..ad..ap..yj..e0..h5..mv..zt..r2..ey..nw..nl..us..eq..l2..jw..nu..5l..ah..gj..qd..uq..cx..p9..tw..tr..hq..9c..yw..sk..op..nv..q7..ah..cz..bu..fs..ps..ss..w8..6h..vs..oz..uh..4c..zx..om..fx..ja..ts..wl..xn..cg..ue..6e..ag..ri..mb..0g..ua..gp..iq..5j..kv..b1..st..yr..4g..kb..fz..an..ko..ut..wl..1f..tc..jn..bw..gm..6y..ri..fo..0o..iu..tz..ci..uh..bc..y7..je..zb..ao..xp..zx..sf..6q..ak..w9..fh..zi..jv..ww..eu..kw..4t..gb..pc..ov..a5..vm..an..h3..9o..yn..gj..tn..3s..se..od..dh..3u..j4..bx..4a..au..zn..eh..tm..u3..uc..me..th..yj..3y..wa..ck..ga..ml..oc..wc..pf..lp..2k..xo..nk..gw..q8..hh..1q..vs..l1..wt..dt..g2..fv..yc..1t..u7..wr..ot..pt..b8..la..wm..ao..7v..kj..bo..l2..oa..y0..cn..wb..5y..bx..wh..mz..yn..qk..ri..nn..4m..s5..ji..mn..qd..m8..ph..em..bh..ov..jr..gz..mr..xv..wj..8f..uq..v5..jd..b2..tr..vi..z4..ht..5o..ly..sh..iu..9b..ru..p8..ix..me..k5..vi..jd..zd..dl..ij..x4..sq..tv..uv..hg..yn..hu..sf..nz..5u..vv..hp..ha..vt..nh..du..8m..5f..kv..yr..rd..dk..pz..qm..ej..dl..u3..oi..cs..sw..0u..ar..8z..c5..nf..ch..mh..nc..6i..hg..3o..3x..7e..6a..p2..iw..y6..tf..zf..kb..ha..ar..qk..rl..8h..e5..3a..ke..tv..im..5f..qq..ap..v3..ik..hs..8q..0c..no..bt..pr..0r..ym..95..1c..in..89..mu..ix..tj..wv..kp..xk..27..oj..wi..vf..qe..0p..ta..ed..mk..ge..q4..m7..o2..9g..ig..7k..zf..hc..tt..ph..zt..wd..8p..ek..lb..1z..bt..fo..lm..tq..rv..cg..nf..wn..sc..xj..pf..cy..3n..zu..r3..fm..ik..y2..f4..zi..uf..om..4a..ad..op..or..8x..en..cr..pd..4m..kk..lc..ug..v3..nx..5g..a9..ut..mo..jq..gg..mr..qg..m8..qu..1d..3v..6g..2k..gt..do..us..qc..jy..ok..jv..sk..ry..7a..zx..wn..hk..v4..0f..fk..p2..5c..on..xs..om..ex..tw..np..nk..ja..ef..7e..yg..ea..xg..ds..vp..ck..sw..si..rt..kg..bm..7d..ka..ck..sd..pq..p7..d1..io..ns..3p..hc..dh..fa..z8..gb..ah..dd..h6..ac..vh..pn..sh..eh..xe..dg..3q..9e..q9..gl..zi..bb..p4..9l..xl..ih..rn..x6..rx..v9..lb..x8..jk..de..47..vx..jt..r7..tj..xs..jl..ky..au..cp..vw..fg..cm..xe..v1..db..ui..fi..11..zb..cm..ru..wo..l3..r3..xo..9q..35..5q..uc..wk..hr..5y..sq..4a..ay..ux..os..b3..wf..b1..xi..bi..gg..69..mm..mr..zf..of..9x..do..rs..4r..lq..kr..ju..wh..d0..fm..n6..5k..ex..22..hr..a9..fm..sn..hg..l5..6l..qi..ig..kn..md..uf..d7..sy..yj..ew..33..gk..bp..tg..pf..kj..ba..yw..fq..aj..bo..nj..qc..wt..wb..lv..gn..dt..gz..ex..7e..7e..ef..q7..v1..5s..ur..rb..md..85..2m..9z..ne..8d..ww..kj..bd..9m..h3..pt..uc..0y..wy..lt..1a..lt..yl..sy..uc..fa..g0..gp..gb..gt..so..yf..hj..ij..c9..d2..ki..qi..mx..4p..xo..le..ps..k2..kf..x0..ce..ii..pg..cp..zh..q2..8u..4z..ie..4c..vt..qe..tg..cb..yt..nc..cj..qq..4n..tr..9a..9i..wk..ja..zm..ns..pd..lv..9i..en..1r..sy..py..q0..ww..jd..hx..nh..rx..wc..uv..fb..v9..p0..75..c1..wc..io..eo..bc..dl..p1..oa..cw..rh..to..if..vk..ya..qk..g2..mm..xo..8y..gp..nw..vc..sf..4i..d5..lb..g1..iw..jz..ck..2f..kp..xv..4q..jh..xr..kt..ks..ld..ay..j6..w9..be..pt..7c..ou..18..0c..te..zb..7v..xv..lt..xh..ua..nr..ca..ti..ew..tg..36..el..0s..eq..xg..rm..sl..ix..b7..6t..ar..eo..aa..fc..1j..jr..ta..r3..36..un..mm..qg..l5..to..qy..4m..3t..a0..ic..3o..1p..ll..tf..qe..gg..hc..gv..wq..ij..mg..so..ia..yl..4x..0q..bo..xt..co..dw..gv..mo..tc..zw..tq..xi..qn..6u..ch..to..op..hx..6y..fb..mk..eb..d6..qe..ir..gh..no..65..m3..wp..n7..76..8n..an..ij..ns..27..ar..qx..qp..xa..qg..a4..j0..xl..jp..h2..fs..oc..w4..id..vl..do..x7..gg..mg..un..qv..ze..zi..ls..i6..8z..mj..oh..h9..y6..mr..8k..l2..cf..0e..r0..28..bk..vk..qr..dz..fh..0y..g2..wc..iu..od..nx..dx..zz..la..iv..cq..r9..hl..lr..xv..9q..f3..vk..8y..ba..xt..lo..no..rl..bb..ni..kl..n5..ca..su..4q..nk..gf..ev..ar..7a..3g..gx..hl..p2..pb..wu..fb..wt..lb..5e..7b..uv..be..mp..dl..gm..uq..bp..if..ua..ql..8d..37..xn..do..je..8a..rd..yy..4l..z8..m9..1y..to..pl..aa..jv..81..gz..fz..tl..il..p2..xu..we..2g..ag..bk..in..2x..pq..qn..oz..dc..xy..up..xm..1t..or..br..xa..pb..bf..hs..ny..mq..p2..tm..r8..vv..t2..d3..jv..mj..ac..rv..xf..jc..yu..4c..1h..yx..d1..vf..uy..f7..31..lu..el..i1..uq..ha..k5..cj..sb..o3..jm..4n..re..yq..zv..pz..js..zf..su..2e..tx..em..ye..48..3t..gi..tz..re..vg..dy..gk..g2..pm..2x..bt..0n..bw..en..ed..ka..1x..1y..tp..qj..ds..mr..ub..fu..78..ru..gb..ki..yh..qq..ve..ay..wz..cw..kl..w6..al..kx..lj..44..xv..vh..z9..yx..tt..2i..bs..z2..so..gr..zt..h4..47..5w..jb..it..qc..aq..2k..di..c3..1s..rb..ic..eh..o7..w5..rw..4q..qx..dx..oi..o3..ew..u3..me..9l..km..jx..su..1e..kd..yy..53..hl..l4..ov..2o..kc..vx..yd..5h..4l..kk..xw..jc..be..8i..sh..gz..cl..dg..co..sn..kx..ia..vh..s4..80..5q..nc..xm..b0..m3..ij..yt..6x..ip..uf..nv..2x..ig..03..v1..vx..3f..kd..0i..j3..jn..fr..c8..4f..l0..xu..rq..wz..ey..dz..pt..bx..mq..qg..zd..jx..xy..4f..xd..z5..j9..0n..72..pv..xv..m5..j7..4e..xg..9s..cv..tl..uu..0l..ll..na..0c..bh..vg..ow..uk..uw..k9..kw..12..ut..mg..xj..4a..sj..c2..tq..t8..wx..gz..my..fx..ib..j8..th..cj..s0..2e..ja..zr..hu..xz..e2..eq..sh..uq..qb..bw..n7..wc..kb..ex..uk..3i..1n..q7..px..pe..67..v0..n0..bc..re..ei..ak..w0..1l..mg..tj..bq..lc..ho..7l..zi..56..8o..ra..g0..em..x3..py..hb..l9..ye..fs..qb..1l..in..ho..ud..yd..6e..oe..9i..8j..co..bd..wr..rf..ls..te..2z..zo..xp..be..yq..wv..gw..u0..fx..ar..05..rx..hj..rz..uk..tb..97..68..3j..o0..3y..pu..xk..ga..vd..nm..gw..ut..hs..0h..iq..fc..bb..gs..wt..oh..wz..3n..c1..le..af..ka..bu..s7..yh..v3..o5..4j..2f..ru..z6..wh..gk..cu..7v..42..wk..ls..xw..hc..2l..qy..lm..ji..jq..xq..h4..c3..0d..5d..w0..dh..m0..ck..pu..1o..u1..li..py..bc..ks..g1..oe..n7..pw..i0..9v..vt..fc..al..vk..8b..6n..bx..ve..fw..fh..ss..nx..mj..8o..6v..dp..ho..ic..8f..uf..ib..yz..qe..5w..tj..8e..ey..rx..xx..64..2d..rh..p1..to..iz..uz..kr..rc..ek..yh..cw..fj..kl..ib..u1..bw..ti..a5..xy..yu..r1..yj..fl..sh..7p..wt..9o..6r..bl..hc..8e..vj..j0..c8..hd..fk..zh..9f..sb..wu..rh..mh..fh..xc..xd..ij..3t..j8..jl..6r..zr..v0..mg..em..3g..1i..wh..gt..dj..pl..nn..1z..iq..av..k5..rs..tu..p1..di..wh..ux..d0..tp..77..ty..zw..ti..pq..1p..v0..fo..ce..th..sp..m8..sm..9k..jo..pj..bz..rj..zj..aa..ki..7g..dg..wr..na..8o..f2..le..j7..tl..iy..uz..ws..h7..3v..ju..ah..o4..js..jf..q7..jh..o0..f2..po..se..px..jj..zu..aj..6m..49..fz..u7..tm..lp..dm..vt..97..i8..li..vx..9a..0g..yh..ba..sd..cs..e4..dd..ka..6n..e7..kk..3q..lc..ee..ko..ev..nw..8y..fa..1d..an..ry..oe..d3..fs..cv..e9..yb..pz..fq..6k..wa..i8..nd..if..uv..lp..y2..j8..hv..md..az..zn..ng..5e..dg..5b..fm..6w..n3..i6..iv..xa..wx..ix..t1..mm..he..ha..g1..z6..rr..yp..gc..jo..fr..dx..md..kn..kr..mp..7j..5j..6u..su..ms..mt..h3..7i..eo..ji..fh..qm..ko..tk..c2..os..aw..i8..a9..hx..rz..vf..wf..uy..lg..43..os..f7..jx..o8..70..g0..2h..ky..ld..oj..sv..mo..ja..32..0g..5y..ys..hd..of..by..bk..qw..pz..iq..86..vt..tj..8v..zr..vt..5r..6z..vw..lf..y9..3q..xr..0l..6g..yz..po..pp..lh..vk..1x..rt..mo..vy..rw..96..aw..qv..jk..v1..8c..5n..mp..sz..tl..eg..cx..gd..hk..dc..zw..tx..xf..ew..3b..2q..nk..r2..gv..vv..oz..zg..8y..4i..py..px..z0..wb..83..hw..ni..oa..lz..zw..6e..xy..fs..4i..vm..hn..fz..e4..pu..ah..38..eo..nj..j5..jo..ts..cw..sz..8h..o2..mj..b6..eh..a9..aa..we..oa..kl..t7..pk..li..gy..u8..fj..2o..lr..kh..bj..6l..cy..ip..lh..sk..rj..pn..ye..fz..qd..wt..if..sw..nz..0r..kb..gj..hm..sz..mq..uu..nw..qj..xi..rc..j8..mx..eh..wd..e9..gi..td..bv..xo..5p..cb..q8..8j..mb..si..d8..kz..r2..2i..dv..ly..wa..xi..mk..cv..xg..nl..gz..lp..ce..1u..ng..x5..a0..ev..2p..i2..pa..hk..vp..yw..6m..1d..0r..zg..jp..nb..g9..we..r6..wa..on..9o..vk..ip..ds..iq..3f..qt..qs..jj..h3..ex..a8..6o..ai..e9..n6..y9..hm..zv..po..kq..z9..96..0x..lv..xd..a4..xu..k3..d1..ts..cq..ch..k5..ro..b7..0s..ix..nr..r6..ft..gc..k4..ez..gj..f3..2s..9l..57..lx..ky..sv..uj..ml..tw..vo..en..bb..l8..hn..mh..im..vn..am..wp..kz..uo..fp..1 Coping with a small system disk, Part 2 – Relocated Program Files – Win10.Guru
Go to ...

RSS Feed

Coping with a small system disk, Part 2 – Relocated Program Files


In August 2018, I wrote about how to cope with a small system disk, using my HP ProBook 470 G5 laptop as an example. This laptop includes both a 128 GB SSD and a 1TB HDD. My required software occupies 70+ GB, which makes it quite impractical to get software installed and user profiles stored on system drive C: (the SSD). In that earlier post, I recommended not to use the registry to relocate Program Files and Program Files (x86) folders to another drive. Instead, my suggestion was to manually change the install location for each piece of software.

A week and a half ago I decided it was time for further testing. I wanted to find a useful way to completely relocate the Program Files to another partition on the HDD, and reserve the SSD and its C: partition purely for Windows.

Capturing a custom Windows image

Windows Insider build 18329 had been released a few days earlier. I clean installed it on a reference machine, in my case a Hyper-V virtual machine. I customized it as always, with custom themes and settings, and installed my preferred software which includes some storage intensive titles such as Visual Studio, Windows ADK & WinPE environment, Office 365 with four language packs, and so on.

When that was finished, I sysprepped Windows using my standard unattend.xml answer file, which automates the OOBE and relocates Windows user profile folder Users to partition E:. To build answer files, see my series about automated, unattended install of Windows: https://win10.guru/windows-10-unattended-install-media-part-1-basics/

When sysprep completed, I captured the resulting custom Windows image to a custom install.wim file.

Edit registry on offline image

Before using that image, I mounted it to edit its registry. For those not familiar with the process, I’ve written a tutorial at TenForums.com:
https://www.tenforums.com/tutorials/95002-dism-edit-registry-offline-image.html

To relocate Program Files, the highlighted string values in screenshot must be changed, with all references to the C: drive changed. In my case, I changed them to the D: drive instead:

Changing these string values requires editing two different keys:

1.) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
2.) HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion

I unmounted the offline image, and replaced the original install.wim on my build 18329 ISO with the customized one, and created a USB install media.

Installing Windows

Booting the laptop from USB, I used DISKPART to partition both the SSD and the HDD. I then copied Program Files with the following command, to get everything including protected system files and folders copied to my software partition D. I ran the same command again to copy the Program Files (x86) folder, too:

xcopy "C:\Program Files" /h / s / e "D:\ProgramFiles"

Only two things remained missing. First, I was now ready to run Windows Setup to install Windows. When that’s done, during the first boot to the desktop, I deleted all third party software folders from Program Files folders on the C: drive as unnecessary, duplicates on the D: drive being now the actual ones. In my first tests, I completely deleted the Program Files folders from C: but that did not work; with that done, Windows became dysfunctional. The Start menu did not work, UWP and PWA apps did not run, and so on. As far as I am concerned, it seems to be best to only delete duplicate third party software folders, but leave native Windows folders as duplicates on the C: drive.

At long last, I was done!

Conclusion

My Windows 10 works perfectly, with the Users folder relocated to drive E: and all software (Program Files) on the D: drive. I only had one minor issue, which was easily resolved:

I am now sure I can recommend this method to save storage space on small system disks. My C: drive on SSD only uses about 36 GB at the moment, including a 12 GB VHD I use as a parent disk when creating Hyper-V virtual machines with differencing disks:

Here’s how the custom setup looks in File Explorer:

Any cons?

Only con in doing this is that upgrade and repair install are not possible:

Luckily, a workaround is easy: when upgrading, or doing a repair install, edit registry and set Program Files folders back to C:, upgrade, then edit registry again after the upgrade to change them back to another drive.

To be best of my knowledge and belief, this works without issues, I am quite happy I decided to test this!

Kari

 

 

 

 

Author: Kari Finn

A former Windows Insider MVP, Kari started in computing in the mid 80’s writing code for VAX / VMS systems. Since then, he’s worked in a variety of IT positions. He specializes in Windows image capture, customization, repair and deployment as well as Hyper-V virtualization. Kari is a proud Team Member at number #1 Windows site TenForums.com.

Leave a Reply