New
#1
How to programmatically change COM port FriendlyName
I have an installation script that changes the COM port numbers based on certain hardware that is installed. In Windows 2000, I use regini.exe to import the listing of registry entries below. The reason for this was to allow the permissions on the FriendlyName value to be changed.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\PNP0501\1
Device Parameters
PortName = COM5
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports
COM5: = "9600,n,8,1"
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports
COM1: = Delete
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\PNP0501\1 [7]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\PNP0501\1
FriendlyName = Communications Port (COM5)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\PNP0501\1 [8 17]
I tried this same process in Windows 7 and everything works except for changing the FriendlyName value. The only way I've been able to change this value is to manually (in regedit) "take ownership" of the "1" key and then change the permissions to Full Control. However, I need to do this in a script to make it transparent to the user.
Any help would be greatly appreciated,
Rich