Forum Discussion

rgareme's avatar
rgareme
Occasional Contributor
11 years ago

Disable a windows service from a TestComplete script

How can i disable a windows service from a TestComplete script? I have found an smartbear link in which there are an script for start and stop a windows service, but what i need is an script to...
  • gibi's avatar
    11 years ago
    var sServiceName = 'myServiceName'



    var sCmd = 'sc config ' + sServiceName + ' start= disabled'



    var wshShell = Sys.OleObject ('WScrit.Shell')



    wshShell.Exec (sCmd)