[413522] Improve pgm commands to be embeddable


See https://bugs.eclipse.org/bugs/show_bug.cgi?id=413522