damian666 Posted May 8, 2015 Share Posted May 8, 2015 (edited) Hi guys, i have a script to change some icons in windows 10, because current icons are fugly Func SizeCheck() FileCopy(@WindowsDir & "\system32\imageres.dll", @ScriptDir & "\check-imageres.dll", 1) sleep(2500) local $size1 = Round(FileGetSize(@ScriptDir & "\check-imageres.dll") / 1048576, 1) local $size2 = Number(IniRead(@ScriptDir & "\FileSize.ini", "Sizes", "ImageRes.dll", "0")) TrayTip("Icon Changer", "Current size is " & $size1, 0, $TIP_ICONASTERISK) sleep(2500) TrayTip("Icon Changer", "Patched file size is " & $size2, 0, $TIP_ICONASTERISK) sleep(2500) ;FileDelete(@ScriptDir & "\check-imageres.dll") if $size1 = $size2 Then Return True Else Return False EndIf EndFuncmy problem is that the file reports 57.3mb in the destination, but when i copy it to the workdir, its 54.4mb anyone knows what the hell is up with that? Damian Edited May 9, 2015 by damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
Developers Jos Posted May 8, 2015 Developers Share Posted May 8, 2015 What are the exact properties for the 2 files when you look at their sizes via Windows Explorer?Jos 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. Link to comment Share on other sites More sharing options...
damian666 Posted May 8, 2015 Author Share Posted May 8, 2015 here ya go and proud of it!!! Link to comment Share on other sites More sharing options...
Developers Jos Posted May 8, 2015 Developers Share Posted May 8, 2015 Do you have a x64 OS?Your script likely runs in x86 mode so you need to check the C:\Windows\SysWOW64 directory version.Jos 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. Link to comment Share on other sites More sharing options...
damian666 Posted May 8, 2015 Author Share Posted May 8, 2015 hmm... that one is indeed 54.4, BUT... i explicitly use @WindowsDir & "\system32\" to get the right one, that should be the right one not? and proud of it!!! Link to comment Share on other sites More sharing options...
UEZ Posted May 8, 2015 Share Posted May 8, 2015 On my WIn 8.1 x64 both imageres.dll versions are the same size (48.847.872 bytes) and your function seems to work properly.I will test on my Win10 vm and will reply if I get the same result. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
damian666 Posted May 8, 2015 Author Share Posted May 8, 2015 (edited) cool UEZ, just remember, that my imageres is patched with icons from 7/8, hence its size difference. Edited May 8, 2015 by damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
Developers Jos Posted May 8, 2015 Developers Share Posted May 8, 2015 hmm... that one is indeed 54.4, BUT... i explicitly use @WindowsDir & "\system32\" to get the right one, that should be the right one not?Well, it all depends how you Run/Compile your script either using the x86 or x64 versions.Jos 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. Link to comment Share on other sites More sharing options...
damian666 Posted May 8, 2015 Author Share Posted May 8, 2015 i compile it x86, always do but even when ran from scite it does the same... and proud of it!!! Link to comment Share on other sites More sharing options...
Developers Jos Posted May 8, 2015 Developers Share Posted May 8, 2015 i compile it x86, always do but even when ran from scite it does the same...Yea, that probably runs AutoIt3.exe, which is the x86 version.Just play with this statement when you have the full SciTE4AutoIt3 installer:#AutoIt3Wrapper_UseX64=y ; and try also nJos 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. Link to comment Share on other sites More sharing options...
UEZ Posted May 8, 2015 Share Posted May 8, 2015 (edited) No problem on my WIn10 x86. File sizes are the same on both locations. The strange thing is on your 2nd screenshot -> file size and size on disk are the same values! Edited May 8, 2015 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
damian666 Posted May 8, 2015 Author Share Posted May 8, 2015 (edited) what the hell... xd that did it Jos, using X64 compile made it report the right size.then my next question is... how the hell will i make it choose the right file if that doesnt work? using x86 compile should default to system32 right? and x64 compile should look in syswow... but now its backwards? O.o Edited May 8, 2015 by damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
Developers Jos Posted May 8, 2015 Developers Share Posted May 8, 2015 You could say the following:The C:\Windows\SysWOW64 directory is the C:\Windows\System32 directory for X86 programs.Jos 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. Link to comment Share on other sites More sharing options...
damian666 Posted May 8, 2015 Author Share Posted May 8, 2015 i really dont understand that... LOL and proud of it!!! Link to comment Share on other sites More sharing options...
UEZ Posted May 8, 2015 Share Posted May 8, 2015 Check this out: https://msdn.microsoft.com/en-us/library/windows/desktop/aa384187(v=vs.85).aspx damian666 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
iamtheky Posted May 8, 2015 Share Posted May 8, 2015 DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)that one line fixes most of my redirection issues damian666 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
damian666 Posted May 9, 2015 Author Share Posted May 9, 2015 Thanx for the read UEZ, that makes it clearer for me boththose, that single line fixed it all, thak you very much Solved. and proud of it!!! Link to comment Share on other sites More sharing options...
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