Search

Main Menu

Login
Username:

Password:

Remember me?
Anonymous

Lost Password?

Register now!

Samurize Forums -> Need a little help


  Reply to this topicStart new topicStart Poll

> Need a little help, Log Off/ Switch User
KMDonlon
  Posted: Mar 31 2008, 07:04 PM
Quote Post
The Weather Freak
*****



Group: Member
Joined: Feb 19 2004
Posts: 3,535
Offline



I posted at Neowin with no answers.... thought someone here might have an answer... I want a way to open the log off/ switch user dialog box via a shortcut just like when you click the log off button on your start menu. I only want ways to show the Windows dialog... I already know all the scripting methods to simply log off.

Any Ideas? Anyone?

Attached Image (Click thumbnail to expand)
Attached Image


--------------------
PMEmail PosterICQAOLYahooMSN
Top
uziq
Posted: Apr 5 2008, 01:16 PM
Quote Post
The Pluginator
*****



Group: Admin
Joined: Sep 25 2003
Posts: 2,599
Offline



This is the only way I know of to open the built-in "Log Off Windows" dialog. It briefly flashes the Start menu though.

CODE
set osh = wscript.CreateObject("wscript.Shell")

osh.Sendkeys "^{ESC}" 'Ctrl+ESC
osh.Sendkeys "{l}" 'l



A plugin could potentially be made to allow for a custom dialog which has the same function.
http://articles.techrepublic.com.com/5100-22-5030366.html

Attached File ( Number of downloads: 260 )
Attached File  ShutdownPrompt.zip
PMEmail PosterMSN
Top
KMDonlon
Posted: Apr 5 2008, 04:11 PM
Quote Post
The Weather Freak
*****



Group: Member
Joined: Feb 19 2004
Posts: 3,535
Offline



It opens the start menu on my box only smil43e66cd850197.gif


--------------------
PMEmail PosterICQAOLYahooMSN
Top
uziq
Posted: Apr 5 2008, 06:38 PM
Quote Post
The Pluginator
*****



Group: Admin
Joined: Sep 25 2003
Posts: 2,599
Offline



hmm.. what about manually? Ctrl+ESC, L.

Maybe it needs a brief pause before L is pressed..?
PMEmail PosterMSN
Top
KMDonlon
Posted: Apr 5 2008, 08:02 PM
Quote Post
The Weather Freak
*****



Group: Member
Joined: Feb 19 2004
Posts: 3,535
Offline



Works manually, how do you add a short pause into the .vbs?


--------------------
PMEmail PosterICQAOLYahooMSN
Top
uziq
Posted: Apr 5 2008, 09:22 PM
Quote Post
The Pluginator
*****



Group: Admin
Joined: Sep 25 2003
Posts: 2,599
Offline



wscript.sleep x
x = milliseconds
PMEmail PosterMSN
Top
KMDonlon
  Posted: Apr 5 2008, 11:08 PM
Quote Post
The Weather Freak
*****



Group: Member
Joined: Feb 19 2004
Posts: 3,535
Offline



That did the trick... 1 millisecond works fine. A small flash of the start menu before the dialog but hell, it does work. You are 'da man smil457f47f13e0c7.gif

Thanks a bunch smil43e6c401b9177.gif


--------------------
PMEmail PosterICQAOLYahooMSN
Top
RobertMB
Posted: Apr 8 2008, 06:25 PM
Quote Post
Samurai
***



Group: Member
Joined: Jul 12 2007
Posts: 195
Offline



CODE
Set Shell = WScript.CreateObject ("Shell.Application")
Shell.ShutdownWindows


--------------------
User posted image

USER MIGRATED TO SAMURIZE.US
PM
Top
KMDonlon
Posted: Apr 8 2008, 06:31 PM
Quote Post
The Weather Freak
*****



Group: Member
Joined: Feb 19 2004
Posts: 3,535
Offline



That logs off Robert, I already used that code but I wanted to actually bring up the windows dialog, not simply log off.


--------------------
PMEmail PosterICQAOLYahooMSN
Top
RobertMB
Posted: Apr 9 2008, 01:20 AM
Quote Post
Samurai
***



Group: Member
Joined: Jul 12 2007
Posts: 195
Offline



you mean this?
guess how it's triggered.

That's working on XP Professional SP 2, dunno what you have.


CODE
'-------------------------------------
' log off the box
'-------------------------------------
function logoffthebox
Set Shell = WScript.CreateObject ("Shell.Application")
Shell.ShutdownWindows
end function

on error resume next
set shll = Wscript.CreateObject("wscript.shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set objArgs = wscript.Arguments
if objArgs.Count = 1 then
if objArgs(0) = "logoffthebox" then
call logoffthebox()
end if
end if


>> link input where you'd like: wscript.exe scripts\<yourscriptfile.vbs> logoffthebox

*edit: missed the stupid end if at the end User posted image

This post has been edited by RobertMB on Apr 9 2008, 04:11 AM

Attached Image (Click thumbnail to expand)
Attached Image


--------------------
User posted image

USER MIGRATED TO SAMURIZE.US
PM
Top
KMDonlon
Posted: Apr 9 2008, 07:59 AM
Quote Post
The Weather Freak
*****



Group: Member
Joined: Feb 19 2004
Posts: 3,535
Offline



XP Pro SP2 here Robert, I want the log off / switch users dialog, not the shutdown dialog. See the first post in this thread.


--------------------
PMEmail PosterICQAOLYahooMSN
Top
RobertMB
Posted: Apr 9 2008, 08:54 AM
Quote Post
Samurai
***



Group: Member
Joined: Jul 12 2007
Posts: 195
Offline



I see. Sorry. I could swear I had that Key-Icon to log off the User in there as well at one time, but I can't remember how.
Maybe enabling fast user Switch does the Trick, but I don't know.


--------------------
User posted image

USER MIGRATED TO SAMURIZE.US
PM
Top
GZT
Posted: Apr 9 2008, 01:40 PM
Quote Post
Samurai
***



Group: Samurize VIP
Joined: Jul 13 2004
Posts: 211
Offline



Don't worry... I missed it as well and gave him my Samurize-powered shutdown dialog and it wasn't what he wanted either (even though he thought it was cool) smil3dbd4e5e7563a.gif


--------------------
My feature requests:
-------------------------
- Commandline Positioning - Got it!
- Config Grouping
- Configs appear in Taskbar
- Advanced Data in Tooltips - Does this already!
- Client and Plugin Broadcasting
- (PluginPak) Minibrowser Additions #1
- (PluginPak) Minibrowser Addition #2
- Special Script Inputs
-------------------------
PMEmail PosterAOLYahooMSN
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Come On, Get Samurized!