I am trying to install a printer on XP using an inf file,
however I have to change the following registry key
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\L PTENUM\
<DevID>\<HwId>\Device Parameters]
"PortName"="LPT1:"
to a different portname or else the installation of the
inf fails with the error "Error 1796: The specified port
is unknown" as we use a different parallel driver whose
portname is different to "LPT1:".
I have tried changing this value manually (via regedit)
to which the installation of the INF file is successful.
However the issue I have is that the installation needs
to be carried out unattended.
if I use the AddReg Directive as follows :
....
[<Manu>]
"My Module" = Printer_Driver,<DevId>
[Printer_Driver.NT]
..
.. etc
[Printer_Driver.NT.HW]
AddReg=PortChange_AddReg
[PortChange_AddReg]
HKR, "Device Parameters", "PortName",, "NewPort1:"
...
.. etc etc
<<<<<<<<<<<<<<
This doesn't seem to work though...and it still fails
with the same error. I have checked the registry value
and it remains at "LPT1:". Would there be any reason why
this directive doesn't work, when I can manually change
the value using regedit? The setupapi.log doesn't
indicate that the directive doesn't work.... in fact it
doesn't mention it at all...