scythe666 Posted May 17, 2012 Share Posted May 17, 2012 Hi all, Can anyone help me to write a script to copy one registry value into another registry key on the same device? I'd like to copy the value from: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser" To: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName" Any help would be greatly appreciated. Many thanks. Link to comment Share on other sites More sharing options...
Tripredacus Posted May 17, 2012 Share Posted May 17, 2012 Did you try the example in the help file? $var = RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion", "ProgramFilesDir") RegWrite("HKEY_CURRENT_USERSoftwareTest", "TestKey", "REG_SZ", $var) Obviously change from the example keys. Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
scythe666 Posted May 17, 2012 Author Share Posted May 17, 2012 Now that just shows how new I am to this. I thought those were two separate examples. Thanks very much Tripredacus. I'll give that a try and let you know how I get on. Link to comment Share on other sites More sharing options...
scythe666 Posted May 17, 2012 Author Share Posted May 17, 2012 Tripredacus.... Huge thanks. That worked perfectly. I'll read the help file properly in future!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now