disable online driver search on windows 7 programatically - winapi

I am working on a program that requires to install a driver for Plug and Play. My issue is that the first time the device plugs into, by default, windows 7 32-bit automatically search online for drivers that better match to device. As i observe, it takes too long (15m) to correctly install the driver.
How can i turn off the automatic search on windows 7?
Thank you for any useful information.

Apparently you do this through GPO, as described here:
http://www.verboon.info/index.php/2010/12/windows-7-device-installation-without-administrative-rights/
Look for "Prevent Clients from searching for drivers on Windows Update" on this page.
Read up on applying GPO programatically and you should probably be able to get the job done. However, mind that you'd be changing the policy for the whole system, not just installation of this device.

If you install a driver package for your driver before you insert it, Windows will not search online.
If you really want to disable online serach on your machine - take a look here.

Related

Appropriate Windows Hardware Lab Kit Selections in Device manager for a WFP driver

What device manager selections in Windows Hardware Lab Kit (HLK) I should use for setting up WHQL for a windows filtering platform driver?
When I build my project in HLK I see many options in the Select (device manager) section and I'm unsure of how to proceed. Am I missing some additional file I'd load in to provide a WFP option? I see I can load in test playlists but before I do that I must first select something in this area.
Microsoft docs don't seem to cover this for WFP. Before I go back to the developers, I'd like to have a good idea what it is I'm looking for.
Do you know of good documents or references on this?
Thanks
The UI for HLK studio can be challenging.
In selection, do not choose device manager as this is for hardware. Instead, select software device. Provided you installed your driver prior to installing the client, you should see it.

Driver working issue

my Battery driver is working on 64 bit , but is not working on 32 bit. Platform is windows.
I am not able to come to any conclusion. What could be the possibilities?
If the driver is available for windows x64, normaly it must be available for x86 also. So you should search for the driver. Most of the drivers can be installed by windows update without installing manually a driver, so start search the update. Also i think you dont need a driver for the battery or is there a special reason for? The laptop battery drivers / softwares often only install a power plan which also can be configured manually if you dont want to use the microsoft standard plans. greats

Old 16-bit Application Causing GPF in WIN87EM.DLL, intermittently

I've got an old 16-bit application, that was developed for Windows 3.1. It preforms some calculations and is part of a more complex system. The system sets up the inputs for the program, and collects the output results.
Unfortunately, the 16-bit program is here to stay for the mean time, so we have to work around the frustrations it causes on modern operating systems.
The system runs on Windows XP, and on physical Windows XP machines it runs alright. The machine I'm having a problem with, is a Windows XP instance running on VirtualBox (version 4.1.12) on a Debian box. The physical computer is an HP Proliant server, with Quad Core Xeon 3.4 Ghz. I'm using remote desktop to access the computer from my Windows 7 box.
The error I'm getting is, "PROGRAM caused a General Protection Fault in WIN87EM.DLL at address : 0001:02C9". The annoying thing is, at times it works and other times it doesn't, making troubleshooting all that more frustrating.
From trawling the internet, I've come across a few sites that mention the same problem. None of them seem to offer real solutions, except to say that WIN87EM.DLL supplies floating point routines, and has some issues with certain printers.
I've uninstalled all printers on the virtual machine, I've also tried installing a PDF writer and setting it as the default printer - so that there is a printer on the machine. I've disabled resource sharing with my Remote Desktop connection. I've updated the Virtual Machine Guest drivers on the machine. I've also tried setting the compatibility to Windows 95 in the properties of the executable.
Any pointers for troubleshooting this problem, or methods I could try to get it working?
This question is old but I had this exact win87em.dll crash with some 16-bit factory automation software running natively on windows 7. By following the method of HIDE87.com and editing autoexec.nt I was able to make the software stop crashing so that I could make edits.
This machine was running Intel 8 Series/C220 Series chips. I attribute this configuration to the crash because I have used this same 16-bit software on tons of other windows 7 machines for years now.
edit: here's the steps I used to fix the problem
Download winfloat.exe from http://www.conradshome.com/win31/archive/
Open winfloat.exe with 7zip. Find HIDE87.com and extract it to desktop.
Copy HIDE87.com to C:\Windows\System32\
Open c:\windows\system32\autoexec.nt with notepad
At top of file, after first group of comments add the following
lh %SystemRoot%\system32\HIDE87.com
Add a comment above your last line
REM Fix for Gen. Protection Fault in win87em.dll
Save changes to autoexec.nt and reboot pc.
This was the same error I had with Microsoft XP Mode.
Obviously WIN87EM.DLL has Problems with virtualized processors.
My Solution: I "unloaded" the XP-Version of WIN87EM.DLL in the registry (search and delete every item with this name), and copied a much older version into application folder. The old version can be found her: http://support.microsoft.com/kb/86869/de
Good luck!
Video Driver win87em.dll
This is the step by step resolution to the problem we had with the “win87em.dll” issue.
Left-Click the START button in the bottom left corner of the screen.
Right-Click My Computer and left click Properties.
Left-Click the tab at the top that says Hardware
Left-Click the button that says Device Manager.
Left-Click the + sign next to Display Adapters near the top of the list.
Right-Click the items shown in the expanded list under Display Adapters and left-click Disable.
Left-Click the Yes button that shows when windows asks if you are sure you want to disable it.
Left-Click the No button when windows asks if you want to reboot.
Repeat the disable process for each item listed under Display Adapters (usually only one or two)
Reboot the PC and the win87em.dll General Protection Fault errors should go away.
This is only applicable for users on Windows XP. Most likely the display adapters listed will be shown as an Intel G41 internal display adapter, but it may be another Intel device. If this does not fix the issue then it is likely a bad printer driver causing the problem.
Disabling the video adapter will not hurt windows. It will make their computer unable to watch videos or play 3D games, but windows will still run and look fine. (They will probably need to change their screen resolution after rebooting.)
VirtualBox 4.3.16 should also have a fix. See https://www.virtualbox.org/ticket/12646 If you want the fix immediately, you'll have to build VirtualBox from OSE sources.
Update: VirtualBox 4.3.16 containing this fix is now officially released.
I know this is an old thread but I came across it while searching as I was having the same issue under Windows XP running VirtualBox. Eventually I found the following:
https://communities.vmware.com/people/jmattson/blog/2012/03
This is for VMWare and seems to have fixed the issue, couldn't find anything similar for VirtualBox but as VMWare Player is free it is a good workaround for anyone having this problem.
in the case of virtual machines - vxBOX (tested) of VM ware (maybe)
you just have to switch off all para virtualization options in the processors section of VX BOX options.
works like magic!

