?
Solved

Logon Script reg import key not working

Posted on 2010-08-19
7
Medium Priority
?
2,430 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 16

Expert Comment

by:Bruno PACI
ID: 33473087
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
ID: 33473328
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:Bruno PACI
ID: 33473593
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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

Author Comment

by:iNc0g
ID: 33474007
There you go :-)
IeWindowReuse.reg
0
 
LVL 26

Expert Comment

by:pony10us
ID: 33475691
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
ID: 33520175
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 2000 total points
ID: 33568204
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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

800 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