Batch file not working as expected...

Pages: 12
If you have a 64bit system, then when you launch a bat file it will be executed in launching application context. If you launch it from explorer, it will be 64bit. If you launch it from 32bit program, it will launch in 32bit context. In 32bit context virtualization takes place and
REG DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" will be redirected to
"HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" and "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" to "HKEY_CLASSES_ROOT\Wow6432Node\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}".
So if you have 64 bit OneDrive on 64bit OS then your bat file will not work properly when launched from 32bit application. Make sure that you are building it as 64bit app!
@MiiNiPaa Thank you so much! I have just tried it and it now works :D How did you know it would of been that? Anyway, I really appreciate your time and effort, thanks.
How did you know it would of been that?
Knowledge and experience mostly.
As soon as I saw you trying to access both 32 and 64 bit locations, I had a feeling that 64bit one is unreachable due to virtualization. Then I just made sure that it is not security permissions running amok and proposed a solution.
Topic archived. No new replies allowed.
Pages: 12