ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

SOLVED: Log off & Standby in 1-Click

<< < (4/5) > >>

MilesAhead:
At this point the simplest method would be to use 4wd's task as he set it up.  Use schtasks.exe in a .cmd to /DISABLE it and put a shortcut to that batch in All Users StartUp folder. (usually C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup.)

In your "IWantToLogOffAndStandby" batch, just enable the task using the /ENABLE parameter, then log off.  The log off should trigger the task to go into standby.  When you log in, the task gets hit with /DISABLE.

That way it only goes into Standby when you log off via the special batch. The Standby task is disabled at logon no matter who logs in if you have the shortcut in All Users Startup. Pin the "IWantToLogOffAndStandby" shortcut to TaskBar or use something like Standalone Stacks 2 to have it accessible.





Ath:
OK, took 5 minutes so I've got it working. :)-4wd (October 28, 2011, 05:54 PM)
--- End quote ---
Kudo's, 4wd :Thmbsup:

I'll be testing this later today, looks like fun 8)

TheArt:
@4wd Thanks man you've almost done what I want!
But there are two little problems:

1) I've done anything you had shown me in Task Scheduler but when I log off, after 30sec it HIBERNATES. I tried to disable hybernation but it didn't helped.

2) I noticed that if I log off from my account and my brother wants to use his one immediately, he logs on but the task isn't stopped and so it hibernates. I guess that must be added something like that: "Disable the task when a LogOn is performed".
Unfortunately I don't know how to do it.

Anyway you found a way to do the Logoff&Standby without any program which is made by someone!

MilesAhead:
Here's the command to put in All Users Startup folder

(change "test" to whatever you named the task)

You can make a batch to run commands with any text editor.
Save the file as Command.cmd with "Command" as whatever you want to name it.  Example: save the line below as file DisableStandby.cmd

schtasks /Change /TN "test" /DISABLE

Put a shortcut to it in the All Users Startup folder(see my post above for location.)

Make a .cmd file LogoffAndStandby.cmd
with these 2 lines:


schtasks /Change /TN "test" /ENABLE
shutdown /l /t 10

Make a shortcut to it that you can double click to logoff and standby in one shot.

MilesAhead:
This link may also be of interest:

http://hardforum.com/showthread.php?t=1538805

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version