Sign in with
Sign up | Sign in
Your question

put a Logoff Icon on desktop

Last response: in Windows XP
Share
Anonymous
August 4, 2005 3:28:08 PM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

I would like to put a logoff icon on the desktop of the lab computers at our
university. I know how to do it with tweakxp pro, and I know how to do it
with the shutdown command. What I would like to do, is to put an icon on the
desktop that works just like the logoff command on the startmenu, one that
shows the username as well. Can anyone help me with this?

Thank you!
Anonymous
August 4, 2005 8:05:18 PM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

"esabotta" <esabotta@discussions.microsoft.com> wrote in message
news:C3B1C3EE-A864-4C09-879E-AB9BEBBDC6EF@microsoft.com...
>I would like to put a logoff icon on the desktop of the lab computers at
>our
> university. I know how to do it with tweakxp pro, and I know how to do it
> with the shutdown command. What I would like to do, is to put an icon on
> the
> desktop that works just like the logoff command on the startmenu, one that
> shows the username as well. Can anyone help me with this?
>
> Thank you!

I haven't tried it, but going by the help brought up by "shutdown /?", a
shortcut to "shutdown -l" ought to do it...
Anonymous
August 4, 2005 8:05:19 PM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

That's what I've got right now, but it dosent bring up a confirm dialogue box
nore does it put the users name on the desktop like in the startmenu.

"Homer J. Simpson" wrote:

> "esabotta" <esabotta@discussions.microsoft.com> wrote in message
> news:C3B1C3EE-A864-4C09-879E-AB9BEBBDC6EF@microsoft.com...
> >I would like to put a logoff icon on the desktop of the lab computers at
> >our
> > university. I know how to do it with tweakxp pro, and I know how to do it
> > with the shutdown command. What I would like to do, is to put an icon on
> > the
> > desktop that works just like the logoff command on the startmenu, one that
> > shows the username as well. Can anyone help me with this?
> >
> > Thank you!
>
> I haven't tried it, but going by the help brought up by "shutdown /?", a
> shortcut to "shutdown -l" ought to do it...
>
>
>
Related resources
Anonymous
August 4, 2005 9:30:42 PM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

> That's what I've got right now, but it dosent bring up a confirm dialogue
> box

Well then you'll have to do a little coding yourself. You should be able to
have your shortcut call wscript or cscript to execute some code similar to
the following (untested):

var oShell = new ActiveXObject( "WScript.Shell" );
if( 1 == oShell.Popup( "Are you sure you wish to logoff?", 0, "Please
confirm...", 33 ) )
oShell.run( "shutdown -l" );

> nore does it put the users name on the desktop like in the startmenu.

The above script will log off the current user after confirmation, whoever
it is, and not anybody else...if you really need to know who the current
user is before deciding to log off, look at the Start menu, just like you
have to do right now...

I suppose you could have the script above fetch the current user name (or
evaluate %USERNAME%) and display it as part of the confirmation dialog box.
I don't know the exact details off the top of my head, but I know they've
been posted in microsoft.public.scripting.wsh before.
Anonymous
August 6, 2005 2:47:04 PM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

"esabotta" <esabotta@discussions.microsoft.com> wrote in message
news:C3B1C3EE-A864-4C09-879E-AB9BEBBDC6EF@microsoft.com...
>I would like to put a logoff icon on the desktop of the lab computers
>at our
> university. I know how to do it with tweakxp pro, and I know how to
> do it
> with the shutdown command. What I would like to do, is to put an
> icon on the
> desktop that works just like the logoff command on the startmenu,
> one that
> shows the username as well. Can anyone help me with this?
>

----logoff.vbs-------------------
Option Explicit
On Error Resume Next

Dim WshShell
Dim logoffStr,yesnoButton
Set WshShell=Wscript.CreateObject("Wscript.Shell")
logoffStr = "Log off user """ &
WshShell.ExpandEnvironmentStrings("%USERNAME%") & """ ?"
yesnoButton = WSHShell.Popup(logoffStr,,"Log off Windows",52)
select case yesnoButton
case 6
WSHShell.Run "shutdown -l"
end select

Set WSHShell = Nothing
-------------------------------------------
August 6, 2005 5:02:13 PM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

"esabotta" <esabotta@discussions.microsoft.com> wrote in message
news:C3B1C3EE-A864-4C09-879E-AB9BEBBDC6EF@microsoft.com...
>I would like to put a logoff icon on the desktop of the lab computers at
>our
> university. I know how to do it with tweakxp pro, and I know how to do it
> with the shutdown command. What I would like to do, is to put an icon on
> the
> desktop that works just like the logoff command on the startmenu, one that
> shows the username as well. Can anyone help me with this?
>
> Thank you!

Put this on your desktop


begin 666 Logoff.cmd.lnk
M3 ````$4`@``````P ```````$;;````(" ``#XY('&O=L4!(,[]5[!VQ0&"
M:,V"KW;%`1P````;````!P```$P&`````````````+$`% `?4.!/T"#J.FD0
MHM@(`"LP,)T9`"]#.EP`````````````````````````/ `Q``````#5,I:R
M$"!30U))4%13`"8``P`$`.^^)S*I$M8RYZ@4````4P!#`%(`20!0`%0`4P``
M`!8`1@`R`!P```#5,J*R("!,;V=O9F8N8VUD```L``,`! #OOM4RD;+6,N>H
M% ```$P`;P!G`&\`9@!F`"X`8P!M`&0````:````1P```!P````!````' ``
M`# `````````1@```!0````#````_.1)N! ```!P;V,`0SI<4T-225!44UQ,
M;V=O9F8N8VUD```;`"X`+@!<`"X`+@!<`"X`+@!<`%,`0P!2`$D`4 !4`%,`
M7 !,`&\`9P!O`&8`9@`N`&,`;0!D``H`0P`Z`%P`4P!#`%(`20!0`%0`4P`A
M`"4`4P!Y`',`= !E`&T`4@!O`&\`= `E`%P`<P!Y`',`= !E`&T`,P`R`%P`
M4P!(`$4`3 !,`#,`,@`N`&0`; !L`& ````#``"@6 ````````!P;V,`````
M````````````PBY661"R5TNPT77Q<,1FS6*7>)JCXMD1KEH``+23DRK"+E99
@$+)72[#1=?%PQ&;-8I=XFJ/BV1&N6@``M).3*@``````
`
end
!