C# - Request admin access - best practice?
-
Hi all, Im currently building an upgrade to one of our free "value added" tools we send out to customers. The new version is to replace a 10yr old Delphi version. One of the features of the new one is to import data from the old version, which is stored in Paradox. Ive run into a little problem in vista access the paradox database files. If i dont run the app in Admin mode (via Run As Administrator) i get a Paradox driver error (11625), but if i run as admin, it works fine! So far the only way i can think to fix the problem is one of the following: * Create a manifest demanding Admin privilages for the application * Document the user has to manually "Run As Administrator" for certain functions * Somehow create a shortcut (if its possible) that automatically runs as administrator Whats the best way of doing this? Can you suggest a better idea? Can the user "Run As Administrator" if they have admin rights? I ask this because some of our customers isntall the software on domained machines with Group Polices already set! many many many thanks! Will
-
Hi all, Im currently building an upgrade to one of our free "value added" tools we send out to customers. The new version is to replace a 10yr old Delphi version. One of the features of the new one is to import data from the old version, which is stored in Paradox. Ive run into a little problem in vista access the paradox database files. If i dont run the app in Admin mode (via Run As Administrator) i get a Paradox driver error (11625), but if i run as admin, it works fine! So far the only way i can think to fix the problem is one of the following: * Create a manifest demanding Admin privilages for the application * Document the user has to manually "Run As Administrator" for certain functions * Somehow create a shortcut (if its possible) that automatically runs as administrator Whats the best way of doing this? Can you suggest a better idea? Can the user "Run As Administrator" if they have admin rights? I ask this because some of our customers isntall the software on domained machines with Group Polices already set! many many many thanks! Will
The best way to do it is to see if you use some other method that doesn't require admin rights. Beyond that, on Vista, it's best to use a manifest.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
The best way to do it is to see if you use some other method that doesn't require admin rights. Beyond that, on Vista, it's best to use a manifest.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Hi, Thanks for the reply... Ive tried using OleConnection and an OdbcConnection using the native Paradox driver and the Jet driver, but they both fail when I try use the DataAdapater to fill a table from a select command! Any thoughts / suggestions?
There's got to be something else going on because you don't need admin rights to do a database select. Has the the config of Vista been changed at all or is this an "out of the box" install?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008