|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Looking for a way to call LogOff and Shutdown.Dear All,
I've setup up an account on my Domain to have a pure internet user, like a kiosk you would see in a internet cafe, etc....I've locked everything down, but I need a way to allow the user to log off or shutdown the machine (but I don't want to give access to start menu, hence desabling the Windows Keys), I was thinking of writting a little VB App (keeping the form on the top of the screen, locked to the bottom right hand corner or something) with "Log Off" or "Shutdown" buttons on it? Can logoff and/or shutdown be called from VB? Hope someone can help.. Regards Paul.
Show quote
Hide quote
"Kardon Coupé" <prefer.to@readon.newsgroups> wrote in message The ExitWindowsEx API call -- search around groups.google.com because therenews:uxyFyy2WHHA.4632@TK2MSFTNGP04.phx.gbl > Dear All, > > I've setup up an account on my Domain to have a pure internet user, > like a kiosk you would see in a internet cafe, etc....I've locked > everything down, but I need a way to allow the user to log off or > shutdown the machine (but I don't want to give access to start menu, > hence desabling the Windows Keys), I was thinking of writting a > little VB App (keeping the form on the top of the screen, locked to > the bottom right hand corner or something) with "Log Off" or > "Shutdown" buttons on it? > > Can logoff and/or shutdown be called from VB? are other calls you need to use first to activate the privileges needed to call that. -- Reply to the group so all can participate VB.Net: "Fool me once..."
Show quote
Hide quote
"Bob Butler" <tiredofit@nospam.ever> wrote in message You could also shell out to the shutdown command.news:ub5CkT3WHHA.4076@TK2MSFTNGP05.phx.gbl... > "Kardon Coupé" <prefer.to@readon.newsgroups> wrote in message > news:uxyFyy2WHHA.4632@TK2MSFTNGP04.phx.gbl >> Dear All, >> >> I've setup up an account on my Domain to have a pure internet user, >> like a kiosk you would see in a internet cafe, etc....I've locked >> everything down, but I need a way to allow the user to log off or >> shutdown the machine (but I don't want to give access to start menu, >> hence desabling the Windows Keys), I was thinking of writting a >> little VB App (keeping the form on the top of the screen, locked to >> the bottom right hand corner or something) with "Log Off" or >> "Shutdown" buttons on it? >> >> Can logoff and/or shutdown be called from VB? > > The ExitWindowsEx API call -- search around groups.google.com because > there > are other calls you need to use first to activate the privileges needed to > call that. > > -- > Reply to the group so all can participate > VB.Net: "Fool me once..." > Reboot = "shutdown -r -f -t 00" (-r = reboot, -f = force unresponding apps to end, -t 00 = time to delay before executing) Shutdown = "shutdown -s -f -t 00" (-s = shutdown) Logoff = "shutdown -l -f -t 00" (-l = logoff) You can even shell to "shutdown -i" which brings up the gui version of the app. Type "shutdown" at a command prompt and it will tell you all the switches and what they do. d "Darhl Thomason" <darhlt@papamurphys.nospamplease.com> wrote in message Just realize that you are relying on an external component that may or maynews:eD1Jm6BXHHA.388@TK2MSFTNGP04.phx.gbl > You could also shell out to the shutdown command. not be present. The code for doing this isn't that hard and numerous examples exist so it's better IMO to keep it under your own control. -- Reply to the group so all can participate VB.Net: "Fool me once..." "Bob Butler" <tiredofit@nospam.ever> wrote in message Absolutely! Just offering up another solution/possibility.news:uaCQ88BXHHA.1764@TK2MSFTNGP04.phx.gbl... > Just realize that you are relying on an external component that may or may > not be present. The code for doing this isn't that hard and numerous > examples exist so it's better IMO to keep it under your own control. > > -- > Reply to the group so all can participate > VB.Net: "Fool me once..." > FWIW shutdown.exe is a Windows command that has been around as part of the OS for years. d Darhl Thomason <darhlt@papamurphys.nospamplease.com> wrote:
> "Bob Butler" <tiredofit@nospam.ever> wrote in message Eh? Afaik, it's been part of the Resource Kit for years. Not any sort of standard > news:uaCQ88BXHHA.1764@TK2MSFTNGP04.phx.gbl... >> Just realize that you are relying on an external component that may or may >> not be present. The code for doing this isn't that hard and numerous >> examples exist so it's better IMO to keep it under your own control. > > Absolutely! Just offering up another solution/possibility. > > FWIW shutdown.exe is a Windows command that has been around as part of the > OS for years. install.
Show quote
Hide quote
"Karl E. Peterson" <k***@mvps.org> wrote in message That's what I thought. I needed it for a Win2K system recently and had tonews:OQMs5EDXHHA.3332@TK2MSFTNGP04.phx.gbl > Darhl Thomason <darhlt@papamurphys.nospamplease.com> wrote: >> "Bob Butler" <tiredofit@nospam.ever> wrote in message >> news:uaCQ88BXHHA.1764@TK2MSFTNGP04.phx.gbl... >>> Just realize that you are relying on an external component that may >>> or may not be present. The code for doing this isn't that hard and >>> numerous examples exist so it's better IMO to keep it under your >>> own control. >> >> Absolutely! Just offering up another solution/possibility. >> >> FWIW shutdown.exe is a Windows command that has been around as part >> of the OS for years. > > Eh? Afaik, it's been part of the Resource Kit for years. Not any > sort of standard install. hunt it down. -- Reply to the group so all can participate VB.Net: "Fool me once..." Bob Butler <tiredofit@nospam.ever> wrote:
Show quoteHide quote > "Karl E. Peterson" <k***@mvps.org> wrote in message Been there, yep!> news:OQMs5EDXHHA.3332@TK2MSFTNGP04.phx.gbl >> Darhl Thomason <darhlt@papamurphys.nospamplease.com> wrote: >>> "Bob Butler" <tiredofit@nospam.ever> wrote in message >>> news:uaCQ88BXHHA.1764@TK2MSFTNGP04.phx.gbl... >>>> Just realize that you are relying on an external component that may >>>> or may not be present. The code for doing this isn't that hard and >>>> numerous examples exist so it's better IMO to keep it under your >>>> own control. >>> >>> Absolutely! Just offering up another solution/possibility. >>> >>> FWIW shutdown.exe is a Windows command that has been around as part >>> of the OS for years. >> >> Eh? Afaik, it's been part of the Resource Kit for years. Not any >> sort of standard install. > > That's what I thought. I needed it for a Win2K system recently and had to > hunt it down. >>> Eh? Afaik, it's been part of the Resource Kit for years. Not any Hmm, it's entirely possible that I've had the RK installed with previous >>> sort of standard install. OS's, but I know that the RK is not installed on my XP box, nor any of the 1000 XP boxes I work with... In any case, it's a great utility. d "Karl E. Peterson" <k***@mvps.org> wrote in message Well, it came automatically with XP, and XP has technically been around for news:OQMs5EDXHHA.3332@TK2MSFTNGP04.phx.gbl... >> FWIW shutdown.exe is a Windows command that has been around as part of >> the >> OS for years. > > Eh? Afaik, it's been part of the Resource Kit for years. Not any sort of > standard install. YEARS, so there you go. Of course, the problem was Darhl's use of the phrase "THE OS," as if Windows has only one version.... "Jeff Johnson" <i.get@enough.spam> wrote in message Yeah! What he said ;-)news:OxprKWQXHHA.4908@TK2MSFTNGP06.phx.gbl... > > Well, it came automatically with XP, and XP has technically been around > for YEARS, so there you go. Of course, the problem was Darhl's use of the > phrase "THE OS," as if Windows has only one version.... > (Thanks Jeff!) d Jeff Johnson <i.get@enough.spam> wrote:
> "Karl E. Peterson" <k***@mvps.org> wrote in message Huh. Well, I definitely recall having to install it on some XP boxes. But I see > news:OQMs5EDXHHA.3332@TK2MSFTNGP04.phx.gbl... > >>> FWIW shutdown.exe is a Windows command that has been around as part of >>> the OS for years. >> >> Eh? Afaik, it's been part of the Resource Kit for years. Not any sort of >> standard install. > > Well, it came automatically with XP, and XP has technically been around for > YEARS, so there you go. that it's definitely in the "clean" SP2 VM I have here. I'll be darned... Whoops! I see I also have the RK installed on that one. Hmmmmm, well, nothing definitive yet.
Within a *.exe
Function that returns an Array Reason for 'Set' keyword SendKeys command fails on Vista Error in reading large csv file Should I or shouldn't I include excel.exe in my app distribution package? Getting Info from a .TTF File Cannot quit Excel called from VB6 Source Control via Network Drive Run-time Error 430, WITH non-broken binary compatibility? |
|||||||||||||||||||||||