- Vista delete USB registry keys
- Posted by barry@canalrun.com on February 8th, 2007
Hello,
We are testing our install script and install documentation. The
install includes a USB device with unsigned drivers (so you get all
the warning dialogs).
We install/uninstall over and over. We need to clean the registry keys
for the USB device so when it is plugged in Vista goes through the
install usb driver process.
In XP I could just change permissions then delete the key. In Vista it
won't let me change permissions.
I am logged in as top-bannana Administrator. I use Regedit from a cmd
dialog. This is Vista Home Premium (X64, I believe) on an HP laptop.
Should I be using a different registry editor? I saw something about
taking ownership? Could some of the Norton type crap that HP includes
with its laptops be causing the problem.
Thanks,
Barry.
- Posted by Vetzak on February 8th, 2007
On 8 feb, 16:44, "b...@canalrun.com" <b...@canalrun.com> wrote:
I remember WinXP homer edition didn't give me sufficient admin rights
at some point so I replaced it with XP prof. Maybe this situation
remains the same with Vista home.
- Posted by David J. Craig on February 8th, 2007
Read the newsgroups. This has been answered. Those keys are 'off-limits'
in Vista. Use Ghost to restore the drive.
"Vetzak" <ptrshrn@gmail.com> wrote in message
news:1170951260.025931.36030@h3g2000cwc.googlegrou ps.com...
- Posted by chris.aseltine@gmail.com on February 8th, 2007
On Feb 8, 9:44 am, "b...@canalrun.com" <b...@canalrun.com> wrote:
If you are trying to uninstall devices, the proper way is to use the
SetupDiXxx() functions. Enum\USB is read-only in Vista, even for
Administrator.
- Posted by Pavel A. on February 9th, 2007
"chris.aseltine@gmail.com" wrote:
So Vista is protected from user actions better than XP.
User that happens to know the admin password, still is a user 
Real administrators will be able to get write acess to Enum, even on Vista.
--PA
- Posted by barry@canalrun.com on February 9th, 2007
On Feb 9, 8:12 am, Pavel A. <pave...@NOwritemeNO.com> wrote:
Hello, and thanks for all the responses. I am all for security, and if
this were Vista Enterprise I would say "good job MS", but this is
Vista home. I should be able to destroy this pc any way I want. In
fact it is my decision whether this laptop survives on my lab desk or
flies out the window on to the highway 5 stories below.
"Write access to enum". I don't even know what that means. All I need
to do is be able to repeatedly have Vista go through its motions to
load a usb driver so I can experiment and document the process. Once
the driver has loaded, it seems there is no way to remove it so that
next time the device is plugged in, the driver gets reloaded. Using
the driver's uninstall deletes the driver files but does not remove
the registry entry. Vista thinks the driver is present but the device
does not work.
Will "write access to enum" allow me to use Regedit to delete the
"vidXXXX&pidYYYY" key that identifies this device and driver? How do I
acquire that?
An earlier reply mentioned a Vista function to remove a driver. Will
this allow me to get around the problem of not having privilege to
grant myself access?
I am between a rock and a hard-place here. I'd hate to have to restore
the hard drive from a ghost image each time I want to watch the usb
driver loading sequence. That just takes too much time.
Thanks,
Barry.
- Posted by Don Burn on February 9th, 2007
Barry,
Unfortunately, Pavel is wrong this has been discussed and Microsoft
has locked down enum so that an administrator cannot get to it. This is
another case where Vista security is making things that driver developers
do much harder.
Use the setup API's and see how much you can remove. Unfortunately,
unless things have changed this will not remove everrything, and you still
will need to reinstall or ghost the system quite often. My other
suggestion is do as much testing of the install on XP (where you can go
into enum and remove all the entries involving your device) as possible,
only when it is rock solid go to Vista.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply
<barry@canalrun.com> wrote in message
news:1171030532.696974.16760@l53g2000cwa.googlegro ups.com...
- Posted by Pavel A. on February 9th, 2007
"Don Burn" wrote:
Several years ago I've promised to myself to never argue
with Mr. Burn, because he is always right.
Unfortunately, not today.
Have verified on my Vista RTM x86 box, that Administrator can delete
subkeys under enum\usb using only regedit.
It took much more steps than in XP - but this subtree is
not locked down besides of having special permissions.
Also, Administrator can run apps under System account
and get all access to everything...
May be on x64 version Enum is locked down, but not on x86.
Sincerely,
--PA
- Posted by Don Burn on February 9th, 2007
Pavel,
It could be there are versions that do work, I have done limited
testing on Vista because for a driver developer it is a PITA. I admit I
relied on postings from Microsoft as well as my own liimited experience on
this one.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply
"Pavel A." <PavelA@discussions.microsoft.com> wrote in message
news:8E750255-DF33-4DAE-99DF-8582C1698040@microsoft.com...
- Posted by Pavel A. on February 9th, 2007
"barry@canalrun.com" wrote:
Sorry for the confusion. Of course the devcon utiity and
SetupDixxx API is the blessed and right way to unstall drivers.
The registry keys of uninstalled devices will vanish automagically.
You can uninstall even not currently attached USB devices.
Download devcon from KB311272, may be this is all you need.
If not - the source code is available, you can study it or modify as needed.
You need be administrator in order to use devcon.
Some keys and files may remain after uninstall; this should not cause any
problem (otherwise MS would have fixed that long ago).
Perhaps physical loss is not the worst
thing that may happen to humble home PC.
There can be much more grief and loss if users'
sensitive data is stolen, or their PC is used to send spam
or even you know what. Users could then go and sue MS
for lack of diligence.
Regards,
--PA
- Posted by chris.aseltine@gmail.com on February 9th, 2007
Let me ask what almost seems to obvious to me. Have you just tried
uninstalling the devices in Device Manager?
Set the environment variable "devmgr_show_nonpresent_devices" to "1"
to see the devices in Device Manager even when they are not connected.
On Feb 9, 8:15 am, "b...@canalrun.com" <b...@canalrun.com> wrote:
- Posted by Alexander Grigoriev on February 10th, 2007
Run Device Manager in "show non-present devices" mode. Then you'll be able
to uninstall devices not plugged in.
<barry@canalrun.com> wrote in message
news:1171030532.696974.16760@l53g2000cwa.googlegro ups.com...
- Posted by Don Burn on February 10th, 2007
"Alexander Grigoriev" <alegr@earthlink.net> wrote in message
news:unIE$rMTHHA.4276@TK2MSFTNGP02.phx.gbl...
entries for testing installation. Device Manager leaves much of the data
in the registry, so the next install depends more on the registry than it
does your inf file.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply