Solved Log off & Standby in 1-Click ?

TheArt

New member
Hey all I was wondering if I can log off from my account and standby my computer in one, or two clicks.
Currently I've to do the following: Start / click on the white arrow / log off / clicking the arrow of the red icon on the right / Standby

I know it may be considered a silly request but doing it several times a day can be a little frustrating..

Thanks in advance.

EDITED.
 

My Computer

OS
Windows 7 Ultimate 32bit
CPU
Core 2 E6750
Motherboard
ASUS P5KPL
Memory
2gb
Graphics Card(s)
NVIDIA GeForce 210
Sound Card
Creative Audigy 2 ZS
Monitor(s) Displays
Philips 17''
Screen Resolution
1280x1024
Keyboard
Logitech K300
Mouse
Logitech M500 Corded Mouse

My Computer

Computer Manufacturer/Model Number
Hewlett packard/p6512uk
OS
Microsoft Windows 7 Home Premium 64-bit 7600
CPU
IIx4 amd athelon 635 processor
Motherboard
FOXCONN 2AA9
Memory
2x2gb
Graphics Card(s)
ati radeon HD 5450
Sound Card
(1) Realtek High Definition Audio (2) AMD High Definition
Monitor(s) Displays
samsung lcd tv 32"
Screen Resolution
1360x 768
Hard Drives
(1) WDC WD10 01FAES-60Z2A0 SATA Disk Device (2) Maxtor OneTouch USB Device (3) ST310003 33AS USB Device (4) WD My Book 1111 USB Device
PSU
?
Cooling
air!
Keyboard
wireless hp
Mouse
wireless Hp,optical
Internet Speed
1.10mb/s
Antivirus
MSE
Browser
Firefox
Not sure what the point of logging off before putting the machine to sleep is, anyway?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
Not sure what the point of logging off before putting the machine to sleep is, anyway?

Assuming that logging on is password protected, if anyone wakes up the PC, they will not be able to use it without logging in. That's how I do it anyway.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
DIY Re-built.
OS
Windows 7 Home Premium 64Bits SP1
CPU
Intel i7-920
Motherboard
ASUS P6TD Deluxe
Memory
12 Gb (6x2GB Corsair XMS TR3X3G1600C9 G) Tri Channels
Graphics Card(s)
ASUS GTX-970 Turbo
Sound Card
ASUS On Board SoundMax
Monitor(s) Displays
Samsung UN46D6500 46" TV
Screen Resolution
1920x1080
Hard Drives
1 OCZ SSD Agility Sata III 120Gb
1 Samsung 1Tb
1 Samsung 750Gb
1 Western Digital 500Gb(Mounted in ext eSata case)
PSU
Enermax CUG-950W
Case
Full ATX (Generic)
Cooling
Fans (6) 80mm
Keyboard
Saitek Eclipse II
Mouse
Cyborg R.A.T-5
Internet Speed
Comcast 105.0 MBPS
Antivirus
AVG
Browser
Waterfox v40.02(x64)
Other Info
- Logitech X-530 5.1 Sound speakers.
- APC ES-1300.
- Arris TG862G/CT Modem/Router.
- Samsung BD-083A Blue Ray Player
- Lite On iHBS212 Blue Ray Burner
- Nippon Labs All-In-One Card Reader/Writer W/USB & eSata
Exactly! Even without logging off, if you put the PC to sleep you still have to re-enter your password after waking it up. Except you don't actually have to log in (as in reload the user profile), because the user was never logged off.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
Exactly! Even without logging off, if you put the PC to sleep you still have to re-enter your password after waking it up. Except you don't actually have to log in (as in reload the user profile), because the user was never logged off.

Hummm; if my PC goes to sleep from the desktop, it will wake up at the desktop (no log-in required). If set to sleep after a log-off, it will wake up at the log-on screen.

