Zerobug Posted May 10, 2016 Posted May 10, 2016 Hi Guys, I have a little problem, maybe you can help me. I trying to copy a file (DLL) in "C:\Windows\System32", but unfortunnately, the file is never copied. I have tried with these commands : FileInstall("C:\Data\Autoit\mdivwctl.dll", @SystemDir & "\mdivwctl.dll", 1) or FileCopy ("C:\Data\Autoit\mdivwctl.dll","C:\Windows\System32",1) On both, it doesn't works. But if I copy on "c:\Windows" it works. Maybe a permission issue ? I'm administrator of the computer, and if I drag and drop the file on sys32 folder, it works fine... Any idea ?
Developers Jos Posted May 10, 2016 Developers Posted May 10, 2016 Are you running it with the x64 version of AutoIt3? Jos Zerobug 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
jguinch Posted May 10, 2016 Posted May 10, 2016 In the UAC is enable, put #RequireAdmin at the top of your script If you are using a 64 bits OS, the file is probably copied in the C:\Windows\SysWOW64 folder If you want to copy the file in the System32 folder with a 64 bits OS, you should disable the WOW64 redirection before running the copy (_WinAPI_Wow64EnableWow64FsRedirection ( 0)) An other way is to copy the file in c:\windows\sysnative folder Zerobug 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Zerobug Posted May 10, 2016 Author Posted May 10, 2016 Thanks for the tips ! It works. You're right, the file was in C:\Windows\SysWOW64 I have change my script by this : Quote #RequireAdmin #include <WinAPIFiles.au3> _WinAPI_Wow64EnableWow64FsRedirection (0) FileInstall("C:\Data\Autoit\mdivwctl.dll", @SystemDir & "\mdivwctl.dll", 1)
Zerobug Posted May 10, 2016 Author Posted May 10, 2016 My bad, it does'nt works. File is still in C:\Windows\SysWOW64 FileInstall("C:\Data\Autoit\mdivwctl.dll","C:\Windows\System32\",1) It works like that. But i don't know why _WinAPI_Wow64EnableWow64FsRedirection (0) does'nt works.
jguinch Posted May 10, 2016 Posted May 10, 2016 Because @SystemDir is the x86 path (c:\windows\SySWow64). Use c:\windows\system32 instead. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now