Automating SAPInst is a 2 step process.
Step 1: Capture an answer file & retrieve the product-ID.
Step 2: Replay the answer-file
Prepare a 'RunFromHere" location containing 'start_dir.cd'
Prepare the location containing 'inifile_capture.xml
Files: doc.xml, inifile_captured.xml, keybd.xml
X:
cd X:\RunFromHere
X:\SMWPx_Py\sapint.exe SAPINST_PARAMETER_CONTAINER_URL=[path2\inifile_capture.xml] _
SAPINST_EXECUTE_PRODUCT_ID=[Retrieved_Product_ID] _
SAPINST_SKIP_DIALOGS=false
On Windows, make sure to assign sidadm the necessary Privileges to avoid al logoff/logon.
> ntrights -u Domain\sidadm +r seAssignPrimaryokenPrivilege
> ntrights -u Domain\sidadm +r seTcbPrivilege
> ntrights -u Domain\sidadm +r seIncreaseQuoataPrivilege
To debug... change SAPINST_SKIP_DIALOGS to true..