Forum Discussion

rgareme's avatar
rgareme
Occasional Contributor
10 years ago
Solved

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
    10 years ago
    var sServiceName = 'myServiceName'



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



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



    wshShell.Exec (sCmd)