Re: INF / HKCU Question by GottfriedStckl
GottfriedStckl
Thu Jul 24 03:27:00 CDT 2008
"Jerome" wrote:
> Thank you for the reponse. Are you saying it may not be possible? The odd
> thing is if I process the AddReg section manually via the SetupAPI
> "SetupInstallFromInfSection" from an application, it will copy to
> "HKEY_CURRENT_USER\Software". However I would like it to copy there with a
> PNP install too. Any idea how I could do this?
Correct by default the inf file will use it's root path never as user
account, since during driver startment the current user is most of the time
not signed in.
But as i see, the API Function SetupInstallFromInfSection() has an argument
named
HKEY RelativeKeyRoot. Here you should specify HKEY_LOCAL_MACHINE (i think
this is the suitablest).
And in your inf file use HKR instead of HKCU
> "Alexander Grigoriev" wrote:
>
> > The INF may be installed in context of LOCAL_SYSTEM. Especially if it's
> > signed. Then there is no notion of the current user.
> >
> > "Jerome" <Jerome@discussions.microsoft.com> wrote in message
> > news:942D9056-2921-41F6-8945-E353CCABFB30@microsoft.com...
> > > In my INF I have:
> > >
> > > HKCU,SOFTWARE\MyKey,MyValueName,,MyValueData
> > >
> > > However, when I install the INF, the entry above gets copied to
> > > "HKEY_USERS\.DEFAULT\Software" instead of "HKEY_CURRENT_USER\Software".
> > >
> > > How do I make it go to ""HKEY_CURRENT_USER\Software" ?
> > >
> >
> >
> >