User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 391,609 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,621 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 304 | Replies: 7
Reply
Join Date: Jul 2008
Posts: 9
Reputation: justinclev is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
justinclev justinclev is offline Offline
Newbie Poster

RESTARTING A laptop

  #1  
Jul 13th, 2008
well i wanted to see if i could make a secruity program
i got it set up but i wanted to make it restart the computer if the wrong passwords entered

im using dev C++

please can you help
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,809
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Rep Power: 11
Solved Threads: 184
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: RESTARTING A laptop

  #2  
Jul 13th, 2008
Win32
Linux
Mac OS X

Hope this helps.
Reply With Quote  
Join Date: Dec 2007
Posts: 115
Reputation: TheBeast32 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
TheBeast32's Avatar
TheBeast32 TheBeast32 is offline Offline
Junior Poster

Re: RESTARTING A laptop

  #3  
Jul 14th, 2008
If you're lazy and on windows:

  1. system("shutdown -r");
"I'm not dumb. I just have a command of thoroughly useless information."
- Calvin, of Calvin and Hobbes
Reply With Quote  
Join Date: Jul 2008
Posts: 9
Reputation: justinclev is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
justinclev justinclev is offline Offline
Newbie Poster

Re: RESTARTING A laptop

  #4  
Jul 14th, 2008
thank you ill give it a try
Reply With Quote  
Join Date: Sep 2004
Posts: 6,017
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 414
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: RESTARTING A laptop

  #5  
Jul 14th, 2008
>i wanted to make it restart the computer if the wrong passwords entered
That's one of the worst ideas I've ever heard. What if other users are logged onto the system? Are you going to kill their session just because somebody fat-fingered a password? What if this program is installed on a server?! If the whole idea is to make one person wait for the computer to reboot so that brute forcing the password would take a painfully long time, why don't you just lock the account for X minutes?

If this is the extent of your security design skills, I highly recommend you not try to make an ad hoc system. Instead build on an existing and proven design, because all you're likely to do is create a huge mess that isn't nearly as secure as you think.
Member of: Beautiful Code Club.
Reply With Quote  
Join Date: Jul 2008
Posts: 9
Reputation: justinclev is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
justinclev justinclev is offline Offline
Newbie Poster

Re: RESTARTING A laptop

  #6  
Jul 14th, 2008
ok but the main thing is its not anyones but mine
the computer would only be used by me
and the program would be made just incase my brother or sister try to go on
Reply With Quote  
Join Date: Sep 2004
Posts: 6,017
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 414
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: RESTARTING A laptop

  #7  
Jul 14th, 2008
>ok but the main thing is its not anyones but mine
>the computer would only be used by me
>and the program would be made just incase my brother or sister try to go on
The guy who wrote DOS didn't expect Microsoft to buy it and turn it into a huge product. Rationalizing poor designs and sloppy code with "but it's only for me" is where a lot of the field's biggest headaches come from.
Member of: Beautiful Code Club.
Reply With Quote  
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,809
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Rep Power: 11
Solved Threads: 184
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: RESTARTING A laptop

  #8  
Jul 14th, 2008
You still haven't indicated what OS you are using, but doesn't it do that for you anyway? On each one of Windows, Mac, and Linux you can set yourself a secure password and disable all other user accounts but yours.

That way, only the person who knows the password (you) can log onto your laptop. (Which is the same thing you are stated as doing.)

If it is just for leaving it lying around for a moment, you can always trigger the screensaver, which again on each system mentioned can password-protect the computer.

If you want a quick script to trigger the screensaver on demand I can give you one. There are also programs online that will do it if you move the mouse into a corner of the display or something like that...
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C++ Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 12:10 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC