Create a .bat file and write following command in it to start window service
net stop "Print Spooler" (
service name you want)
and now use javascript to run .bat file
function runBat()
{
var str = "c:\test.bat";
WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run (str,1,true);
}
to run above javascript function, your browser security needs to be configured, to allow run ActiveXObject.