STAF STAX

After Installing STAF when we try any STAF commands locally we get "error registering with STAF, RC: 21"

  • Reason:- Actually "STAF" command is locking with STAFProcess with InstanceId = "STAF" which is the default InstanceID when you directly execute STAFProc.exe file from a command prompt. But when we use the Start menu it starts a STAF Process with InstanceID given during installation or mentioned in the "STAF_INSTACE_NAME" in STAFEnv.bat file. Thats why we are not able to execute the Staff Commands just after installation if we have given a different Instance Name.
    - After installing STAF your STAF process may not have started properly.
  • Resolution:- Stop the STAFProc cmd window by pressong ctrl+C on the STAFProc.exe cmd window to shutdown the staf process
    - Now cd to the staf installation diretory in a cmd prompt in windows c:\staf\bin
    - Now execute "stafproc.exe"
    - Now start a new command(cmd) window and cd to c:\staf\bin and execute staf commands they will be successful.