Does anyone know how to check if program needs to be installed as adminstrator or how to run something than will return an error if command needs to be run as adminstrator so i can trap the error ?
Printable View
Does anyone know how to check if program needs to be installed as adminstrator or how to run something than will return an error if command needs to be run as adminstrator so i can trap the error ?
If your question is "Does this user I'm running under have admin rights (i.e. am I running elevated)?" you could use this:
IsUserAnAdmin: Determine if the Current User is an Administrator
I hope that helps! Nice and concise.
thanks for the link, unfortunately i don't have vista to check right awayQuote:
Originally Posted by dilettante
It works on Win2K and later. Prior to Vista it returns True if running under an admin account. Starting with Vista it only returns True when running with elevation.
Well, if you're using an installer then it usually takes care of everything for you. If not, just incorporate the manifest in your application that automatically elevates your application (if you're already an admin it does nothing).
If you are attempting to write an installer yourself, you should use one of the already tried and tested ones. You really can't write one totally in VB anyway...
Sure you can. Just include the vb 6 runtimes and other dependancy files on the CD in the app dir as that is the first location Windows looks for dependancy files.Quote:
Originally Posted by randem