Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Licensing Information Urgent please help!!

Status
Not open for further replies.
May 15, 2002
414
0
0
US
I've never had to do this but....I have a user that was recently upgraded to Win2k. When tracking changes in MS Office it is entering the wrong initials because whoever upgraded the computer entered the wrong name. I need to change the registration name. Can someone tell me how to do this? -Does that help ya?
 
Nevermind I found it!! Here it is for future reference incase you are curious.

Add the following code to a module.

Public Const HKEY_LOCAL_MACHINE = &H80000002

Declare Function RegCreateKey Lib _
"advapi32.dll" Alias "RegCreateKeyA" _
(ByVal Hkey As Long, ByVal lpSubKey As _
String, phkResult As Long) As Long

Declare Function RegCloseKey Lib _
"advapi32.dll" (ByVal Hkey As Long) As Long

Declare Function RegSetValueEx Lib _
"advapi32.dll" Alias "RegSetValueExA" _
(ByVal Hkey As Long, ByVal _
lpValueName As String, ByVal _
Reserved As Long, ByVal dwType _
As Long, lpData As Any, ByVal _
cbData As Long) As Long

Public Const REG_SZ = 1
Public Const REG_DWORD = 4

Public Sub savestring(Hkey As Long, strPath As String, _
strValue As String, strdata As String)
Dim keyhand As Long
Dim r As Long
r = RegCreateKey(Hkey, strPath, keyhand)
r = RegSetValueEx(keyhand, strValue, 0, _
REG_SZ, ByVal strdata, Len(strdata))
r = RegCloseKey(keyhand)
End Sub

Put a Commandbutton1 on form1 and add the following code:

Private Sub Command1_Click()

'Prompts for the new name of the Registered Organization
strOrganization$ = InputBox("Organisation:")
If strOrganization$ = "" Then
MsgBox "Empty String", vbCritical, "Error"
Exit Sub
End If

'Saves string (Organization) to the registry
Call savestring(HKEY_LOCAL_MACHINE, _
"Software\Microsoft\Windows\CurrentVersion", _
"RegisteredOrganization", strOrganization$)

'Prompts for the new name of the Registered Owner
strOwner$ = InputBox("Owner:")
If strOwner$ = "" Then
MsgBox "Empty String", vbCritical, "Error"
Exit Sub
End If

'Saves string (Owner) to the registry
Call savestring(HKEY_LOCAL_MACHINE, _
"Software\Microsoft\Windows\CurrentVersion", _
"RegisteredOwner", strOwner$)

End SubTo see the result go to Control Panel / System / General.

-Does that help ya?
 
with admin privilege
Open the registry editor using
start --> run
type there --> regedit
Choose
HKEY_LOCAL_MACHINE --> SOFTWARE -->MICROSOFT -->WINDOWS NT --> CURRENT VERSION
double clik on CURRENT VERSION
and choose "Registered Owner" from the menu at right..
Then you can rename the registered name..
That's all


"Let's meet where the continents meet"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top