Hi ,
I am using SetUpCreateDeviceInfo()API in my application, It works fine on XP as well as on Vista with UAC OFF, but it fails on Vista with UAC ON. The SetUpCreateDeviceInfo() fails but GetLastError() function returns 0. Can anyone please tell the solution?
Note: SetUpCreateDeviceInfo()API definition is in setupapi.h in WINDDK.
Thanks & Regards
Umesh Bansal.
Page 1 of 1
SetUpCreateDeviceInfo()API is not working in Windows Vista with UAC Of SetUpCreateDeviceInfo()API is not working in Windows Vista with UAC Of
#2
Posted 24 October 2008 - 08:43 AM
I think you might mean SetupDiCreateDeviceInfo. Anyway, sounds like it's failing outside your code, likely in the registry. If you run process monitor whilst reproducing the error, do you see any access denied or sharing violation messages in the procmon log that correlate to your repro? That'd be the first thing I would check (especially if GetLastError returns 0).
#3
Posted 24 October 2008 - 09:48 AM
Quote
The caller of this function must be a member of the Administrators group
How do you start your application? if UAC is on, you're not elevated rights by default. So tell your application it should run with elevated rights (this can be requested by editing your manifest file)
#4
Posted 31 October 2008 - 03:42 AM
Hi it also looks to me this is elevated priviliges problem.
I make an manifest file and try again but of no use.
Here is sample of mine manifets file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="amd64"
name="iKeyDriver.msi"
type="win64"/>
<description>elevate execution level</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Can you point out where i am wrong.
Regards,
Umesh.
I make an manifest file and try again but of no use.
Here is sample of mine manifets file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="amd64"
name="iKeyDriver.msi"
type="win64"/>
<description>elevate execution level</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Can you point out where i am wrong.
Regards,
Umesh.
#5
Posted 02 November 2008 - 02:21 AM
I uses this code, it works.
But it have one issue: when your exe file run in Windows XP SP2, it may lead to a BSOD.
But it have one issue: when your exe file run in Windows XP SP2, it may lead to a BSOD.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="IsUserAdmin" type="win32"/> <description>Description of your application</description> <!-- Identify the application security requirements. --> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> </assembly>
This post has been edited by softice: 02 November 2008 - 02:22 AM
Share this topic:
Page 1 of 1



Help
Back to top










