Status -150 after activate OSCOMMAND

Author: (lammersma)

Hi all, One my old Uniface relations asked me to help with a strange problem they are having. A couple of years ago I built a small comp to convert the default Uniface postscript output to pdf, png and txt. I used Ghostscript for this. Just a simple activation of OSCommand was enough and it works for many years and produced about a 10.000 pdf's, png's and txt's per day.... After lots of (badly documented) changes to the system (virtualized) this comp returns an error. It turns out the OSCOMMAND only works when the user has administrator rights. The component (with the activation of OSCOMMAND) is processed in the batch: USERVER (with the minimum of the userver rights). I don't want to run the userver as an administrator. Even a simple "cmd /C dir c: > result.txt" return a -150.... We use Uniface 9202. Is there anyone who has a clue what is happening here? best regards, Peter


  1. Hi Peter,

    perhaps the users privileges do not allow the creation of a new process.

    Perhaps you can give it just a test with user "urouter" instead of "userver".

    If this works, just compare the privileges and enrich "userver".

    Success, Uli

    Author: ulrich-merkel (
  2. Yes, it is somewhere in the user rights. But where....? The 'normal' user for these userver processes is only member of the 'Uniface server users' group. When I give this group the same local priviliges (with gpedit.msc) as admin, it still does not work. I have to make the user administrator to get it working. I tried the good old spawn statement. It tells me: (OPER) LP_CONVERT:22 [-150] spawn "#file_convert.bat > result.txt" uexecute: CreateProcess('file_convert.bat > result.txt') failed : error 5: Access is denied. Even when I make the userver user memeber of the 'users' group, the same result.

    Author: lammersma (
  3. Hi Peter,


    I think a lot of members of this forum have more experience to help you out on this,
    but if noone jumps in, you have to take my 5 cents:

    Looks like your use does not have sufficient privileges (nothing about groups or so).

    Remember you come from a service (no attached screen, keyboard, ....)
    and you want to start a "normal" windows command.

    Not quite sure if you need some rights like "remote invokation", "batch privilege" or something similar.

    A DLL with ShellExecute may help. (Or you create a neat wrapper for all the OS you need?).

    Success, Uli

    Author: ulrich-merkel (