Recreate the Actions of the Start Menu Logoff Button?

N

News Group

Hi,

I would like to put a Logoff Button in a place other than the Start Menu.

To achieve the 'Are You Sure?' prompt, and graceful closure of applications:

Could anybody tell me what programs/commands are called when I press the XP
Logoff Button?

Thanks

Colin
 
D

David Candy

Create a text file called something.vbs.
Paste this in

Set wshshell = CreateObject("Shell.Application")
wshshell.TileHorizontally

Choose one from below

CascadeWindows Cascadess all of the windows on the desktop.
EjectPC Ejects the computer from its docking station.
FileRun Displays the Run dialog to the user.
FindComputer Displays the Find: Computer dialog box.
FindFiles Displays the Find: All Files dialog box.
Help Displays Microsoft® Windows® Help.
MinimizeAll Minimizes all of the windows on the desktop.
RefreshMenu Refreshes the contents of the Start Menu.
SetTime Displays the Date/Time Properties dialog box.
ShutdownWindows Displays the Shut Down Windows dialog box.
Suspend Suspends the computer.
TileHorizontally Tiles all of the windows on the desktop horizontally.
TileVertically Tiles all of the windows on the desktop vertically.
TrayProperties Displays the Taskbar Properties dialog box.
UndoMinimize ALL Restores all of the windows on the desktop to the
same state they were in before the last MinimizeAll command.

To tile/cascade specific windows ctrl + click them on the taskbar, then right click one and choose cascade or tile.
 
S

Stan Brown

Sat, 15 Apr 2006 22:13:55 +0100 from News Group
Hi,

I would like to put a Logoff Button in a place other than the Start Menu.

To achieve the 'Are You Sure?' prompt, and graceful closure of applications:

Could anybody tell me what programs/commands are called when I press the XP
Logoff Button?

Open a command prompt and type
shutdown /?
That will tell you the command and the option to use to accomplish
what you want -- then just create a shortcut that executes that
command with that option.
 
T

Thota Umesh

a shortcut with the followin [ RUNDLL32 USER32.DLL,ExitWindowsEx] will do a
direct logoff if u want to ask before logoff add the same into a batch file
after a echo and pause command. that should do the trick.

Note for nt,2000,xp and above logoff :
RUNDLL32 USER32.DLL,ExitWindowsEx
for 9x logoff:
RUNDLL32 SHELL32.DLL,SHExitWindowsEx 0

Hope this helps...,

Happy Easter,
Umesh Thota
www.windowsworkshop.com
 
J

John Smithe

David Candy said:
FindFiles Displays the Find: All Files dialog box.

Is there a way to pass a path to a directory to search?

Set wshshell = CreateObject("Shell.Application")
wshshell.FindFiles

Searches all local disk drives. I would like to search a specific folder.

Thanks
JS
 
D

David Candy

Not really. I've experimented for years with this and haven't found a way guaranteed to work or that will keep working. One easy way that might work is to Save a Search (on File menu). Sometimes it saves the starting directory and sometimes it doesn't.

I can think of other inelegent ways that work partially or sometimes or are just too much work.

The way I do is right click the folder and choose search. Always works. If you have one particular search see
news://msnews.microsoft.com/[email protected]

for three ways of doing it. From memory the easy third way works for search.
 
J

John Smithe

David Candy said:
Not really. I've experimented for years with this and haven't found a
way guaranteed to work or that will keep working. One easy way that
might work is to Save a Search (on File menu). Sometimes it saves the
starting directory and sometimes it doesn't.

I can think of other inelegent ways that work partially or sometimes
or are just too much work.

The way I do is right click the folder and choose search. Always
works. If you have one particular search see
news://msnews.microsoft.com/[email protected]

for three ways of doing it. From memory the easy third way works for
search.

Thanks
JS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top