Solved

How to run my application with admin priviligies in windows vista?

Posted on 2008-10-09
7
444 Views
Last Modified: 2012-08-14
Hello EE,
 my application in windows vista cannot running properly.It worked good on xp pro
but on vista due to the admin priviligies i am having some problems.How can i fix that directly by  code in c++?

ps
i am using Dev c++
0
Comment
Question by:kagami01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 6

Expert Comment

by:JanSchotsmans
ID: 22677505
You can use this Microsoft Supplied Windows Vista Powertoy to do this hasslefree:


http://technet.microsoft.com/en-us/magazine/cc162321.aspx
0
 

Author Comment

by:kagami01
ID: 22677512
can i do that direclty by c++ code?
i am usign dev-c++ as compiler
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 6

Accepted Solution

by:
JanSchotsmans earned 200 total points
ID: 22677552
UAC is an annoyance, the way I usually see it bypassed is by creating a service component for the applications in question, the service component then runs the routines that have trouble with UAC.

I'm guessing its "impossible" to surcumvent it in an other way, since UAC is developed to be a security layer to stop apps from running with elevated previleges without it being allowed.

Writing an app to do this without confirmation from UAC would be considered a missbehaving app.

Another thing you could do is check what causes your app to spawn UAC and see if the routines that cause UAC to get activated can't be programmed into the app so that they run at a layer where UAC doesn't mind them running.
0
 

Expert Comment

by:krusho
ID: 22681007
I'm pretty sure you can't make the program coded to make itself run with administrative privileges. I did find however if the issue is the program wanting to modify files in its directory, make it install itself somewhere other than "Program Files", as Vista seems to think that folder is sacred and the programs in it shouldn't be changing things.
0
 

Author Comment

by:kagami01
ID: 22685283
Kursho are u sure about that?
anyway vista is getting annoying for my application
0
 

Expert Comment

by:krusho
ID: 22688598
Yes, at least in the case of programs such as HydraIRC that need to modify files in their installation folder, if you install them anywhere other than the "Program Files" folder it will let them do what they want.
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question