I simply need to copy a file that disables Adobe Flash auto-update to both - System32 and SYSWOW64 system folders.
File doesn't get copied to System32 folder, only to SYSWOW64 (and yes, all directories exist). UAC is off. Any ideas? If I need some special permissions, how do I obtain them via script?
Edit: Doesn't look like a permission issue. Created a copy of "Flash" folder, took ownership of it, and still can't copy there. I'm lost.
Also tried
and it doesn't help, either.
Wait, it actually works now. Last time I disabled redirection, I used a wrong system directory variable. Stupid me. :/
Working code:
[ autoit ]
FileCopy (@ScriptDir & '\Data\mms.cfg', @WindowsDir & '\SysWow64\Macromed\Flash') FileCopy (@ScriptDir & '\Data\mms.cfg', @WindowsDir & '\System32\Macromed\Flash')
File doesn't get copied to System32 folder, only to SYSWOW64 (and yes, all directories exist). UAC is off. Any ideas? If I need some special permissions, how do I obtain them via script?
Edit: Doesn't look like a permission issue. Created a copy of "Flash" folder, took ownership of it, and still can't copy there. I'm lost.
Also tried
[ autoit ]
and it doesn't help, either.
Wait, it actually works now. Last time I disabled redirection, I used a wrong system directory variable. Stupid me. :/
Working code:
[ autoit ]
;Flash Update Disabler DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1) FileCopy (@ScriptDir & '\Data\mms.cfg', @WindowsDir & '\System32\Macromed\Flash\mms.cfg', 1) ;Writes to SystemDir on x86, writes to 64-bit SystemDir on x64 FileCopy (@ScriptDir & '\Data\mms.cfg', @WindowsDir & '\SysWow64\Macromed\Flash\mms.cfg', 1) ;Does nothing on x86, writes to 32-bit SystemDir on x64 DllCall("kernel32.dll", "int", "Wow64EnableWow64FsRedirection", "int", 1)