Hi, I want to update rps.cfg file. To take changes effect in rps.cfg, it requires to restart the httpdproxy services. I have created ZSERVICE with BUPDATE to stop the service & trying to start the services using ZCREATE or ZINIT but i am failing to start the services. parameters used to stop the service is (BUPDATE NATIVE CMD /C "sc stop httpdproxy ") similar way if i want to start httpdproxy services i am using ZCREATE or ZINIT using NATIVE CMD /C "sc start httpdproxy ", but failing to do so. Can any body help on this.
ZINIT runs before ZCREATE which is run when the object is placed. Both only run at Service activation. BUPDATE on runs if a Service is updated. So what is your situation? Is this a Service install/activation or an update?
I Have packed rps.cfg file using componont selection mode & deploying using radia, so it is installation. After installation i need to restart httpdproxy services. How to acheive this? Please guide me on this.
Another option is to create a script and include with the rps.cfg, modifying it to go to %TEMP% or the such. Then, all you need is a single ZCREATE that initiates the script.
This also allows for adding a check to verify the service has stopped and later for it to have restarted.
For example, using nvdkit and batch script, you could use something like this (in this case, start and verify start of service):
REM attempt to start service nvdkit.exec service start httpdproxy REM wait 10 seconds for service to start sleep 10 REM check if service started nvdkit.exe service query httpdproxy | findstr /c:"o(status)" | findstr /c:"started" 1>NUL 2>NUL if ERRORLEVEL 1 goto :startfailed REM service started ok goto :startok :startfailed REM here is where you would take appropriate action if start failed. :startok REM done! exit