- Thread Author
- #1
I just can't figure this out: When I import/merge a .reg file (v5 format) manually by right-clicking the file in Explorer, it works perfectly. But if I try to import the very same .reg file in a batch file, it doesn't do anything!
The .reg file is only changing keys under HKEY_USERS. Here's a sample:
I'm running 64-bit Windows 7 SP1, and I've disabled UAC, and I run as Administrator, so that's not the problem.
But just in case, in the batch file I used NirSoft's NirCmd (http://www.nirsoft.net/utils/nircmd.html) to elevate the command level to run as System, as follows:
But as I said, nothing in the registry gets changed from that batch file command!
(By the way, before turning to NirCmd out of desperation, it originally said just "Regedit /S "PathToRegFile.reg").
The batch file and commands work correctly under 32-bit XP Pro, but none of those batch files that import reg files work under 64-bit Windows 7!
What's going on?
The .reg file is only changing keys under HKEY_USERS. Here's a sample:
Code:
Windows Registry Editor Version 5.00
[-HKEY_USERS\S-1-5-21-3499517676-2516875876-2438310748-1000\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.3g2]
[HKEY_USERS\S-1-5-21-3499517676-2516875876-2438310748-1000\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.3g2]
[HKEY_USERS\S-1-5-21-3499517676-2516875876-2438310748-1000\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.3g2\OpenWithProgids]
"VLC.3g2"=hex(0):
[HKEY_USERS\S-1-5-21-3499517676-2516875876-2438310748-1000\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.3g2\UserChoice]
"Progid"="VLC.3g2"
I'm running 64-bit Windows 7 SP1, and I've disabled UAC, and I run as Administrator, so that's not the problem.
But just in case, in the batch file I used NirSoft's NirCmd (http://www.nirsoft.net/utils/nircmd.html) to elevate the command level to run as System, as follows:
Code:
NirCmd.exe ElevateCommand RunAsSystem C:\Windows\Regedit.exe /S "PathToRegFile.reg"
But as I said, nothing in the registry gets changed from that batch file command!
(By the way, before turning to NirCmd out of desperation, it originally said just "Regedit /S "PathToRegFile.reg").
The batch file and commands work correctly under 32-bit XP Pro, but none of those batch files that import reg files work under 64-bit Windows 7!
What's going on?