Link to home
Start Free TrialLog in
Avatar of flexxxx
flexxxx

asked on

Export of autoadmin logon settings in registry for migration

I am looking to export only the 4 entries for autoadminlogon for a scripted migration process.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="My User Name"
"DefaultPassword"="My Password"
"DefaultDomainName"="My domain"
"AutoAdminLogon"="1"

What is the best way of preserving this information so that it can be re-applied after re-imaging the workstation ?

Any help would be greatly appreciated !!!!!

Andre
Avatar of Nirmal Sharma
Nirmal Sharma
Flag of United States of America image

>>>What is the best way of preserving this information so that it can be re-applied after re-imaging the workstation ?

There are many ways: -

Using Registry Editor.
Using Reg.exe or Regini.exe
Please see this: -
http://www.windowsitlibrary.com/Content/237/2.html

And then how will you distribute changes: -
http://www.windowsitpro.com/Windows/Articles/ArticleID/20047/pg/2/2.html

***Quote***
Distributing Registration Files

A quick way to create a .reg file for distribution is to use regedit to export a key (or multiple keys), then use the resulting .reg file (or files). To export a key, select the key and choose Registry, Export Registry File. In the Export Registry File dialog box, enter a name and select a folder for the export file. Windows automatically adds the .reg extension. You can interactively change the registry settings on one computer, then export the key and use the export file as is, or you can export the key, then manually edit it. To edit a .reg file, don't double-click the file; instead, right-click and choose Edit from the shortcut menu. The file opens in Notepad. If you want to make registry changes in multiple keys, open each .reg file, paste the files' contents into one Notepad document, then save that document with a .reg extension.

You can distribute .reg files in any convenient manner. Attach the .reg file to an email message, add the appropriate command to a logon script, or use any other method you're comfortable with.

***End Quote***

This also: -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnw2kmag01/html/distributingregistrychanges.asp

Let me know.

Thanks
SystmProg
Or....If you can follow the steps: -

1. Point the cursor to Winlogon key and then export it to a file named "AutoLogon.reg".
2. Edit AutoLogon.reg file in Notepad only and note in Wordpad or Winword.
3. Remove the unnecessary lines from registry or leave it as it is because all workstation clients have the same settings untill or unless you specify you edit this file to change something.
4. And then save > put this file in a batch file > process through Group Policy.

Does it make sense ?

Thanks
SystmProg
Avatar of flexxxx
flexxxx

ASKER

I am trying to capture the settings automatically by a script - storing it back to a server - then applying it by scripting after re-imaging and minisetup. I have all the scripting in place, but I am looking for the spesifics to export single values and not the whole key.

Each workstation could have a different logon. Instead of taking the whole Winlogon key, could I export just the 4 entries, or do I have to use the whole key ??

I havent really looked closely at this key before - is it the same on all default installed windows 2000 systems ??

Thanks Again !!!

>>>Each workstation could have a different logon. Instead of taking the whole Winlogon key, could I export just the 4 entries, or do I have to use the whole key ??

Nothing will happen if you export the whole and then deleting the part which is not required.

Yes it is same on all.
Avatar of flexxxx

ASKER

Is there a applet which will delete what is not needed in the reg file - this is a fully automated rebuild and there would be no way to manually manipulate the file.

Is there a way to export winlogon without the sub keys ??

Can "Value Name" and "Value data can" be exported without taking the whole key ?



 
Hi,

>>>Is there a applet which will delete what is not needed in the reg file - this is a fully automated rebuild and there would be no way to manually manipulate the file.

Why are you so scared of editing the registry file...........When you export registry from Registry editor it will export all the key and values in a REG file. This REG file can be edited easily and doing cut and paste is also easy. Here is an examle for your requirement: -

So this is the File i Exported from My Computer: -

I cut and paste from here: -

********From Here**************

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="My User Name"
"DefaultPassword"="My Password"
"DefaultDomainName"="My domain"
"AutoAdminLogon"="1"

********Upto here************

1. I open notepad.exe, cut and paste the above and save this file to "Winlogon.reg".
2. Next i change something in this file and run in my computer to make sure changes are happening.
3. and then run it using Group Policy via Batch file.

