1-) C# RMOS - Yazıcı servisi durmuşşa yönetici olarak bat dosyasını çalıştırır Servis durmamışşa birşey yapmaz
public void yaziciKapaliysaAc()
{
try
ServiceController ser = new ServiceController();
ser.ServiceName = "Spooler";
if (ser.Status != ServiceControllerStatus.Running)
string path = "YaziciStart.bat";
if (!File.Exists(path))
File.WriteAllText("YaziciStart.bat", "net start Spooler");
}
Process p = new Process();
ProcessStartInfo psi = new ProcessStartInfo(path);
psi.WindowStyle = ProcessWindowStyle.Hidden;
psi.Verb = "runas";
p.StartInfo = psi;
p.Start();
catch(Exception ex)
Ayrıca timer a bağlarsan otomatikleştirebilirsin