installer question

Hi

is there any possibility to install MS signed PnP drivers without having
admin rights ?
As stated in the Win2K Pro resource kit:

A cabinet (.cab) file is a compressed file that contains other
distribution files, such as drivers and system files. Drivers are placed
in a single .cab file on the Windows 2000 operating system CD. This driver
.cab is used by both Setup and other system components that need to
install drivers. The .cab file contains approximately 3000 files and is
installed at:
%windir%\Driver Cache<platform>\driver.cab
The list of files is in Drvindex.inf. To view the .cab file, use Windows
Explorer.
The benefits of using a .cab file include the following:

- Does not require administrators to use a Setup CD to install new devices
on the computer.

- Does not require you to log on with local admin rights to install new
hardware as long as the device is present in the .cab file and digitally
signed. You can override this by deleting the .cab file from the drive.

Is there any official way to create such a .cab file, or any other method
that would let a normal user to install the drivers without having admin
rights ?

thanks
horatiu guja

> is there any possibility to install MS signed PnP drivers without
having

admin rights ?

Yes, if the installation has no UI and does not do several other
things which will require client-side install.

Read about “client-side” and “server-side” install in the DDK chapter
on Device Installation.

In a few words - server-side install is done by PnP service only,
without any apps, and without any logged-on user.
Client-side install is chosen if server-side is unable to proceed (due
to lack of digital signature, due to UI in the installation and some
other cases), is done by special app executed as a child process of
Explorer, and requires the admin to log on.

Max

Hi Max

what you said is not quite true … or I’m missing something. Here is what
stays in the DDK.

Server-side Installations
A server-side installation is a device installation that can be handled
entirely by the system’s user-mode and kernel-mode PnP Manager components. A
server-side installation can occur only if:

  • The device can be detected by a bus driver, which then must notify the PnP
    Manager.
  • The PnP Manager can find an INF file containing a hardware ID that matches
    that of the device.
  • The device’s INF file and drivers are signed (see Driver Signing).
  • SetupAPI can locate all of the device’s drivers without prompting the user
    for media locations. (This means the drivers are included “in-box” with the
    operating system, a vendor-supplied driver was previously installed, or
    vendor-supplied driver files have been “pre-installed” so SetupAPI can
    locate them during the actual installation (see Pre-installing Driver
    Files).
  • The device’s class installer and co-installers do not display property
    pages at the end of the installation operation.
  • The device’s INF file has not marked the device as requiring an
    interactive installation (by specifying InteractiveInstall in an INF
    ControlFlags section).
    RunOnce registry entries consist only of calls to rundll32.exe.
    Server-side installations do not display any user interface and do not
    require an administrator to be logged on. (The term “server-side” is used
    because installation can be accomplished by the system’s PnP Manager without
    a user-mode “client” making calls into the PnP Manager.)

and at the Pre-installing Driver Files:

Pre-installing Driver Files
To pre-install driver files, your device installation application should
follow these steps:

On the target system, create a directory for the driver files. If your
device installation application installs an application, the driver files
should be stored in a subdirectory of the application directory.
Copy all files in the driver package from the distribution media to the
directory created in Step 1. The driver package includes the driver or
drivers, the INF file, the catalog file, and so forth.
Call SetupCopyOEMInf (described in Platform SDK documentation), specifying
the INF file in the directory created in Step 1. Specify SPOST_PATH for the
OEMSourceMediaType parameter and specify NULL for the OEMSourceMediaLocation
parameter. SetupCopyOEMInf copies the INF file for the driver package into
the %windir%\Inf directory on the target system and directs SetupAPI to
store the source location of the INF file in its list of preprocessed INF
files. SetupCopyOEMInf also processes the catalog file, so the PnP Manager
will install the driver the next time it recognizes a device listed in the
INF file.
When the user plugs in the device, the PnP Manager recognizes the device,
finds the INF file copied by SetupCopyOEMInf, and installs the drivers
copied in Step 2. (For more information about copying INF files, see Copying
INFs.)

Beacuse a normal User has only Read and Execute rights for the Inf directory
running an install program that calls SetupCopyOEMInf as a normal user will
fail, although the drivers are signed. I would expect at least if the
drivers are signed that the the function to execute in this case in an admin
context and install the drivers …which is not the case.

I chaged the access rights of the Inf directory so that an ordinary user
cann have full rights then run an application calling the SetupCopyOEMInf in
an ordinary user context . I had the surprise to get the warning that the
drivers are not signed , but the drivers are signed !!! Running the same
application in admin context I get no warning :0) … probably an XP bug. ?

regards
horatiu guja

> is there any possibility to install MS signed PnP drivers without
having
> admin rights ?

Yes, if the installation has no UI and does not do several other
things which will require client-side install.

Read about “client-side” and “server-side” install in the DDK chapter
on Device Installation.

In a few words - server-side install is done by PnP service only,
without any apps, and without any logged-on user.
Client-side install is chosen if server-side is unable to proceed (due
to lack of digital signature, due to UI in the installation and some
other cases), is done by special app executed as a child process of
Explorer, and requires the admin to log on.

Max


You are currently subscribed to ntdev as: xxxxx@intech.ro
To unsubscribe send a blank email to %%email.unsub%%

> Beacuse a normal User has only Read and Execute rights for the Inf
directory

running an install program that calls SetupCopyOEMInf as a normal
user will

Why you need running an install program? Maybe let PnP install the
drivers, without any SetupCopyOEMInf?

Max

If you don’t use the SetupCopyOEMInf you get the Detected New Hardware
Dialog Box which is an UI and you"re on the client-side install scenario.
And here you need admin rights.

horatiu

> Beacuse a normal User has only Read and Execute rights for the Inf
directory
> running an install program that calls SetupCopyOEMInf as a normal
user will

Why you need running an install program? Maybe let PnP install the
drivers, without any SetupCopyOEMInf?

Max


You are currently subscribed to ntdev as: xxxxx@intech.ro
To unsubscribe send a blank email to %%email.unsub%%

Then something is wrong in your INFs or such.

For instance, when I plug the DV camera to a 1394 card on a fresh XP
install, it installs the package of 68xxx+AVC+MSDV automatically by
server-side install, without bothering the user.

Max

----- Original Message -----
From: “horatiu guja”
To: “NT Developers Interest List”
Sent: Monday, December 02, 2002 6:28 PM
Subject: [ntdev] Re: installer question

> If you don’t use the SetupCopyOEMInf you get the Detected New
Hardware
> Dialog Box which is an UI and you"re on the client-side install
scenario.
> And here you need admin rights.
>
> horatiu
>
>
> > > Beacuse a normal User has only Read and Execute rights for the
Inf
> > directory
> > > running an install program that calls SetupCopyOEMInf as a
normal
> > user will
> >
> > Why you need running an install program? Maybe let PnP install the
> > drivers, without any SetupCopyOEMInf?
> >
> > Max
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@intech.ro
> > To unsubscribe send a blank email to %%email.unsub%%
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>