Perhaps there is a different way to set up how a PC wakes up from sleep mode? Or does it wakes up differently after manually set to sleep as opposed to automatically set to sleep by the power options settings?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
DIY Re-built.
OS
Windows 7 Home Premium 64Bits SP1
CPU
Intel i7-920
Motherboard
ASUS P6TD Deluxe
Memory
12 Gb (6x2GB Corsair XMS TR3X3G1600C9 G) Tri Channels
Graphics Card(s)
ASUS GTX-970 Turbo
Sound Card
ASUS On Board SoundMax
Monitor(s) Displays
Samsung UN46D6500 46" TV
Screen Resolution
1920x1080
Hard Drives
1 OCZ SSD Agility Sata III 120Gb
1 Samsung 1Tb
1 Samsung 750Gb
1 Western Digital 500Gb(Mounted in ext eSata case)
PSU
Enermax CUG-950W
Case
Full ATX (Generic)
Cooling
Fans (6) 80mm
Keyboard
Saitek Eclipse II
Mouse
Cyborg R.A.T-5
Internet Speed
Comcast 105.0 MBPS
Antivirus
AVG
Browser
Waterfox v40.02(x64)
Other Info
- Logitech X-530 5.1 Sound speakers.
- APC ES-1300.
- Arris TG862G/CT Modem/Router.
- Samsung BD-083A Blue Ray Player
- Lite On iHBS212 Blue Ray Burner
- Nippon Labs All-In-One Card Reader/Writer W/USB & eSata
Hmm, strange. I actually have a password on my login; do you? Or do you just log in by clicking on the username?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
Hmm, strange. I actually have a password on my login; do you? Or do you just log in by clicking on the username?

Yes; I have a password on my login.

Just tried it to be certain I was'nt saying something wrong.

- After logoff and then sleep, password needed at after wakeup.
- Set to sleep from desktop; PC woke up at desktop. No login/password required.

Will allow power option to put PC to sleep in two hours without logging off and verify state it wakes up in the morning.
 
Last edited:

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
DIY Re-built.
OS
Windows 7 Home Premium 64Bits SP1
CPU
Intel i7-920
Motherboard
ASUS P6TD Deluxe
Memory
12 Gb (6x2GB Corsair XMS TR3X3G1600C9 G) Tri Channels
Graphics Card(s)
ASUS GTX-970 Turbo
Sound Card
ASUS On Board SoundMax
Monitor(s) Displays
Samsung UN46D6500 46" TV
Screen Resolution
1920x1080
Hard Drives
1 OCZ SSD Agility Sata III 120Gb
1 Samsung 1Tb
1 Samsung 750Gb
1 Western Digital 500Gb(Mounted in ext eSata case)
PSU
Enermax CUG-950W
Case
Full ATX (Generic)
Cooling
Fans (6) 80mm
Keyboard
Saitek Eclipse II
Mouse
Cyborg R.A.T-5
Internet Speed
Comcast 105.0 MBPS
Antivirus
AVG
Browser
Waterfox v40.02(x64)
Other Info
- Logitech X-530 5.1 Sound speakers.
- APC ES-1300.
- Arris TG862G/CT Modem/Router.
- Samsung BD-083A Blue Ray Player
- Lite On iHBS212 Blue Ray Burner
- Nippon Labs All-In-One Card Reader/Writer W/USB & eSata
PsShutdown

The Mark Russinovich utilities are first rate. I've never had a problem using them.

edit: if you want to do it with a click just make a .cmd file with all the switches. Put it and the exe in a directory in your Path. Make a shortcut.

Here's something sort of similar by a guy I know on another board. It's called Boot Snooze. I forget exactly why there's a reboot involved. Maybe to have it work on the timer or something to do with login. But anyway, you can look it over:

http://skwire.dcmembers.com/fp/?page=boot-snooze
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Also you can roll your own using AutoIt3 scripting language.

To go into Standby is trivial

Code:
If Not Shutdown(32) Then MsgBox(0x1010,"Error","Standby Failed!")
Exit
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Power options... of course. Now I remember.

There is one setting in the advanced options for your active power plan, namely require password to be entered upon waking from sleep. I have that setting enabled.

I bet it's disabled for you...
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
Power options... of course. Now I remember.

There is one setting in the advanced options for your active power plan, namely require password to be entered upon waking from sleep. I have that setting enabled.

I bet it's disabled for you...

Yes it is. Just checked it. Had forgotten about this setting.

Guess this explains the difference.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
DIY Re-built.
OS
Windows 7 Home Premium 64Bits SP1
CPU
Intel i7-920
Motherboard
ASUS P6TD Deluxe
Memory
12 Gb (6x2GB Corsair XMS TR3X3G1600C9 G) Tri Channels
Graphics Card(s)
ASUS GTX-970 Turbo
Sound Card
ASUS On Board SoundMax
Monitor(s) Displays
Samsung UN46D6500 46" TV
Screen Resolution
1920x1080
Hard Drives
1 OCZ SSD Agility Sata III 120Gb
1 Samsung 1Tb
1 Samsung 750Gb
1 Western Digital 500Gb(Mounted in ext eSata case)
PSU
Enermax CUG-950W
Case
Full ATX (Generic)
Cooling
Fans (6) 80mm
Keyboard
Saitek Eclipse II
Mouse
Cyborg R.A.T-5
Internet Speed
Comcast 105.0 MBPS
Antivirus
AVG
Browser
Waterfox v40.02(x64)
Other Info
- Logitech X-530 5.1 Sound speakers.
- APC ES-1300.
- Arris TG862G/CT Modem/Router.
- Samsung BD-083A Blue Ray Player
- Lite On iHBS212 Blue Ray Burner
- Nippon Labs All-In-One Card Reader/Writer W/USB & eSata
Thanks for all the replies, now I'll explain my situation better:
I have 2 accounts on this pc. My specs are quite low. So if the other account needs all the power but I only clicked the shortcut "Standby" my account remains protected by password, yes, but remains logged in -> with running programs. Instead logging off and then click standby resolves the issue.
In other words I would like to unite the Log Off button with the Standby one. Gadgets aren't the solution as I've seen. Writing some commands and then make an .exe can be the solution, but I have no idea how to do it.

