Login script to edit user.dat file for Roaming Profile users
Posted on 2011-02-24
I need to edit the ntuser.dat file when a user logs in to my citrix/terminal server. Basically whats happening is the pointer for a new app we are running has the database location stored in the NTUSER.dat file.
I am using roaming profiles and have a bunch of users that have already logged in and got the settings for the first database location.
We have since added 2 more and when the user logs in they still only see 1 database. This is because they way the app is written it checks the ntuser.dat file in the user profile first.
If there is a pointer in there it just uses whats there. If there is no pointer in ntuser.dat/profile then it looks at the HKEY_LOCAL_MACHINE - software -section and pulls the info from there and then writes to the user profile.
I tried to go into regedit and load a hive from a user where the settings are located then tried to copy into the All Users hive but it didnt work. IM guessing becuase it is a roaming profile.
Any suggestions? I was thinking a login script would be the way to go but im not sure...Thanks for any help!