Vista uac problems

Discussion in 'Java' started by patrick, Jan 8, 2008.

  1. patrick

    patrick Guest

    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
     
    patrick, Jan 8, 2008
    #1
    1. Advertising

  2. patrick

    Daniel Pitts Guest

    On Jan 8, 11:15 am, "patrick" <> wrote:
    > 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.
     
    Daniel Pitts, Jan 8, 2008
    #2
    1. Advertising

  3. patrick

    froboz Guest

    On Jan 8, 1:15 pm, "patrick" <> wrote:
    > 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
     
    froboz, Jan 8, 2008
    #3
  4. patrick

    Daniel Pitts Guest

    On Jan 8, 11:15 am, "patrick" <> wrote:
    > 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.
     
    Daniel Pitts, Jan 8, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brett

    VS.NET 2005 & Vista problems?

    brett, Dec 6, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    361
    Mark Rae
    Dec 6, 2006
  2. =?Utf-8?B?VG9teTExMDI=?=

    ClickOnce Vista UAC. Application Manifest.

    =?Utf-8?B?VG9teTExMDI=?=, Jun 8, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    1,976
    =?Utf-8?B?U2l2YSBN?=
    Jun 8, 2007
  3. Michael
    Replies:
    5
    Views:
    963
    Bjoern Schliessmann
    Nov 3, 2007
  4. Mark Space
    Replies:
    4
    Views:
    1,187
    Roedy Green
    Apr 15, 2008
  5. Replies:
    2
    Views:
    939
Loading...

Share This Page