hi people i have a very challenging application to write
just wondering of someone can help me with a problem i'm having
the application i'm writing must do backups
the network is as follows
the applications is on a server
the files it has to copy is on pc1
the files has to be copies to pc2
and the SQL Server needs to be stopped on pc1 before the backups can be done
im using the code
private ServiceController GetService()
{
return new ServiceController((string)"MSSQLSERVER");
}
the onclick event on the stop button
System.ServiceProcess.ServiceController controller = GetService();
controller.Stop();
WaitForStatus( controller, ServiceControllerStatus.Stopped, new TimeSpan( 0,1,0) );
stStatus.Text = "Status: " + controller.Status.ToString();
btnStart.Enabled = false;
btnBackup.Enabled = true;
btnStop.Enabled = false;
to stop the local SQL server and now i wonder how the code will look to stop it on pc1 from the server?
and wondering how to copy the files from the first pc to the second pc via the server?
please answers will be nice :D
ok so how do i alter the code to do it remotely
this application is only a normal windows app not a service client only a stand alone application
is it then still possible to copy files or do you need the server client structure for that? the application is going to run on only the server and not on the pcs