Compiled script ask permission when I close session

Started by archimede, September 27, 2013, 04:50:11 AM

Previous topic - Next topic

archimede

Hallo.
Windows 7; WinBatch 2008C
I have aproblem with a .exe complied script: when I launch it and it runs, if I close session that script ask me if I want to close the script; If I no answer the system Waits and no close anything.
I want that the system close automatically that program like all other programs... How I can obtain it?
Thank you very much

Deana

You can add IntControl(12,5,0,0,0) to the beginning of your script to tell the script to exit quietly.
Deana F.
Technical Support
Wilson WindowWare Inc.

archimede

I am reading instructions about Intcontrol ( 12, p1, p2, 0, 0 ); I no see "5" like possible value for p1; can I use it?
I see:
0 popup message to ask to close or not (I tnink the default value)
1 to allow Windows to close the program without warnings
2 to refuse Windows to close application
3 reserved
no other

Can I use 1 instead 5?

Deana

IntControl 12 offers 2 types of flags that can be bitwise Or'd together. The first flag indicates how the handle Windows Exit, the second flag indicates how the handle a WIL Script Termination( i.e. Ctrl+break).

For example if you wanted the following flags:


WindowsExit  = 1 ; Allow Windows to be exited with no warning.
ScriptExit = 4 ; Allow quiet termination.


Then you can either simply add those values together to get 5. OR use the bitwise or operator like this:

Code (winbatch) Select
IntControl(12,1|4,0,0,0)

to achieve the same result.
Deana F.
Technical Support
Wilson WindowWare Inc.

archimede

You have reason, sorry.
I red not very well.
I tried your solution and that is good.
Thank you very much