phenob Posted July 22, 2005 Posted July 22, 2005 (edited) Hi all - long time ghost, first time post - I'm trying to find a simple way to copy the string data from one registry value to another in a different key. Been at this for hours.. gotta be missing something. It can't be this difficult..basically I'm trying to set the value of the ms office registered owner to be the same as the windows registered owner. I do not have control over the office installation which defaults to our company name.I've tried using reg query but it's too verbose, I need something that will return just the string in the value, nothing else. Or even better something that would just copy the data from one arbitrary registry value to another.Hopefully this makes some sense. Any advice? Thanks in advance.phnbedit* This is something I intend to stick into a batch for runoncex. Edited July 22, 2005 by phenob
phenob Posted July 22, 2005 Author Posted July 22, 2005 Here's what I've come up with to solve this. I'd love to see a simpler way if it exists. First reg query the windows registered organization value and dump it to a text filereg query "hklm\software\microsoft\windows nt\currentversion" /v registeredorganization > regorg.txt Then for loop through the verbosity in the text file and pull out our value data into an environment variablefor /f "skip=2 tokens=2*" %%a in (regorg.txt) do set regorg=%%b Finally set the ms office registered company value with our variablereg add "hklm\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\9040110900063D11C8EF10054038389C\InstallProperties" /v RegCompany /t REG_SZ /d "%regorg%" /fIf nothing else, hopefully this helps someone else out.phnb
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