bmckenzie Posted September 5, 2007 Share Posted September 5, 2007 When I tried Shutdown(0 + 4) the machine actually shutdown...this is supposed to be a forced logoff. This is incorrect behaviour right? Bill M. Link to comment Share on other sites More sharing options...
xcal Posted September 5, 2007 Share Posted September 5, 2007 Well, 0+4=4, so I'm guessing it's just doing "force" shutdown. I'd guess there's no force logoff. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
bmckenzie Posted September 5, 2007 Author Share Posted September 5, 2007 Well, 0+4=4, so I'm guessing it's just doing "force" shutdown. I'd guess there's no force logoff.There is when you call the Win32Shutdown method through WBEM. I want to force the logoff..but I guess I can't. I suspect this is a bug.BMac. Link to comment Share on other sites More sharing options...
xcal Posted September 6, 2007 Share Posted September 6, 2007 Well, the math will be performed before the function is executed (someone correct me if I'm wrong), so it is essentially still 4. I wouldn't call it a bug, but maybe a missing feature? How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
bmckenzie Posted September 6, 2007 Author Share Posted September 6, 2007 Well, the math will be performed before the function is executed (someone correct me if I'm wrong), so it is essentially still 4. I wouldn't call it a bug, but maybe a missing feature? Of course it is still 4...I never doubted that. I showed the 0 + 4 to indicate logoff + force.> maybe a missing feature? Do you work for Microsoft? Ah well...no one much cares about bugs these days...a pity.BMac Link to comment Share on other sites More sharing options...
dandymcgee Posted September 6, 2007 Share Posted September 6, 2007 (edited) Have you tried just Shutdown(0)... maybe all logoffs are forced? Edited September 6, 2007 by dandymcgee - Dan [Website] Link to comment Share on other sites More sharing options...
herewasplato Posted September 6, 2007 Share Posted September 6, 2007 Have you tried just Shutdown(0)... maybe all logoffs are forced?An unsaved notepad will halt Shutdown(0) the XP SP2 system that I tested it on. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
herewasplato Posted September 6, 2007 Share Posted September 6, 2007 Even Run("Shutdown.exe -f") hangs if a doc is unsaved. I suppose that you could ProcessClose all that you can and then call the logoff. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
xcal Posted September 6, 2007 Share Posted September 6, 2007 (edited) Do you work for Microsoft? No... Microsoft doesn't make Autoit, which is what I'm talking about.Of course it is still 4...I never doubted that. I showed the 0 + 4 to indicate logoff + force.Maybe you should have been more clear from the start. Edited September 6, 2007 by xcal How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
dandymcgee Posted September 6, 2007 Share Posted September 6, 2007 (edited) Try this: $i = 0 $ActiveWindows = WinList() If $ActiveWindows[0] > 0 Then Do $i = $i + 1 WinKill($ActiveWindows[$i]) Until $i = $ActiveWindows[0] EndIf Shutdown(0) Edited September 6, 2007 by dandymcgee - Dan [Website] Link to comment Share on other sites More sharing options...
JustinReno Posted September 7, 2007 Share Posted September 7, 2007 logoff plus force? It logsoff and shutdown. There is no force logoff, but the force is to force shutdown. Link to comment Share on other sites More sharing options...
bmckenzie Posted September 7, 2007 Author Share Posted September 7, 2007 logoff plus force? It logsoff and shutdown. There is no force logoff, but the force is to force shutdown.Well that depends on how it is implemented right?If the underlying code used Win32 calls...which gosh I don't know...why would I expect that on Windows...then:http://msdn2.microsoft.com/en-us/library/aa394058.aspxTo the other poster....0 + 4 = 4 why would I need to be more explicit about that??BMac Link to comment Share on other sites More sharing options...
herewasplato Posted September 7, 2007 Share Posted September 7, 2007 (edited) When I tried Shutdown(0 + 4) the machine actually shutdown...When I tried Shutdown(0 + 4) the machine only logged me off......it did not shutdown.Anybody else have a system that shuts off vs. logs off?Edit: XP SP2-MSP- Edited September 7, 2007 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
bmckenzie Posted September 10, 2007 Author Share Posted September 10, 2007 When I tried Shutdown(0 + 4) the machine only logged me off......it did not shutdown.Anybody else have a system that shuts off vs. logs off?Edit: XP SP2-MSP-Interesting...I was testing this on Win2K SP4. So, I guess it may be a Win2K issue. Oh well, non-forced logoffs work for now.BMac Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now