Menu

#41 sfk176.exe Win7 x64 Can not process the file

general
open
None
5
2016-04-30
2016-04-30
Alexey
No

Win7 x64 in System32 not work:

sfk rep %windir%\System32\themeservice.dll -binary /33DB8BC35F5E5DC38B051A58/4881ECC0000000488B051A58/

Win7 x64 in C:\ work:

sfk rep C:\themeservice.dll -binary /33DB8BC35F5E5DC38B051A58/4881ECC0000000488B051A58/

screen, An example of a Win X64:

And on Win x86 works everywhere

Discussion

  • stahlworks

    stahlworks - 2016-04-30

    System32 is a highly protected system folder, and by default no one, not even Administrators, are allowed to change anything therein, to protect against viruses.

    Please google for "change files in system32" to read about the complex workarounds.

     
  • Alexey

    Alexey - 2016-04-30

    Thank you for the quick response.
    The only problem on x64. It's not about rights, the same rights to the directory and files.
    I copied 1.txt in system32 and install the full rights to it, and a negative result.

    So, too, does NOT work on x64:

    sfk list -nosub %windir%\System32 themeservice.dll
    sfk list -nosub %windir%\System32 1.txt
    

    screen
    and all work! on x86

     

    Last edit: Alexey 2016-04-30
  • stahlworks

    stahlworks - 2016-04-30

    OK explanations are here

    http://superuser.com/questions/330941/some-files-in-system32-not-accessible-outside-explorer-on-windows-7

    Because sfk.exe is a 32 bit executable Windows gives it a completely other folder
    when trying to access system32. It's not just 1.txt but many other files that DIR lists
    will not be shown with sfk list.
    So as it is now, sfk is not at all usable to change files in system32 on a 64 bit windows.

     
  • Alexey

    Alexey - 2016-04-30

    Is planned manufacture x64 bit version for Windows?

     
  • stahlworks

    stahlworks - 2016-04-30

    No, and even a 64 bit binary will probably not be able to change dll's in system32.

    As far as i know, as long as a DLL is used by a process, write access it not possible. Changing system dll's normally requires writing temporary files, pending installation, and then to reboot Windows (risking a dead Windows system if the dll is no longer functional). And I don't want to add an SFK function "change system dlls and reboot Windows", as I don't want to, even once, test such a function with my own computer.

    All you can do is to try this:

    • copy a dll from system32 to c:\work

    • change it there with sfk. this should always work
      as it's a normal, unused file within c:\work

    • then try to copy it back by

    copy the.dll %windir%\system32

    this is the tricky part, and it has nothing to do with SFK.
    "copy" is a native command of windows cmd.exe,
    which will be a 64 bit executable,
    but probably it will fail to do the job.

     
  • Alexey

    Alexey - 2016-04-30

    Thank you for your reply.
    I know on the rights to system files. And in my .bat file first change right, followed by correction and refund rights.
    On x86 it works fine.

    On x64 got around the problem in 2 ways:

    1. Copying, as you described.
    2. Create a symbolic link to the folder system32 (my choice!)

    Here is an example:

     Create a symbolic link: mklink /D "%temp%\System32" "%windir%\System32" >nul
     icacls ...change right... %windir%\System32\any.dll
     rename any.dll to any_2.dll
     copy any_2.dll to any.dll
     sfk -rep "%temp%\System32\any.dll" -binary /55/00/ -yes
      icacls ...refund rights... %windir%\System32\any.dll
     Delete link: rmdir "%temp%\System32"
    

    But I would certainly x64 version =)

     

    Last edit: Alexey 2016-04-30

Log in to post a comment.

MongoDB Logo MongoDB