Vista uac problems

P

patrick

Is there a way to run a Windows Vista .exe application as administrator from
within a java application, using Runtime.getRuntime.exec or otherwise ??

i.e. equivalent to right clicking the .exe and runnning as administrator.

TIA
 
D

Daniel Pitts

Is there a way to run a Windows Vista .exe application as administrator from
within a java application, using Runtime.getRuntime.exec or otherwise ??

i.e. equivalent to right clicking the .exe and runnning as administrator.

TIA

I doubt it. You might have to run the Java application as
administrator. My guess is that the access is cascaded to child
processes (but I could be wrong).

Alternatively, you could make a short-cut to that EXE, and mark the
short-cut as always run as Administrator.
 
F

froboz

Is there a way to run a Windows Vista .exe application as administrator from
within a  java application, using Runtime.getRuntime.exec or otherwise ??

i.e. equivalent to right clicking the .exe and runnning as administrator.

TIA

When you execute a process with Runtime you will execute with the
authority of the process you started Java with. If you started the
JRE as Administrator then your process will inherit administrative
authority. Without creative measures, child processes inherit the
authority of the parent process. There are a few ways around this.
You can have a Java server process running with Adminstrative
privileges performing activities on behalf of other non-privilged
processes (using RMI or web services perhaps).

Of course, regardless of your architectural approach, if your
privilged process is performing activities for non-privileged
processes then the burden of access control enforcement is with your
privleged process. For example, a risk of such a model is where a non-
privleged process causes the privleged process to perform an
unintended activity -- otherwise known as privilege escallation
attack.

Another implementation option since you are working with Microsoft
technology would be make a special exe you call from Java that can run
with elevated privileges. There are API's on the Microsoft platform
to run as other users.

Hope all this is helpful and not more confusing.

Milton Smith
(e-mail address removed)
 
D

Daniel Pitts

Is there a way to run a Windows Vista .exe application as administrator from
within a java application, using Runtime.getRuntime.exec or otherwise ??

i.e. equivalent to right clicking the .exe and runnning as administrator.

TIA

Not to mention that you can use the microsoft program "runas" to
promote your commands privilege level to Administrator.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top