1
1
I was building a set of batch scripts for our automatic build/test system which runs across different operating systems to set some conditions for the different environments and I noticed that Windows 8 seems to handle regedit.exe command line arguments differently than Windows XP through 7.
I was running the command:
regedit.exe /s relative_path\registry_settings.reg
This worked correctly until we got to a Windows 8 node, at which point it didn't emit any errors but moved on as if it worked without making any of the registry changes. (and then my entire test suite failed and scared me)
To get Windows 8 to work I had to use an absolute path as such:
regedit.exe /s \absolute_path\registry_settings.reg
Is this a deliberate change from Microsoft, or is it likely that there is an environment setting affecting this? Is there a better solution than using an absolute path (which is brittle and will require more future maintenance)?
1Had your bat script "cd" to the directory where the relative path could be picked up? – Kinnectus – 2014-06-17T19:05:03.983
As I think @BigChris is hinting towards - are you sure your Windows 8 setup is dropping you into the same path that Windows 7 was? – Ƭᴇcʜιᴇ007 – 2014-06-17T19:10:03.767
1Are you working with doesn't architectures also? Perhaps your Windows 7 is x86 and Win 8 x64? Program Files and Program Files (x86)? – Kinnectus – 2014-06-17T19:14:31.307