Finding the graphics card device ID without drivers installed

I need to create an automated process in which a script detects the graphics card type on first boot, then installs the appropriate drivers, which will be included in the image, before performing the next steps. The target platform is Win XP Pro.
I came across some WMI code which can get hardware information but since it uses a PNPSignedDriver class I would presume that it requires drivers to be installed before it can detect the device.
I can't use devcon, as it isn't redistributable. Am I right in assuming that WMI cannot help me here, and if so what are my other options?
Thanks,
Bill.
WMI does seem to be the way to do this, as found here. I will confirm after testing.
EDIT - Not sure if this is possible, WMI can only get the name of the display adapter not the device ID of the card, and before the drivers are installed this is something generic like "Video Controller (VGA)". I will update this page if I find a way.

Installing a driver using Inno Setup

I'm creating setup for my application in Inno Setup, and I will probably need to install driver sometime in the future. However, I need to know some tips about installing drivers in Inno Setup now, so I can easily add the driver into the setup when it's needed.
Should I force the user to install program only into C:\Program Files\<app>\, or it doesn't matter and I should let him install it even on network drive?
Should I install the driver in C:\Windows\, to make it available anytime (even without network drive), or it doesn't matter as well?
Is it possible to start driver on-demand? I want to release new versions of my program, and I need to create the setup so it doesn't require reboot after updating my app. So is it possible to shutdown the driver, overwrite it with new version, and turn on again (as you can with services) without restarting Windows?
Is it possible to overwrite the driver so easily (as mentioned in question 3), or is it recommended to always fully uninstall the program, and then again install the new version?
Could you please include some additional tips about installing/uninstalling/updating drivers you find important? I'm sure I've missed some important points.
I don't have much driver-experience nor knowledge, so I apologize for somewhat confused questions.
And it is probably important what kind of driver would it be, so there is a related question, which should answer that:
Low level mouse hook and DirectX
Driver Development Resources
I've found some helpful links regarding driver development. Use this as a reference.
Driver Development at CodeProject - Part 1, Part 2, Part 3, Part 4, Part 5, Part 6
http://www.catch22.net/tuts/kernel1.asp
Introduction to Device Drivers
Windows Driver Development Tutorial
Please don't do this, installing an upper-level filter driver on all HID devices is an extraordinarily bad idea. That being said, I'll answer your questions anyways.
When you install a driver, Windows manages where the driver itself gets put (in DriverStore), you don't worry about this.
See #1
For some drivers, yes. For a filter driver above HID, no. You'd have to force remove all mice and keyboards on their system and re-add them (which isn't possible with PS/2 devices).
Yes, it's fairly easy to update a driver given that you correctly version it and require a reboot.
Once again, while I don't want to be discouraging, you're only going to get yourself in a world of hurt via doing this.

Resources