iNc0g
asked on
Logon Script reg import key not working
Hello,
I've created a batch logon script under GPO > User configuration
the batch contains:
reg import "%logonserver%\netlogon\Tr ain\LoginS cripts\IeW indowReuse .reg"
the *.reg contains:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Softwar e\Microsof t\Internet Explorer\Main]
"AllowWindowReuse"=dword:0 0000000
When running the batch from a workstation (w/o admin rights)
I receive a msg that the Operation was completed Successfully but whem I look in the regedit I see the key hasn't been added.
If I manually run the *.reg file from the same location it does add it.
If I run another batch from the same workstation, same user:
reg import "%logonserver%\netlogon\tr ain\LoginS cripts\Key board_Heb_ EN.reg"
*.reg:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Keyboar d Layout]
[HKEY_CURRENT_USER\Keyboar d Layout\IMEtoggle]
[HKEY_CURRENT_USER\Keyboar d Layout\IMEtoggle\scancode]
[HKEY_CURRENT_USER\Keyboar d Layout\Preload]
"1"="00000409"
"2"="0000040d"
[HKEY_CURRENT_USER\Keyboar d Layout\Substitutes]
"d000040d"="00000409"
[HKEY_CURRENT_USER\Keyboar d Layout\Toggle]
"Hotkey"="1"
"Language Hotkey"="1"
"Layout Hotkey"="2"
it works fine and I do not need to manually run the *.reg file.
I've created a batch logon script under GPO > User configuration
the batch contains:
reg import "%logonserver%\netlogon\Tr
the *.reg contains:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Softwar
"AllowWindowReuse"=dword:0
When running the batch from a workstation (w/o admin rights)
I receive a msg that the Operation was completed Successfully but whem I look in the regedit I see the key hasn't been added.
If I manually run the *.reg file from the same location it does add it.
If I run another batch from the same workstation, same user:
reg import "%logonserver%\netlogon\tr
*.reg:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Keyboar
[HKEY_CURRENT_USER\Keyboar
[HKEY_CURRENT_USER\Keyboar
[HKEY_CURRENT_USER\Keyboar
"1"="00000409"
"2"="0000040d"
[HKEY_CURRENT_USER\Keyboar
"d000040d"="00000409"
[HKEY_CURRENT_USER\Keyboar
"Hotkey"="1"
"Language Hotkey"="1"
"Layout Hotkey"="2"
it works fine and I do not need to manually run the *.reg file.
ASKER
I wrote that when I manually run the regfile it works, only when I run the batch file (reg import command) it says it's successful but does not add the key to the registry.
Yes.... but when you run the regfile you implicitely use "REGEDIT" instead of REG.EXE.
That's why I wonder if some not visible char in the file could provocate a failure of REG.EXE. May be that REGEDIT is not sensitive to this bad char !??
That's why I suggested you to post the REG file so that we could try by ourselves and reproduce the same problem.... It would not have take you a lot of time !
That's why I wonder if some not visible char in the file could provocate a failure of REG.EXE. May be that REGEDIT is not sensitive to this bad char !??
That's why I suggested you to post the REG file so that we could try by ourselves and reproduce the same problem.... It would not have take you a lot of time !
ASKER
There you go :-)
IeWindowReuse.reg
IeWindowReuse.reg
A was a thread a couple of years ago, not exact but similar to this. You could read through it to see if anything helps: https://www.experts-exchange.com/questions/23237322/Batch-file-to-edit-registry.html
ASKER
Still can't figure this out..
When running the batch to add a different key:
with the same command
"reg import" it works.
Adding the:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Softwar e\Microsof t\Internet Explorer\Main]
"AllowWindowReuse"=dword:0 0000000
Does not.
When running the batch to add a different key:
with the same command
"reg import" it works.
Adding the:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Softwar
"AllowWindowReuse"=dword:0
Does not.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Keyboard Layout]
[HKEY_CURRENT_USER\Keyboard Layout\IMEtoggle]
[HKEY_CURRENT_USER\Keyboard Layout\IMEtoggle\scancode]
[HKEY_CURRENT_USER\Keyboard Layout\Preload]
"1"="00000409"
"2"="0000040d"
[HKEY_CURRENT_USER\Keyboard Layout\Substitutes]
"d000040d"="00000409"
[HKEY_CURRENT_USER\Keyboard Layout\Toggle]
"Hotkey"="1"
"Language Hotkey"="1"
"Layout Hotkey"="2"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you verify that no any special not visible char is present in the reg file ?
Can you join the reg file as it is to this post ?
Have a good day