Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

Vista uac problems

Thread view: 
patrick - 08 Jan 2008 19:15 GMT
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
Daniel Pitts - 08 Jan 2008 20:52 GMT
> 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.
froboz - 08 Jan 2008 23:12 GMT
> 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
milton.smith@spamracadabra.com
Daniel Pitts - 08 Jan 2008 23:31 GMT
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.