Let me know.

Thanks
SystmProg
Avatar of flexxxx

ASKER

Hi,

It's not that I am scared to edit the reg file, it is that I cant manually manipulate any files during this fully automated rebuild.

In a nutshell, here is what is happening - fully automated with ghost/scripting:

1. System is up and sunning - on the domain wiht autologon enabled.
2. A new version of the software pacakage with a new base image is available for distibution to a set of clinical workstations.
3. The scripts will capture settings like - computer name, domain name, logged on user, autologon settings, IE settings etc and store them back on the server.
4. The workstaiton is re-imaged - sysprep file is edited by the script and injected in after imaging to retain computer name and domain.
5. Mini setup completes - software is copied down and installed - AUTO LOGON set back to the user it originally had
6. Workstation reboots logs on as the user (original autologon) settings are reapplied -  and launches the application - all settings are the same as before the upgrade.

I know I can export the whole winlogon key and apply that, but I would like to just transfer The following:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="My User Name"
"DefaultPassword"="My Password"
"DefaultDomainName"="My domain"
"AutoAdminLogon"="1"

without copying the wholy winlogon key and sub keys.

This whole process is automated and every workstation could have a different logon name.

Any way to just export the above mentioned on the fly ????

Thanks,

Andre

>>>It's not that I am scared to edit the reg file, it is that I cant manually manipulate any files during this fully automated rebuild.

Eh.?? sorry couldn't catch on the right time :-). So the problem is here...ok please confirm once again because i need to write a short script using regini.exe or other registry editors.

You want to export above values from the key automatically.
Then you will import above values in workstations automatically.

Let me know.

Thanks for letting me know.
SystmProg
Avatar of flexxxx

ASKER

That is correct.

My script runs to capture the system settings - including autologon. I would need to export the values back to the server on the build share (each workstation has its own subfolder) as autologon.REG.

Later on in the rebuild, this regfile will be added by the script to complete the setup and configuration.

Thanks for all the help !!!!!!
Avatar of flexxxx

ASKER

Any progress on the registry export of just certain values and datavalues (not the whole key) or is this something that cannot be done ??

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="My User Name"
"DefaultPassword"="My Password"
"DefaultDomainName"="My domain"
"AutoAdminLogon"="1"

Please wait...got some work....will post today with a script.

Thanks
Avatar of flexxxx

ASKER

COOL ...... THANKS !!!!!!

Avatar of flexxxx

ASKER

Any progress on the registry export of just certain values and datavalues (not the whole key) or is this something that cannot be done ??

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="My User Name"
"DefaultPassword"="My Password"
"DefaultDomainName"="My domain"
"AutoAdminLogon"="1"
I am out of office till this saturday. I will post in next 24 hours.

Thanks
Avatar of flexxxx

ASKER

Any progress on the registry export of just certain values and datavalues (not the whole key) or is this something that cannot be done ??

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="My User Name"
"DefaultPassword"="My Password"
"DefaultDomainName"="My domain"
"AutoAdminLogon"="1"



By now I assume that this is not possible to do anymore.
Avatar of flexxxx

ASKER

By now I assume that this is not possible to do anymore.
Ah!...I really forgot about the question at all.

Sorry...would you like to continue on the same?

Thanks
Avatar of flexxxx

ASKER

No need to continue as I have solved the issue (see below for code)



REGEDIT /E O:\migdata\%cpdir%\%computername%\TempLogon.REG "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

echo Windows Registry Editor Version 5.00 > O:\migdata\%cpdir%\%computername%\autologon.reg

echo [HKEY_LOCAL_MACHINE\software\microsoft\windows nt\currentversion\winlogon] >> O:\migdata\%cpdir%\%computername%\autologon.reg

find /i "Default" < O:\migdata\%cpdir%\%computername%\TempLogon.REG >> O:\migdata\%cpdir%\%computername%\Autologon.reg

find /i "autoadmin" < O:\migdata\%cpdir%\%computername%\TempLogon.REG >> O:\migdata\%cpdir%\%computername%\Autologon.reg



ASKER CERTIFIED SOLUTION
Avatar of Lunchy
Lunchy
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial