Jump to content

Wow64Enable And Wow64Disable Question about?


Recommended Posts

What do we need to use?
There is a lot of confusion about it, you can tell clearly and clearly ..
_WinAPI_Wow64EnableWow64FsRedirection(False) In terms of not having a mess in the operating system after doing so
_WinAPI_Wow64EnableWow64FsRedirection(True) Do we have to?


Or which of the following is the correct use?

#RequireAdmin
#include <WinaPIFiles.au3>

$CMD = 'Dism.exe /online /enable-feature /featurename:LegacyComponents'

If @OSVersion = "WIN_10" And @OSArch = "X64" Then
    DllCall("kernel32.dll", "boolean", "Wow64EnableWow64FsRedirection", "boolean", 0)
    DllCall("kernel32.dll", "int", "Wow64EnableWow64FsRedirection", "int", 1)
    _Wow64FsRedirection(False)
    _WinAPI_Wow64EnableWow64FsRedirection(False)
    RunWait('"' & @ComSpec & '" /k ' & $CMD, '', @SW_SHOW)
    _WinAPI_Wow64EnableWow64FsRedirection(True)
    _Wow64FsRedirection(True)
    DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)
    DllCall("kernel32.dll", "boolean", "Wow64EnableWow64FsRedirection", "boolean", 1)
EndIf

Func _Wow64FsRedirection($state) ;alternativeWow64
    If Not @AutoItX64 And @OSArch = 'X64' Then
        If $state Then
            DllCall("kernel32.dll", "int", "Wow64RevertWow64FsRedirection", "int", 0)
        Else
            DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 0)
        EndIf
        If @error Then Return SetError(1)
    EndIf
EndFunc   ;==>_Wow64FsRedirection

 

Link to comment
Share on other sites

then that must be right use

#RequireAdmin
#include <WinaPIFiles.au3>

$CMD = 'Dism.exe /online /enable-feature /featurename:LegacyComponents'

If @OSVersion = "WIN_10" And @OSArch = "X64" Then
    _WinAPI_Wow64EnableWow64FsRedirection(False)
    RunWait('"' & @ComSpec & '" /k ' & $CMD, '', @SW_SHOW)
    _WinAPI_Wow64EnableWow64FsRedirection(True)
EndIf

Am I right? :)

 

Link to comment
Share on other sites

This is Windows Knowledge.

If you have a 64bit system where you want a way to redirect 64bit file/node 

for make a 32 bit application running without problem 

It is only in this case that you'll need to do these such things. 

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

On a 64 bit OS running a 32 bit process, redirection sets the system folder as SysWOW64. If you want to access the System32, you can use _WinAPI_Wow64EnableWow64FsRedirection (False) function.  Normally, you want to do that because the SysWOW64 DLL is missing or does not work properly.  So you should use it on very exceptional situations, not all the time...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...