Solved

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

Posted on 2008-10-09
7
437 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
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 4

Expert Comment

by:apcsolutionsuk
Comment Utility
0
 
LVL 6

Expert Comment

by:JanSchotsmans
Comment Utility
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
Comment Utility
can i do that direclty by c++ code?
i am usign dev-c++ as compiler
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 6

Accepted Solution

by:
JanSchotsmans earned 200 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Kursho are u sure about that?
anyway vista is getting annoying for my application
0
 

Expert Comment

by:krusho
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now