QTP Scripts are failing when the Citrix machine is locked.

Actually the QTP scripts will take 2 hours to finish executing the scripts, at any time if my citrix machine is locked, scripts are failing.

I tried the below one but no luck -

in my citrix machine, navigated to the below path and updated the value to 1.

HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional\MicTest\SkipEnvironmentChecks