closing a program in VBScript.
Hey... I need some help safely closing a program, preferably using vbscript.
First, this is what I'm trying to do. I've got a program that creates a HUGE history database that is completely useless to me. I'm trying to close the program (which runs automatically on startup), delete the history.db, and restart the program. I have the scripts to delete the file and start the program, that's easy. I tried simply terminating the process, and that does end the program, but when restarting the program after terminating the process I get an error... I basically have to go "File > Exit" in order for the program to restart properly.
What I do not need is a script to terminate a process. I have that script.
I'd prefer to get this using vbscript, but would gladly use something else, however my programming knowledge is extremely limited.
Again, what I'm looking for is a script which would safely shut down a program as if I had used File>Exit.
Thanks if you can help.