Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: IntControl(1005
;Add the appropriate Winbatch Extender AddExtender("WWWNT34I.DLL") ;Get needed information concerning user username=wntUserInfo(0) server = wntUserInfo(3) logouttime=TimeDate( ) ; Put program into 'shutdown' mode IntControl(1005, 1, 0, 0, 0) ; Proceed with logout tasks handle = fileopen("c:\logout.txt", "write") Filewrite(handle, "%username% % server% %logouttime%") Fileclose(handle)
The IntControl(1005,1,0,0,0) basically stops the script. You will never get to the FileWrite. IntControl(1005,1,0,0,0) says STOP the entire script right now, and start it over when shutdown occurs.
If you examine the example a bit closer, you will see that the first thing this example does is to check to see if a shutdown is in progress or not. If so it goes to the shutdown code. Otherwise it then does the IntControl(1005,1,0,0,0)
I can get the dialog box to be answered using AutoIT.exe or scriptit.exe but have got to ask whether it would be possible for WilsonWare to modify the code to this IntControl function to allow the batch developer the opportunity to decide whether that prompt shows or not.
My reason behind the request, Winbatch+Compiler was purchased to assist in automating tasks on user desktops; giving the user a prompt that they must answer just adds to the amount of manual involvement by the user. If there is another way of preventing this prompt from displaying or answering it automatically, I would greatly appreciate some information as to how it can be done.
In using IntControl 1005 you want to run some code right before shutting down windows.
What do you want this code to do? What if there are other applications still running when WinBatch is told to shutdown. Should WinBatch run the shutdown scripts,and then have the user cancel the shutdown later?
The problem is that Windows NT shuts down each application in turn. So you could have Winbatch shutdwon, the user change their mind, and stay logged on for hours.
It is a real problem with no solution. The handling of IntControl 1005 is the best we could figure out.
Yes, another script - even another Winbatch script can watch for the box and press the button -- but then the question is does it do anything useful.
If you specify what you want the shutdown script to do, then we can discuss it.
WinBatch could *try* to shut them down, but then covering all the cases gets 'orribly complex.
If you open a file in notepad, type a few characters, run your Winbatch script with IntControl 1005, open ANOTHER notepad and type a few more characters then try to shutdown you can see the process occurring.
Article ID: W13083
Filename: Intcontrol 1005 and Shutdown.txt
File Created: 2014:07:18:09:51:38
Last Updated: 2014:07:18:09:51:38