convert interactive service to use WTSSendMessage function?

jstump1
By jstump1 in AutoIt General Help and Support,
Hello - I have an energy-saving app that I use on Windows XP that is going to need a couple of modifications to work on Windows Vista, 7, 8, and on. It is an AutoIt app that I run as an interacitve service under the local system account using srvany.exe. The program creates one dialogue box that asks the user if they want to continue working or to shutdown. The app continues to work on Win 7, but the Interactive Services Detection notificaton is a problem. Most users ignore it or don't have a clue what it is, so they never see the msgbox asking if they want to continue working. I read Microsoft's info on this redesign issue - see http://msdn.microsoft.com/en-us/library/windows/desktop/ms683502(v=vs.85).aspx and this whitepaper http://msdn.microsoft.com/en-us/windows/hardware/gg463353.aspx Can anyone tell me if it is possible to redesign my program to use the WTSSendMessage function that Microsoft recommends? I am attaching most of my project, excluding EXEs. If it gets completed I'll post it to the sample scripts forum. This program records info necessary for implementing wake-on-lan (via another autoit script), plus it shuts down PCs using some intelligence and a flexible schedule. TIA James EDIT: So it looks like WTSAPI32.DLL is what I am looking for since it contains the function. I'll have to figure out how to call the dll and use the function with it. InstallScheduledShutdown.zip
  • 4 replies