Could anyone help?
 

My Computer

OS
Windows 7 Ultimate 32bit
CPU
Core 2 E6750
Motherboard
ASUS P5KPL
Memory
2gb
Graphics Card(s)
NVIDIA GeForce 210
Sound Card
Creative Audigy 2 ZS
Monitor(s) Displays
Philips 17''
Screen Resolution
1280x1024
Keyboard
Logitech K300
Mouse
Logitech M500 Corded Mouse
I think a difficulty may be if you log off, then the process that would ordinarily put you in Standby would stop running. The utility may have to run as a Windows Service.

I just looked at AutoHotKey Shutdown function. It's the same as AutoIt3 in that the code for logoff is 0. You add the codes together. Therefore there's no distinction between going into Standby and logging off first then doing Standby(which makes me think it's not possible using a normal app.)
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
I think the difference here is the terminology you're using, which can be ambiguous. From what I gather, you're looking to shut down all programs and log off (like you're clicking the log off button) of your account and then sleep, rather than just suspend your processes and lock the desktop (like you're clicking Win + L shortcut) and then sleep. If this is correct, you can create a Logoff shortcut at the below link.

http://www.sevenforums.com/tutorials/61276-log-off-shortcut-create.html

I'm not sure if this will work, but you can create the above "logoff" shortcut, create the "sleep" shortcut as pointed to earlier in the thread, then create a .bat file that calls both. For example, if you create both shortcuts on your desktop, you would simply create a file called logoffandsleep.bat with the following:

Code:
rundll32 shell32.dll,ShellExec_RunDLL "C:\Users\YOURNAME\Desktop\Logoff.lnk"
rundll32 shell32.dll,ShellExec_RunDLL "C:\Users\YOURNAME\Desktop\Sleep.lnk"

However, I could very well see a problem with only the first logoff command being run and not the sleep command as once you're logged out and that command is completed you're no longer running in an area that might allow you to perform the sleep action via a script. But, it's worth a shot.
 

My Computer

OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
Thank you Fligi7 I will try later and report here!
 

My Computer

OS
Windows 7 Ultimate 32bit
CPU
Core 2 E6750
Motherboard
ASUS P5KPL
Memory
2gb
Graphics Card(s)
NVIDIA GeForce 210
Sound Card
Creative Audigy 2 ZS
Monitor(s) Displays
Philips 17''
Screen Resolution
1280x1024
Keyboard
Logitech K300
Mouse
Logitech M500 Corded Mouse
My guess would be once you log off, then there's no user with shutdown privilege. But it's just a guess.
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
I suspected that too, however I gave a try.

  • Created Sleep shortcut / created LogOff shortcut (with the tutorial on this site, also linked above).
  • Created the .bat with that two lines.
When I click on it, my pc logs off and doesn't go in sleep mode. So only the first line is executed as we thought.

:(
 

My Computer

OS
Windows 7 Ultimate 32bit
CPU
Core 2 E6750
Motherboard
ASUS P5KPL
Memory
2gb
Graphics Card(s)
NVIDIA GeForce 210
Sound Card
Creative Audigy 2 ZS
Monitor(s) Displays
Philips 17''
Screen Resolution
1280x1024
Keyboard
Logitech K300
Mouse
Logitech M500 Corded Mouse
You could try on this forum:
Coding Snacks - DonationCoder.com

Please read the rules for Post New Requests Here subforum. The moderator on that forum is very good with AHK. He enjoys writing small utilities to order, which is the point of Coding Snacks. If you make clear the utility will likely need to be written as a service he can tell you if he can do it. There are "service wrapper" type programs that make it easy to configure things as a service but they might not be useful for this type of utility. The moderator is skwire.
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Back
Top