S
steves
Hello all,
I am componentizing a number of USB printer drivers (HP Laserjets) and
I want the printers to respond automatically to plug and play when
connected
I have found (after much searching) that I can get the drivers to
successfully install using the "Automatically Detect and install my
Plug and Play printer" with no prompting, if I do the following:
a) Copy the files from the HP install CD folders English\Drivers\*.*
onto the target at a given folder, for example:
C:\Drivers\HPLJ_1022.
b) Update the "DevicePath" registry Key, which is found at
[HKLM\Software\Microsoft\Windows\CurrentVersion]
; "DevicePath"="%SystemRoot%\Inf" <- (Default, before editing)
; After Editing:
"DevicePath"="%SystemRoot%\inf;%SystemDrive%\Drivers\HPLJ_1022"
So far so good.
Now I'm trying to componentize this, so
For a) I set the component "Files" resources path to
"%24%\Drivers\HPLJ_1022"
QUESTION 1: Predefined environment variable %24% is "Boot Drive", is
there a better one to use that equates to "%SystemDrive%"??? "%30%??
For b) I add a registry data to the component, and set the "Advanced"
write options to "Always Edit the value", but I find that after
building the actual registry value only contains %SystemDrive%\INF. (I
did not change the default build order).
QUESTION 2: Is there a way that I can have each printer have it's own
component with a single "RegistryData" resource that ADDS a new value
to this RegExpand_SZ value?
I am componentizing a number of USB printer drivers (HP Laserjets) and
I want the printers to respond automatically to plug and play when
connected
I have found (after much searching) that I can get the drivers to
successfully install using the "Automatically Detect and install my
Plug and Play printer" with no prompting, if I do the following:
a) Copy the files from the HP install CD folders English\Drivers\*.*
onto the target at a given folder, for example:
C:\Drivers\HPLJ_1022.
b) Update the "DevicePath" registry Key, which is found at
[HKLM\Software\Microsoft\Windows\CurrentVersion]
; "DevicePath"="%SystemRoot%\Inf" <- (Default, before editing)
; After Editing:
"DevicePath"="%SystemRoot%\inf;%SystemDrive%\Drivers\HPLJ_1022"
So far so good.
Now I'm trying to componentize this, so
For a) I set the component "Files" resources path to
"%24%\Drivers\HPLJ_1022"
QUESTION 1: Predefined environment variable %24% is "Boot Drive", is
there a better one to use that equates to "%SystemDrive%"??? "%30%??
For b) I add a registry data to the component, and set the "Advanced"
write options to "Always Edit the value", but I find that after
building the actual registry value only contains %SystemDrive%\INF. (I
did not change the default build order).
QUESTION 2: Is there a way that I can have each printer have it's own
component with a single "RegistryData" resource that ADDS a new value
to this RegExpand_SZ value?