topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 10:28 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: PC Shut down  (Read 7907 times)

Nzyme

  • Participant
  • Joined in 2011
  • *
  • Posts: 100
    • View Profile
    • Donate to Member
PC Shut down
« on: August 20, 2011, 08:46 PM »
Hi guys,

Ok, so this is what I have searched for and have landed here. I need a tiny little program that can automatically shutdown my PC if the following 2 conditions are met simultaneously:

1. No user has logged in &
2. After after a certain amount of time / inactivity. When the user has specified an idle time duration (during program setup).

Often, many of my office systems have no one logged in the whole night. I really feel that this is a must have program and would save a lot of power. I think this would have to be coded as a service. Request any of the coders here to help me with this.

Thanks!

KynloStephen66515

  • Animated Giffer in Chief
  • Honorary Member
  • Joined in 2010
  • **
  • Posts: 3,761
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #1 on: August 20, 2011, 08:57 PM »
Would the default Windows Power Options not do what you require for the most part?

Nzyme

  • Participant
  • Joined in 2011
  • *
  • Posts: 100
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #2 on: August 20, 2011, 09:19 PM »
No, I just checked the power options in Win 7 and it does not provide this.  ;)

KynloStephen66515

  • Animated Giffer in Chief
  • Honorary Member
  • Joined in 2010
  • **
  • Posts: 3,761
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #3 on: August 20, 2011, 10:06 PM »
OK, was just checking to see if it could save you some headaches :P - Although, Win7 will put your pc to sleep after X minutes, and there are several readily available peices of software that will send (via commandline) the shutdown request to all machines.

Also if your the network admin, you can also simply commandline this yourself at the end of the day (maybe write a batch file for ease) which will simply shut down every workstation on the network of your choice :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: PC Shut down
« Reply #4 on: August 20, 2011, 10:24 PM »
does sound like it would be a good coding snack.

Nzyme

  • Participant
  • Joined in 2011
  • *
  • Posts: 100
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #5 on: August 20, 2011, 11:48 PM »
The power options in win 7 and the software available (most of which I have tested) are timer based and give an option to shutdown the PC at a certain time. But this is not my requirement. I need to shutdown my PC when there is no user logged in and there is no activity (for example no activity for half hour).

Can you guys help me with coding this as a service for this (I guess this needs to be coded as a service as no user has logged in)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #6 on: August 21, 2011, 12:06 AM »
I found this:

http://www.apponic.c...oshutdown-pro-44764/

It says "shareware" which implies you can try it before purchase. I have no clue if it works. But it states it can shut down without a user being logged on.


4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #7 on: August 21, 2011, 05:14 AM »
To run when no user has logged in, it has to either be a service or run using the Windows Startup script feature.

And this is no trivial thing if you want it to keep running after a user has logged out....I spent quite some time trying to get a program to run in a similar situation, (see here).

However, if it's not necessary that the program run after a user logoff then it should be possible write a AutoIt program that'll do the job.

EDIT: Otherwise, take a look at DShutdown which can do what you want and you can also run it as a Windows Startup script using it's command line options, (which should take care of the pre-user logon requirement).
« Last Edit: August 21, 2011, 05:27 AM by 4wd »

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,045
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #8 on: August 21, 2011, 07:03 AM »
I forgot about DShutdown.  I looked for various software a few years back but eventually gave up.  it's too bad 4wd that we never got the wirelesss sensor program too work right.  But you gave it your best!  Thanks!

Nzyme

  • Participant
  • Joined in 2011
  • *
  • Posts: 100
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #9 on: August 21, 2011, 08:23 AM »
Ok, I just tried DShutdown to no avail. Firstly, I started the service program and then in the main options, I tried selecting first the "Power Off" and then "Shutdown" while setting the idle time out option and guess what, the PC never shut down at all after I logged out. (Atleast AutoShutdown Pro does that part)...

Secondly, even if any program is able to shut down after a period of inactivity, how can it check if any user is logged in or not...(For example, I wouldn't want the program to shut my PC when I have a download in progress and have locked it.) 8)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #10 on: August 21, 2011, 06:23 PM »
http://www.barefooti...com/autoshutdown.htm

Claims it uses a service to work when no user is logged in.
It says 30 day trial. I'd just make a restore point before installing.

Nzyme

  • Participant
  • Joined in 2011
  • *
  • Posts: 100
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #11 on: August 21, 2011, 10:49 PM »
@MilesAhead: Bro, please read my last post above

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #12 on: August 21, 2011, 11:18 PM »
@MilesAhead: Bro, please read my last post above

You don't say if it shuts down when someone never logged in.
That's what I'm curious about.

Nzyme

  • Participant
  • Joined in 2011
  • *
  • Posts: 100
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #13 on: August 21, 2011, 11:29 PM »
I think I have to give up on this one... If any of u guys have any batch file or any kinda custom coded program, then please share it with me...

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #14 on: August 22, 2011, 12:39 AM »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: PC Shut down
« Reply #15 on: August 22, 2011, 01:01 AM »
If they are on the same network this approach may be better(assuming it works)

http://www.powershel...ft/4402/Default.aspx