Hi David, thanks for your reply.
On 28/03/2010 4:11 p.m., David R. Cattley wrote:
Is it the same dialog on update that is displayed on install?
Yes.
And please be specific. Trying to guess what you mean by “OS security
system” and “install a driver from such-and-such” is not really very
helpful. The precise text of the message would be helpful. In particular,
distinguishing between a driver signing warning and a privilege escalation
request is quite important.
It doesn’t look like a signing warning. It’s not a UAC dialog.
The installer is running elevated.
The dialog details are:
Title: “Windows Security”.
Would you like to install this device software?
Name: Qbik New Zealand Limited Network Service
Publisher: Qbik New Zealand Limited
Always trust software from “Qbik New Zealand Limited”
There’s an icon showing an old win2k-style computer sharing icon
(computer on a hand).
Are you running your update process with elevated privilege?
yep
Regarding your update steps: I don’t know that what you are trying will not
work. I just know that in the situations where I have created installers
that update an NDIS Filter driver I have chosen to remove the old NetService
package prior to installing the new NetService package.
I tried this first, but it requires a reboot (I think due to the
characterstics of the driver itself - required driver) on uninstall, so
if you call Apply, then the install fails. I didn’t yet try using
another INetCfg object, or uninitializing and reinitializing it. We had
previously used netcfg.exe -u for the initial step, and that seemed to
work (except it left a copy of the old driver in the driver store). So
perhaps getting a new INetCfg object and initialising it for the install
phase would also work.
I tried not calling Apply in desperation, and it worked, so I can only
presume that the system is smart enough to combine the 2 requests before
applying.
I’m presuming therefore that this driver update case is seen by the OS
as an uninstall, and install (which is how it’s coded), and therefore
sees the install as a new driver, hence the warning.
Is it usual to see such a warning or does it indicate a signing problem?
I’m using a 64bit external app to do the install. It’s possible that it
doesn’t get the elevated privileges (since I don’t know that child
processes inherit that on Vista +).
I also found however I can get a 32bit app to install a driver on 2k8 R2
x64, simply by disabling file system redirection.
So this could be due to privilege level maybe due to the child process.
That means getting
all the way to ->Apply() to the NetCfg on remove before launching into
install. I also remove the INFs for both the NetService and Net (if this is
an NDIS IM Filter) after uninstall and before installing the new ones. I
stress that I am just sharing what I have found to work. I am not saying
that your sequence does not work. I just have never tried doing a ‘remove’,
cleanup INFs, ‘install’ new within the same NetCfg configuration update
(transaction).
Good Luck,
thanks!
Adrien de Croy
Dave Cattley
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@qbik.com
Sent: Saturday, March 27, 2010 8:56 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Updating drivers with SetupCopyOemInf and INetCfg
p.s.
I should clarify. It pops the dialog on install as well, but since this is
generally done by a human, it’s not a problem. The dialog is the OS
security system asking if the user really wants to install a driver from
such-and-such. It’s the update that’s the problem, since this is done by our
updater service with no desktop, and no human to click buttons.
Code-signing everything under the sun still doesn’t seem to help here.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
–
Adrien de Croy - WinGate Proxy Server - http://www.wingate.com