The script is executed using sysexec in windows.
There is pipe created while executing sysexec from WebUI. The wait time on this pipe in ideal state is small.
When last command, nvdevice -online is triggered, the pipe wait for small time but after wait timeout, the pipe connection is closed and it cannot get the exit status of nvdevice -online command. Hence, it failed with exit code 1
If we make the script busy till we get exit status of nvdevice -online then it will get successful exit status.
We have modified the script and added some ping command to make script busy.
with this scenario, the script execute successfully.
Modified script with ping commands:
------
"C:\Program Files (x86)\Quest\NetVault Backup\util\nvdevice.exe" -offline -drive "DRIVE 1"
ping localhost -n 5
"C:\Program Files (x86)\Quest\NetVault Backup\util\nvdevice.exe" -online -drive "DRIVE 1"
ping localhost -n 5
------
NOTE:
1. If above does not work then try to increase ping time (-n) 2. sleep and timeout doesn't work as they make the pipe ideal and same situation happen and script fail with same exit 1 error