{"id":972,"date":"2012-05-25T16:44:28","date_gmt":"2012-05-25T21:44:28","guid":{"rendered":"http:\/\/swildow.darktech.org\/wp\/?p=972"},"modified":"2012-05-25T17:25:39","modified_gmt":"2012-05-25T22:25:39","slug":"moving-your-windows-installer-directory-2","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=972","title":{"rendered":"Moving your Windows Installer Directory"},"content":{"rendered":"<div>\n<h3><a href=\"http:\/\/mbccs.blogspot.com\/2009\/12\/moving-cwindowsinstaller-directory.html\">Moving the C:\\WINDOWS\\INSTALLER Directory<\/a><\/h3>\n<div>\n<p>Often servers or workstations will run low of disk space on the system partition.\u00a0 This is especially true I\u2019ve found with older Dell servers that shipped with a 12GB system partition.<\/p>\n<p>The c:\\windows\\installer directory often occupies several gigabytes of storage.<\/p>\n<p><!--more--><\/p>\n<p>While Windows does not provide a mechanism to re-point this directory via the registry, you can use NTFS junctions\/reparse points to re-point the directory to a different local volume.\u00a0 Re-pointing to UNC paths is not supported.<\/p>\n<ol>\n<li>Obtain junction.exe from<a href=\"http:\/\/technet.microsoft.com\/en-us\/sysinternals\/bb896768.aspx\">http:\/\/technet.microsoft.com\/en-us\/sysinternals\/bb896768.aspx<\/a>\n<p>I found it handy to add the executable to c:\\windows\\system32 for easy access<\/li>\n<li>Create the destination Installer folder on the new volume (ie: D:\\Installer)<\/li>\n<li>Move all content from c:\\windows\\installer to your new directory<\/li>\n<li>Make sure to close any explorer windows with these folders opened.\u00a0 Junction.exe requires that there are no open file handles to these directories<\/li>\n<li>Create the junction\n<p><span style=\"font-family: Courier New;\">junction.exe c:\\windows\\installer d:\\installer<\/span><\/li>\n<\/ol>\n<\/div>\n<div>\n<p>Posted by Steven Berkovitz\u00a0at\u00a0<a title=\"permanent link\" href=\"http:\/\/mbccs.blogspot.com\/2009\/12\/moving-cwindowsinstaller-directory.html\">12:42 PM<\/a>\u00a0<a title=\"Email Post\" href=\"http:\/\/www.blogger.com\/email-post.g?blogID=28329697&amp;postID=3801379541919362441\">\u00a0<\/a><\/p>\n<\/div>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div>I mostly work with Virtual Machines and I like to pre-allocating the disk size. When I created my VM I figured 10GB would be enough for C:\\ with Win2003 Server and a couple of SDK&#8217;s and if I needed more I could always add another drive. I was wrong.<\/div>\n<div><\/div>\n<div><a href=\"http:\/\/blog.ray1.net\/2009\/04\/moving-your-windows-installer-directory.html\">http:\/\/blog.ray1.net\/2009\/04\/moving-your-windows-installer-directory.html<\/a><\/div>\n<div>After 2 years my faithful Win2003 dev VM is out of space on C: and I can&#8217;t shuffle any more files around.My C:\\windows\\installer directory is &gt;2GB so this is my prime candidate to move. Luckily there are always solutions to problems&#8230; no I&#8217;m not going to delete the directory, or change my registry to point to a new location.<br \/>\nI&#8217;m going to add a\u00a0<strong>symbolic link<\/strong>\u00a0from C:\\windows\\installer to F:\\installer.<\/p>\n<ol>\n<li>Download Junction from\u00a0<a href=\"http:\/\/technet.microsoft.com\/en-us\/sysinternals\/bb896768.aspx\">http:\/\/technet.microsoft.com\/en-us\/sysinternals\/bb896768.aspx<\/a><\/li>\n<li>Copy OR move C:\\windows\\installer to F:\\installer<\/li>\n<li>Delete all the files in C:\\windows\\installer<\/li>\n<li>Close all your Explorer windows<\/li>\n<li>Run &gt; cmd&gt; C:\\junction C:\\WINDOWS\\Installer F:\\installer<\/li>\n<\/ol>\n<p>That should do it. I wrote a batch (run.bat) script to do the whole procedure.<\/p>\n<pre>@<span style=\"color: #2040a0;\">set<\/span> <span style=\"color: #2040a0;\">src<\/span>=<span style=\"color: #2040a0;\">C:\\WINDOWS\\Installer<\/span>\r\n@<span style=\"color: #2040a0;\">set<\/span> <span style=\"color: #2040a0;\">trg<\/span>=<span style=\"color: #2040a0;\">F<\/span>:\\<span style=\"color: #2040a0;\">Installer<\/span>\r\n::<span style=\"color: #2040a0;\">copy<\/span> %<span style=\"color: #2040a0;\">src<\/span>%\\* %<span style=\"color: #2040a0;\">trg<\/span>%\r\n::<span style=\"color: #2040a0;\">detele<\/span> %<span style=\"color: #2040a0;\">src<\/span>%\\*\r\n<span style=\"color: #2040a0;\">move<\/span> \/<span style=\"color: #2040a0;\">y<\/span> %<span style=\"color: #2040a0;\">src<\/span>%\\* %<span style=\"color: #2040a0;\">trg<\/span>%\r\n<span style=\"color: #2040a0;\">junction<\/span> %<span style=\"color: #2040a0;\">src<\/span>% %<span style=\"color: #2040a0;\">trg<\/span>%\r\n<span style=\"color: #2040a0;\">pause<\/span><\/pre>\n<p>This should work for most directories. The batch file should be in the same directory as junction.exe.<\/p>\n<\/div>\n<div>\n<div>at\u00a0<a title=\"permanent link\" href=\"http:\/\/blog.ray1.net\/2009\/04\/moving-your-windows-installer-directory.html\" rel=\"bookmark\"><abbr title=\"2009-04-02T12:26:00+11:00\">12:26<\/abbr><\/a>\u00a0<a title=\"Email Post\" href=\"http:\/\/www.blogger.com\/email-post.g?blogID=1635568622827949164&amp;postID=7511479167589278506\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/img1.blogblog.com\/img\/icon18_email.gif\" alt=\"\" width=\"18\" height=\"13\" \/><\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Moving the C:\\WINDOWS\\INSTALLER Directory Often servers or workstations will run low of disk space on the system partition.\u00a0 This is especially true I\u2019ve found with older Dell servers that shipped with a 12GB system partition. The c:\\windows\\installer directory often occupies &#8230; <a class=\"more-link\" href=\"http:\/\/www.wildow.com\/blog\/?p=972\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/972"}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=972"}],"version-history":[{"count":3,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/972\/revisions"}],"predecessor-version":[{"id":974,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/972\/revisions\/974"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=972"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}