Page 1 of 1

Close CHEMSTATION

Posted: Mon Apr 02, 2012 2:25 pm
by alba
Dear all,

I'd like to know if someone can help with this issue:

I'd like to close properly (and not manually) Chemstation before our PC switches off. I have read that I can switch off the PC by typing shutdown -s and by saving this command as a .bat or .cmd file.

However, before that I'd like to close Chemstation properly. Does anyone know what I should do? I'm not very familiar with this kind of problems.

Thank you in advance for your help.

Re: Close CHEMSTATION

Posted: Mon Apr 02, 2012 8:23 pm
by dblux_
Dear all,

I'd like to know if someone can help with this issue:

I'd like to close properly (and not manually) Chemstation before our PC switches off. I have read that I can switch off the PC by typing shutdown -s and by saving this command as a .bat or .cmd file.

However, before that I'd like to close Chemstation properly. Does anyone know what I should do? I'm not very familiar with this kind of problems.

Thank you in advance for your help.
In command line run: shutdown /?

you will get a list of switches, focus your attention on f switch


MfG

Re: Close CHEMSTATION

Posted: Wed Apr 04, 2012 6:41 pm
by alba
Thank you for your answer,

I tried to use it but it didn't work. However, I think I have found an option: write "bye" in command line.

Thanks again.

Re: Close CHEMSTATION

Posted: Fri Apr 06, 2012 6:34 am
by dblux_
Thank you for your answer,

I tried to use it but it didn't work. ...
It works. Just use two switches in one command: run "shutdown -f -s" without quotes or better make a text file with "shutdown -f -s" without quotes and with extension .cmd.
Then run your new file.

What OS you have ?


BTW - almost everybody knows "Alt"+"F4" keyboard shortcut. Use it twice, as you can guess: 1st closes Chemstation and 2nd shuts down Windows. Why you make simple things complicated ? :wink:

Re: Close CHEMSTATION

Posted: Mon Apr 09, 2012 12:25 pm
by GasMan
dblux_

What alba is trying to do is shut down ChemStation from the Command line in ChemStation, not the Command line of the operating system. I also tried your suggestion in ChemStation, and it does not work. If I bring the commands in DOS up, then your suggestion does work.

Gasman

Re: Close CHEMSTATION

Posted: Mon Apr 09, 2012 1:24 pm
by dblux_
dblux_

What alba is trying to do is shut down ChemStation from the Command line in ChemStation, not the Command line of the operating system. I also tried your suggestion in ChemStation, and it does not work. If I bring the commands in DOS up, then your suggestion does work.

Gasman
In my opinion he/she wants to close Windows and Chemstation simultaneously using "shutdown -s" command. He/She is aware that Chemstation should be closed properly before Windows shuts down, and that may be accomplished by combining -f switch with -s.
He/she even want's to automate closing Windows and Chemstation by executing .bat or .cmd file - for saving time or just for fun.

Bearing that in mind closing chemstation from it's command line has nothing to do with saving time nor has any practical meaning.
Per analogiam It's obviously possible to use Chemstation commands to make arithmetic calculations (addition, multiplying etc.) but what for ?
(It's much more convenient to use calculator for this purpose).



BTW - why you tried to use OS command in Chemstation ? "Shutdown" is not a valid Chemstation command and can not be executed form it's command line.

FYI - shutdown is valid command of cmd.exe but not command.com (old good DOS)

MfG.

Re: Close CHEMSTATION

Posted: Sun Apr 15, 2012 9:21 pm
by alba
Dear all,

I was trying to close Chemstation this way because we are trying to automate the switch off of the PC in case of power off (we have an UPS for an interval of time only).

Maybe I misunderstood the first reply, but now I have learned that it's no necessary to generate the .cmd file with the shutdown command; we get the same results by writing the following in the command line of Chemstation:

For example:
ShutDwnCmd$ = "shutdown " + " -s -t 45"
! Opened applications will be automatically closed too if an interval of time for the shutdown is set
ExecNoWait ShutDwnCmd$

Thanks a lot for your replies.