?
Solved

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

Posted on 2008-10-09
7
Medium Priority
?
445 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Accepted Solution

by:
JanSchotsmans earned 600 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

765 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