When you run STAFProc as an Administrator, you also need to submit local 
STAF service requests from a command prompt that is being 'Run as 
Administrator'.

See section "Running STAFProc on Windows with User Account Controls (UAC) 
Enabled" in the STAF User's Guide at 
http://staf.sourceforge.net/current/STAFUG.htm#HDRSTPROC for more 
information.  It says:

5.1.2 Running STAFProc on Windows with User Account Controls (UAC) Enabled
On Windows Vista and Windows Server 2008 and later (including Windows 7, 
Windows 8, and Windows Server 2012, etc) with User Account Controls (UAC) 
enabled, STAFProc is run using the least amount of privileges (e.g. that 
of a standard user) even if you are logged in as an administrator. If you 
want to run a process via the STAF PROCESS START request that requires 
administrative privileges, such as an install program, and not get UAC 
prompts, you may need to run STAFProc as an administrator. There are 
several ways to do this: 
Find STAFProc.exe (e.g. C:\STAF\bin\STAFProc.exe) via Windows Explorer and 
right mouse click on it. To change just this one instance of starting 
STAFProc, select "Run as administrator". 
Or, find STAFProc.exe (e.g. C:\STAF\bin\STAFProc.exe) via Windows Explorer 
and right mouse click on it. Select "Properties" and then select the 
"Compatibility" tab, and check the box under "Privilege Level" labeled 
"Run the program as an administrator" and select OK. Now, any time you 
start STAFProc it will be run as an administrator. 
Or find "Command Prompt" and right mouse on it and select "Run as 
administrator". Any program such as STAFProc that is run from an 
"Administrator: Command Prompt", will be run as an administrator. 
Note: When STAFProc.exe is run as an Administrator, you must also run 
STAF.exe as an Administrator if you want to submit STAF requests from a 
command prompt on the local Windows sytems. Otherwise, you'll get "Error 
registering with STAF, RC: 21". The same is true if you run a program on 
this Windows system that submits STAF service requests using the STAF APIs 
for Java, C/C++, Perl, Python, Tcl, etc, such as the STAX Monitor Java 
application. The program must also be run as an Administrator (e.g. by 
running it from an "Administrator: Command Prompt"). 

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   "J. Scott Farrow" <jscott.far...@gmail.com>
To:     staf-users@lists.sourceforge.net
Date:   12/02/2014 01:25 PM
Subject:        [staf-users] STAF on Windows - Administrator privileges?



So I'm having a problem with Windows (2012 R2) where commands run via the 
STAF Process service are returning different results than the same command 
run locally on the host. The software maker (JDSU 'Medusa') says this is 
because the command is not being run with full Administrator privileges. 

I normally run STAFProc as a service and it is configured to run as 
Administrator, but it doesn't seem to make any difference even if I do a 
'Run as Administrator' when I start STAFProc.

Is there some config file setting or other method to ensure that process 
started via STAF have full Administrator privileges in Windows?

Thanks,

Scott

Command output run through STAF:


C:\Users\Administrator>staf local process start command catapult parms 
"-p" RETURNSTDOUT STDERRTOSTDOUT WAIT
Response
--------
{
  Return Code: 0
  Key        : <None>
  Files      : [
    {
      Return Code: 0
      Data       : 
-------------------------------------------------------------
-----------------
Medusa Labs Test Tools 6.0.1.156759
Copyright (c)2004-2013, JDS Uniphase, Corp. All rights reserved.
Catapult 2.0 (x64) Target discovery and test management tool
Support: techsupport-med...@jdsu.com
Built on: Oct 20 2014 10:09:48
------------------------------------------------------------------------------
Finished querying for devices.
Available physical drives:
Indx Drive Name           SCSI ID    Inquiry Data                 
Exclusions
-----------------------------------------------------------------------------
     \\.\PhysicalDrive0   4:0:1:0    IBM-ESXSCBRCA146C3ETS0 NC610 A   PS

    }
  ]
}


Same command run from a CMD shell window:

C:\Users\Administrator>catapult -f
------------------------------------------------------------------------------
Medusa Labs Test Tools 6.0.1.156759
Copyright (c)2004-2013, JDS Uniphase, Corp. All rights reserved.
Catapult 2.0 (x64) Target discovery and test management tool
Support: techsupport-med...@jdsu.com
Built on: Oct 20 2014 10:09:48
------------------------------------------------------------------------------
Finished querying for devices.
Available file systems:
Indx Drive   FileSys   Size(MB) Label/Mount/Inquiry          Exclusions
-----------------------------------------------------------------------
     C:      NTFS        125512 IBM-ESXSCBRCA146C3ETS0 NC610 A    S
     F:      NTFS      31821646 ifs
     G:      NTFS      31821646 ifs
     H:      NTFS        194725 fs1
     I:      NTFS        199609 fs2
     L:      NTFS          3772 136

C:\Users\Administrator>




                                                                          
    
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to