nobby 0 Report post Posted February 23, 2004 Hey, I am running a simple script to backup a database to a mapped network drive so it is put on tape nightly. Unfortunately, the function ProcessClose does not stop the SQLSERVR.EXE process. RunAsSet("Administrator", "DOMAIN", "PASSWORD") ProcessClose("sqlservr.exe") FileCopy("C:\Program Files\Microsoft SQL Server\MSSQL\Data\DATABASE", "MAPPED network drive", 1) Shutdown(9) Where the following does stop the server RunAsSet("Administrator", "DOMAIN", "PASSWORD") RunWait(@comspec & " /c Net stop MSSQLserver","",@SW_HIDE) FileCopy("C:\Program Files\Microsoft SQL Server\MSSQL\Data\DATABASE", "MAPPED network drive", 1) Shutdown(9) Is there a way of forcing a process to close rather than trying to close it gracefully? Cheers Nobby CheersNobby Share this post Link to post Share on other sites
trids 1 Report post Posted February 23, 2004 (edited) Have you tried the force flag? The shutdown code is a combination of the following values:0 = Logoff1 = Shutdown2 = Reboot4 = Force8 = Power downEdit .. this is for the Shutdown() call Edited February 23, 2004 by trids Share this post Link to post Share on other sites
nobby 0 Report post Posted February 24, 2004 Thanks for the reply. I was hoping to be able to close the process without calling for an external application. Could this be an option to add in future release of AutoIt?? ProcessClose("process.exe", "flag") Flag 1 = Gracefull close Flag 2 = Forcefull close Cheers CheersNobby Share this post Link to post Share on other sites
nobby 0 Report post Posted February 24, 2004 Larry, Why not indeed. That's how I am running it now and it works fine. Thanks. CheersNobby Share this post Link to post Share on other sites