{"id":1777,"date":"2014-02-20T08:00:31","date_gmt":"2014-02-20T06:00:31","guid":{"rendered":"http:\/\/outofmymind.scanlen.com\/?p=1777"},"modified":"2014-02-18T12:23:44","modified_gmt":"2014-02-18T10:23:44","slug":"replacing-windows-system-files-live","status":"publish","type":"post","link":"https:\/\/outofmymind.scanlen.com\/?p=1777","title":{"rendered":"Replacing Windows System Files Live"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1706\" alt=\"Topic-Windows\" src=\"http:\/\/outofmymind.scanlen.com\/wp-content\/uploads\/2011\/05\/Topic-Windows.jpeg\" width=\"150\" height=\"150\" \/><\/p>\n<p>Recently I had the need to replace Windows system files manually, while Windows is running. \u00a0For those of you have tried this in the past you may know that it is easier said than done. \u00a0Windows protects these files and\/or they may be in use and then the error you get is &#8220;Access Denied&#8221;.<\/p>\n<p>After searching high and low for a solution I stumbled across a StackOverflow page that provided the solution &#8211;\u00a0<a href=\"http:\/\/stackoverflow.com\/questions\/4443578\/how-to-replace-locked-dll-was-inuse\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/4443578\/how-to-replace-locked-dll-was-inuse<\/a><\/p>\n<p>Copying system dlls on Windows 7 (and Vista) is described in\u00a0<a href=\"http:\/\/support.microsoft.com\/kb\/929833\/en-us?fr=1\" rel=\"nofollow\">System File Checker tool article<\/a>\u00a0(in &#8220;Step2: If the System File Checker tool cannot repair a file&#8221;).<\/p>\n<p>Here is a quick (almost copy&amp;paste) solution to use in a batchfile:<\/p>\n<pre style=\"padding-left: 30px;\"><code>REM you will need to change this :-) - the SOURCE and the DESTINATION\r\nSET tmpset_SOURCE=c:\\Temp\\fileyouwanttoreplace.dll\r\nSET tmpset_DEST=c:\\Windows\\SysWOW64\\fileyouwanttoreplace.dll\r\n\r\nREM copy and paste this straight to cmd:\r\ntakeown \/f %tmpset_DEST%\r\nicacls %tmpset_DEST% \/GRANT %USERNAME%:F\r\ncopy %tmpset_SOURCE% %tmpset_DEST%\r\n\r\n<\/code><\/pre>\n<p>For those of you who want to understand what is happening above, lets break it down.<\/p>\n<ol>\n<li>Firstly the Source and the Destination variables are being set<\/li>\n<li>The &#8220;takeown&#8221; command is taking ownership of the destination file by force<\/li>\n<li>The &#8220;icacls&#8221; command is setting the permission of the destination file to the currently logged on user<\/li>\n<li>The copy command<\/li>\n<\/ol>\n<p>It worked like a charm and this is something you want to keep in your &#8220;Admins Toolkit&#8221; \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I had the need to replace Windows system files manually, while Windows is running. \u00a0For those of you have tried this in the past you may know that it is easier said than done. \u00a0Windows protects these files and\/or they may be in use and then the error you get is &#8220;Access Denied&#8221;. After [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-1777","post","type-post","status-publish","format-standard","hentry","category-windows"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/outofmymind.scanlen.com\/index.php?rest_route=\/wp\/v2\/posts\/1777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/outofmymind.scanlen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/outofmymind.scanlen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/outofmymind.scanlen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/outofmymind.scanlen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1777"}],"version-history":[{"count":5,"href":"https:\/\/outofmymind.scanlen.com\/index.php?rest_route=\/wp\/v2\/posts\/1777\/revisions"}],"predecessor-version":[{"id":1796,"href":"https:\/\/outofmymind.scanlen.com\/index.php?rest_route=\/wp\/v2\/posts\/1777\/revisions\/1796"}],"wp:attachment":[{"href":"https:\/\/outofmymind.scanlen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/outofmymind.scanlen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/outofmymind.scanlen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}