Solved

Logon Script reg import key not working

Posted on 2010-08-19
7
2,320 Views
Last Modified: 2012-06-27
Hello,

I've created a batch logon script under GPO > User configuration
the batch contains:
reg import "%logonserver%\netlogon\Train\LoginScripts\IeWindowReuse.reg"

the *.reg contains:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"AllowWindowReuse"=dword:00000000

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\train\LoginScripts\Keyboard_Heb_EN.reg"
*.reg:
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"

it works fine and I do not need to manually run the *.reg file.
0
Comment
Question by:iNc0g
  • 3
  • 2
  • 2
7 Comments
 
LVL 16

Expert Comment

by:PaciB
Comment Utility
Hi,

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
0
 

Author Comment

by:iNc0g
Comment Utility
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.
0
 
LVL 16

Expert Comment

by:PaciB
Comment Utility
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 !
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:iNc0g
Comment Utility
There you go :-)
IeWindowReuse.reg
0
 
LVL 26

Expert Comment

by:pony10us
Comment Utility
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: http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_23237322.html
0
 

Author Comment

by:iNc0g
Comment Utility
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\Software\Microsoft\Internet Explorer\Main]
"AllowWindowReuse"=dword:00000000

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"

Open in new window

0
 
LVL 26

Accepted Solution

by:
pony10us earned 500 total points
Comment Utility
Just a thought but have you tried using regedit instead of reg import as shown in this post taken from http://forums.devshed.com/windows-help-34/windows-startup-scripts-99970.html?

PartieHonteuse  

Contributing User
   Join Date: Apr 2003
Location: Kzoo, Michigan
Posts: 37  
Time spent in forums: < 1 sec
Reputation Power: 8
   
 
Well the way I have found is to make a batch file to call regedit and have regedit insert a registry entry into the registry. Something like so...


--start startup.bat--

@echo off
cls
REGEDIT /S regtweak.reg
goto EOF
:EOF

--end startup.bat--



--start regtweak.reg--

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"AllowWindowReuse"=dword:00000000

--end regtweak.reg--

**Notes**
dword:00000000 = New Window
dword:00000001 = existing window
Also, regtweak.reg and startup.bat have to be in the same directory for it to work or else at the REGEDIT /S line you will have to enter the path to the registry script if in a different directory than the batch file.

I'm only assuming that you are running a domain so you can create a GPO and link it to that logon script for all 400 pc's.

Good luck!
__________________
"I dislike duals. If a man were to challenege me to a dual, i'd lead him lovingly and forgivingly to a quiet place, and kill him" ~Mark Twain

--------------------------------------------------------------------------------
 
 
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Resolve DNS query failed errors for Exchange
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now