#225 ooRexx V3.0.1, Windows Vista (64) and ADDRESS CMD

closed
5
2012-08-14
2007-01-11
suprhulk
No

Windows Vista is a PITA.

If you're a power developer and you don't log on with the userid "Administrator", you basically don't get much work done.

After getting "RxFuncAdd" to work by installing ooRexx V301, I started trying to use my rexx scripts like I did on WinXPPro.

At first I thought that I had a problem with the PATH setup.

Every time a rexx script tried to spawn a native executable, ".exe" or ".cmd", the script would fail with an error which I thought meant the executable could not be found (sorry I didn't write down the error code).

However I could execute these commands from the command line.

Now at the time I was using my usual userid which has "Administrator" privileges.

I subsequently determined that this is now only "Local Administrator" privileges (it's not a "Group" just weaker adminstrator privileges). I figured this out because any attempts to update my "Environment" variables ("Manage" my computer, etc...) required that I confirm a 'Windows will let you do this but only if you say "Pretty Please"' system modal popup dialog.

It turns out that rexx can't spawn "cmd.exe" without the "Super Administrator" privilege.

You can get this level of administrative privilege in three ways:

1) Run a command prompt from the "Start" menu with the "Run as Administrator" option.
2) Add "Run as Administrator" as a property of rexx.exe. Just be prepared to encounter the system modal "Pretty Please" dialog and to have every "ADDRESS CMD" spawn the executable in a separate console.
3) Log on with the "Administrator" userid. This makes every "console" an "Administrator console" without having to use "Run as Administrator".

With all of my research trying to get "rexx.exe" to "Run as Administrator" without having to do any of the above I think I saw some comment about being able to do this in a manifest. Don't quote me on this, it could just be a figment of my imagination.

Regardless, we need to find a way for "rexx.exe" to be able to execute a native module with "ADDRESS CMD" without having to log on as "Adminstrator".

Note, I've not tried to run any rexx scripts, that use "ADDRESS CMD", with a non-Administrator account. I'll add additional info when I can get around to testing this scenario.

RickH

Discussion

  • Mark Miesfeld

    Mark Miesfeld - 2007-01-11

    Logged In: YES
    user_id=191588
    Originator: NO

    RickH

    As I alluded in my comment to your other bug, the way ooRexx is currently being built is not going to allow it to behave the way we want, on Vista. I've just started researching this about 2 weeks ago. But, it is already obvious to me that there is no quick or easy fix. Once I, or one of the other developers, gets a Vista system up and running, we can start discussing possible approaches to solving the problems you are seeing.

    However, you are correct about a manifest. That is something that will definitely have to be added. From my reading, I know it will solve some problems, but probably not all of them.

     
  • edi8

    edi8 - 2007-02-27

    Logged In: YES
    user_id=1730224
    Originator: NO

    of course, what i'm writing below is in no way a final solution, but...
    did you try to use icacls.exe to change the UAC level of rexx.exe as a work around for your problem?

    edi

     
  • Mark Miesfeld

    Mark Miesfeld - 2007-04-11

    Logged In: YES
    user_id=191588
    Originator: NO

    I just finished investigating this and it looks to me like it was another symptom of the break down in communication between RexxAPIManager and RexxAPIService.

    This is fixed in SVN with revision 262.

    As a standard user I can reproduce this behavior with ooRexx prior to the fix I committed. Then, using the fix as the same standard user, I can use address cmd without problems:

    Before fix:

    C:\work.ooRexx\testing>rexx -v
    Open Object Rexx Interpreter Version3.1.2
    Build date: Mar 30 2007
    Copyright (c) IBM Corporation 1995, 2004.
    Copyright (c) RexxLA 2005-2007.
    All Rights Reserved.
    This program and the accompanying materials
    are made available under the terms of the Common Public License v1.0
    which accompanies this distribution.
    http://www.oorexx.org/license.html
    C:\work.ooRexx\testing>

    C:\work.ooRexx\testing>addressCmd.rex
    Going to use dir
    4 - address cmd 'dir '
    >>> "dir
    "
    +++ "RC(1002)"
    Going to start notepad
    7 - start notepad
    >>> "START NOTEPAD"
    +++ "RC(1002)"
    Going to do whoami
    10 - 'whoami /priv'
    >>> "whoami /priv"
    +++ "RC(1002)"
    Going to start procexp
    13 - 'procexp'
    >>> "procexp"
    +++ "RC(1002)"

    C:\work.ooRexx\testing>

    After the fix:

    C:\work.ooRexx\testing>rexx -v
    Open Object Rexx Interpreter Version3.1.2
    Build date: Apr 9 2007
    Copyright (c) IBM Corporation 1995, 2004.
    Copyright (c) RexxLA 2005-2007.
    All Rights Reserved.
    This program and the accompanying materials
    are made available under the terms of the Common Public License v1.0
    which accompanies this distribution.
    http://www.oorexx.org/license.html
    C:\work.ooRexx\testing>addressCmd.rex
    Going to use dir
    Volume in drive C has no label.
    Volume Serial Number is B679-D884

    Directory of C:\work.ooRexx\testing

    04/10/2007 10:54 PM <DIR> .
    04/10/2007 10:54 PM <DIR> ..
    04/10/2007 10:48 PM 198 addressCmd.rex
    04/10/2007 10:55 PM 895 result.txt
    2 File(s) 1,093 bytes
    2 Dir(s) 50,307,354,624 bytes free
    Going to start notepad
    Going to do whoami

    PRIVILEGES INFORMATION

    Privilege Name Description State
    ============================= ==================================== ========
    SeShutdownPrivilege Shut down the system Disabled
    SeChangeNotifyPrivilege Bypass traverse checking Enabled
    SeUndockPrivilege Remove computer from docking station Disabled
    SeCreateGlobalPrivilege Create global objects Enabled
    SeIncreaseWorkingSetPrivilege Increase a process working set Disabled
    SeTimeZonePrivilege Change the time zone Disabled
    Going to start procexp

    C:\work.ooRexx\testing>

     
  • Mark Miesfeld

    Mark Miesfeld - 2007-04-25

    Logged In: YES
    user_id=191588
    Originator: NO

    Fixed in 3.1.2.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks