-
Re: "This computer's going to sleep after 3 minutes"
While I realize that in todays environment this may be a novel concept, try it anyway. It only requires a few (real world) constants to work.
Code:
Option Explicit
Const P As String = "I'm the Parent"
Const C As String = "You're the Child"
You're the parent, so you can figure out the rest of the code!
My Father had to say it only once! There would be NO next time!!
-
Re: "This computer's going to sleep after 3 minutes"
hi,
what type of router do you have ? include the model No and a rough date purchsed. (firmware Revision)
I have had both D_Link and a belkin. these both have the option via the firewall config section to restrict access times on selected IPs.
Please also remember you will need to update the password.
The router manufacturer will have a web site to assist you with this.
I have not tried this myself yet. so i will try when i get home tonight and let you know how i get on
thanks
David
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by krtxmrtz
I did but the program didn't seem to be running. It was correctly placed in the registry, I opened it with regedit and it was there all right, but nothing happened and when I looked at the processes by ctrl/alt/del-ing it wasn't listed.
Try removing the "On Error Resume Next" and see if anything comes up. 9/10 times if there is a problem with this it is because the user does not have the correct permissions.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Lord Orwell
he didn't say vb file (which DOES in fact have shell) he said vbs which is visual basic scripting engine...
I wrote:
This seems easy enough only how do you shell in a vb file? I think there's no shell command.
...but I actually meant:
This seems easy enough only how do you shell in a vbs file? I think there's no shell command.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by CDRIVE
While I realize that in todays environment this may be a novel concept, try it anyway. It only requires a few (real world) constants to work.
Code:
Option Explicit
Const P As String = "I'm the Parent"
Const C As String = "You're the Child"
You're the parent, so you can figure out the rest of the code!
My Father had to say it only once! There would be NO next time!!
Unfortunately things are not always as they used to be when we ourselves were younger. But there's much in what you say.
-
Re: "This computer's going to sleep after 3 minutes"
I'm really glad that you've got as far as you have, as I'm sure you've learnt a lot, but see post #18 (Hopefully, I'm wrong) :D
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by krtxmrtz
I wrote:
This seems easy enough only how do you shell in a vb file? I think there's no shell command.
...but I actually meant:
This seems easy enough only how do you shell in a vbs file? I think there's no shell command.
ok well the command is not shell in vbscript. Here's how it's done in vbscript:
Code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "C:\WINDOWS\system32\shutdown.exe placeparametershere"
on a side note: If you use "kill" on a file and it invokes shutdown dialog, it's because you did in fact delete the file, and windows needs to restart to fix the mistake you just made by copying it from the protected files directory.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Davadvice
hi,
what type of router do you have ? include the model No and a rough date purchsed. (firmware Revision)
...
All right, I'll stand by. In the meantime: it's a D-Link, model DSL-G624T, purchased June 2007.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Doogle
I'm really glad that you've got as far as you have, as I'm sure you've learnt a lot, but see post #18 (Hopefully, I'm wrong) :D
Actually, by the same token she might learn some lock picking... :lol:
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Lord Orwell
ok well the command s nt shell in vbscript. Here's how it's done in vbscript
:
Code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "C:\WINDOWS\system32\shutdown.exe placeparametershere"
Thanks, oh Lord! Now all I have to do is work a little bit on the interface of that msgbox, e.g. allowing bypass of the logoff code by means of a password, lest I should fall into my own trap :D
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by krtxmrtz
This seems easy enough only how do you shell in a vb file? I think there's no shell command.
This is the code in a VBS (VB Script) file that can shutdown Windows when run, that uses Shell32.dll command:
Code:
Dim oShell
Set oShell = CreateObject("Shell.Application")
oShell.ShutdownWindows
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by krtxmrtz
Thanks, oh Lord! Now all I have to do is work a little bit on the interface of that msgbox, e.g. allowing bypass of the logoff code by means of a password, lest I should fall into my own trap :D
well, with a running timer displayed of, say, three minutes, this gives you plenty of time to run this from a command prompt:
which aborts the shutdown operation :D
-
Re: "This computer's going to sleep after 3 minutes"
As far as I know, tasks scheduled by one user are hidden from other users. But if I schedule a session logoff, is that going to have effect on my own session only?
-
1 Attachment(s)
Re: "This computer's going to sleep after 3 minutes"
In the meantime, here's what I've been doing. After the app has been compiled, it should be scheduled to run at a certain time and keep trying every 5 minutes, in case the computer was down at the scheduled time. Aside from this, the password should be somewhat encrypted, I'll implement the code as soon as possible.
Still I haven't had a chance to try if it kicks out the current user, as it will be scheduled by another user (the administrator = me)
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by krtxmrtz
...
Still I haven't had a chance to try if it kicks out the current user, as it will be scheduled by another user (the administrator = me)
Now, it turns out it doesn't even run when I schedule it in my own session. Of course, it does run if I double-click on the compiled app. But I just thought, is it necessary to pack it for distribution and install it from that pack?
-
Re: "This computer's going to sleep after 3 minutes"
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by krtxmrtz
Now, it turns out it doesn't even run when I schedule it in my own session. Of course, it does run if I double-click on the compiled app. But I just thought, is it necessary to pack it for distribution and install it from that pack?
Scheduled Tasks are user specific. So tasks scheduled from one user account won't run from another. You should login from that account from which you want the task to run. But then beware that it can be stopped by that user (your daughter in this case). So scheduling is not a full proof method.
Have a nice time finding alternatives. :)
Pradeep
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by anhn in Post#36
Another suggestion:
...
Use Task Scheduler, add:
...
Assumed that she doesn't know how to use task scheduler to cancel a task.
...
That was the assumption.
Quote:
Originally Posted by Bill Gates for Vista
A scheduled task, by default, runs within the security context of the user who scheduled the task and only runs if that user is logged on when the task is triggered. To modify this, change the settings in the Security options section of the General tab when a task's properties are displayed.
You can select a different user or group account for a task to run under by clicking the Change User or Group button. The button will be titled Change User if your user account is not a member of the Administrators group. User accounts that are not in the Administrators group can only specify a user account for a task to run under.
You can specify that a task should run even if the account under which the task is scheduled to run is not logged on when the task is triggered. To do this, select the radio button labeled Run whether user is logged on or not. If this radio button is selected, tasks will not run interactively. To make a task run interactively, select the Run only when user is logged on radio button.
When the Run whether user is logged on or not option if selected, you may be prompted to supply the credentials of the account when saving the task, regardless of whether you select the checkbox labeled Do not store password or not. If the account is not logged on when the corresponding task is triggered, the service will use the saved credentials to run as the specified account and will have unconstrained use of the resulting token.
If you select the checkbox labeled Do not store password, Task Scheduler will not store the credentials supplied on the local computer, but will discard them after properly authenticating the user. When required to run the task, the Task Scheduler service will use the “Service-for-User” (S4U) extensions to the Kerberos authentication protocol to retrieve the user’s token.
When using S4U the ability of the service to use the security context of the account is constrained. In particular, the service can only use the security context to access local resources.
Notes
If your task requires access to network resources, you cannot use S4U; doing so will cause your task to fail. The only exception is the case where constrained delegation was established between the computers involved in the operation.
S4U functionality is only available within an environment where all the domain controllers (DCs) in the domain are running the Windows Server 2003 or later operating system.
If you are using the S4U functionality, the task will not have access to encrypted files.
If you are using the S4U functionality, make sure the Logon as batch job policy is set for the user. This policy is accessible by opening the Control Panel, Administrative Tools, and then Local Security Policy. In the Local Security Policy window, click Local Policy, User Rights Assignment, and then Logon as batch job.
For more information about the S4U Kerberos extensions, see RFC 1510.
If you select the checkbox labeled Run with highest privileges, Task Scheduler will run the task using an elevated privileges token rather than a least privileges (UAC) token. Only tasks that require elevated privileges to complete their actions should run with elevated privileges. For more information, see User Account Control.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by anhn
...Originally Posted by Bill Gates for Vista...
Then it doesn't apply for me as I'm using XP.
-
Re: "This computer's going to sleep after 3 minutes"
hi, had a look here for the user guide for that model of router, it would apear that your router does not have the ability to restrict access at certain times.
I never got the chance to try mine out but will give it a go over the next few days.
Can you not get a babysitter type application? that may be more appropriate for the pc that way you can do more than just shut the PC down.
David
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by krtxmrtz
...is it necessary to pack it for distribution and install it from that pack?
Yes it is, I've just checked. Now I'm going to see if it works (on other users' sessions) if I place a key in the register. It didn't work in my earlier attempt but it was probably for the same reason.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Davadvice
...Can you not get a babysitter type application?...
I just hadn't thought of these, so probably I'll have a go at them.
Thanks for the link to the d-link manual.
-
Re: "This computer's going to sleep after 3 minutes"
why are everyone's avatars games?
-
Re: "This computer's going to sleep after 3 minutes"
If you really want to control the computer and the activities performed on it, you must systematically implement the correct strategy and strict policy. You must create a limited user account and force your users to login through limited user account(s) only.
Unless you do this, the user is limited only by his imaginations when s/he is logged in as Administrator. Whatever you do as an Administrator can also be reversed or stopped by Administrator accounts.
I'll recommend the following steps:
1. Change the password of ADMINISTRATOR account to something only you know and do not reveal it to anyone.
2. Change all other account types to Power User. Power Users have adequate control of their own accounts, but can't interfere with other accounts. If there are no other accounts create at least one.
3. Let that account be used by other users of your system.
4. If your file system is not NTFS you must also convert it to NTFS which has more security than FAT or FAT32.
Now you have full proof mechanism to force everyone using your computer to work according to you. You can go ahead and implement any security measures you want.
Here are a few things you can do:
1. Create an application or a service which can do what you want as suggested in previous posts.
2. If you have another computer at your home and they are networked, your work is much easier. You can use it to control this one anytime. e.g. Execute a remote shutdown or schedule it to execute a remote shutdown at whatever time you want. If you want a greater control than just shutting it down, you may even use a third party tool like LogMeIn, PCAnywhere etc. to view/control the activities on that computer.
Hope this helps.
Pradeep :)
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Pradeep1210
If you really want to control the computer and the activities performed on it, you must systematically implement the correct strategy and strict policy. You must create a limited user account and force your users to login through limited user account(s) only.
Unless you do this, the user is limited only by his imaginations when s/he is logged in as Administrator. Whatever you do as an Administrator can also be reversed or stopped by Administrator accounts.
I'll recommend the following steps:
1. Change the password of ADMINISTRATOR account to something only you know and do not reveal it to anyone.
2. Change all other account types to Power User. Power Users have adequate control of their own accounts, but can't interfere with other accounts. If there are no other accounts create at least one.
3. Let that account be used by other users of your system.
4. If your file system is not NTFS you must also convert it to NTFS which has more security than FAT or FAT32.
Now you have full proof mechanism to force everyone using your computer to work according to you. You can go ahead and implement any security measures you want.
Here are a few things you can do:
1. Create an application or a service which can do what you want as suggested in previous posts.
2. If you have another computer at your home and they are networked, your work is much easier. You can use it to control this one anytime. e.g. Execute a remote shutdown or schedule it to execute a remote shutdown at whatever time you want. If you want a greater control than just shutting it down, you may even use a third party tool like LogMeIn, PCAnywhere etc. to view/control the activities on that computer.
Hope this helps.
Pradeep :)
Thanks for the advice. The thing is all accounts but mine (I'm the administrator) are limited, so I guess I'm on the right track.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Lord Orwell
why are everyone's avatars games?
:eek: Chess is not a game... Chess is life! (Bobby Fischer) :rolleyes:
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by krtxmrtz
...Chess is life! (Bobby Fischer) :rolleyes:
Wow, what a coincidence, I quoted him just a short while before I read about his death on the papers.
I know he was somewhat off his onion but strictly sticking to chess, he was a genius. May he rest in peace :cry:
-
Re: "This computer's going to sleep after 3 minutes"
dont know if anyone else mentioned this because i got to the part where someone said "she can change the time of day"... and decided to post.
how about checking a reliable online clock that ALWAYS has the correct time of day? she cant change that. lol
this might help... http://www.ntp.org/
-
Re: "This computer's going to sleep after 3 minutes"
if you follow the "give her her own account" advice listed earlier, you can assign a security setting that prevents her from changing the date/time.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Lord Orwell
if you follow the "give her her own account" advice listed earlier, you can assign a security setting that prevents her from changing the date/time.
I guess you'd also need a BIOS Password so she couldn't change the Time there, before booting, and / or change the boot sequence so she could load a CD (of which there are a few around) with which she could change the Admin Password or promote her own to Admin status.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Doogle
I guess you'd also need a BIOS Password so she couldn't change the Time there, before booting, and / or change the boot sequence so she could load a CD (of which there are a few around) with which she could change the Admin Password or promote her own to Admin status.
and also weld the case shut since every computer made has a bios-password-bypass jumper on the motherboard.
-
Re: "This computer's going to sleep after 3 minutes"
None of my business really but I think CDRIVE had it right in post #41. Tell the child what the rule is and what the consequences will be if the rule isn't followed. If the rule is broken open the PC case and take out and hide a memory board or even the C drive:)
-
Re: "This computer's going to sleep after 3 minutes"
I might suggest a batch command. Go to "Start" > "Run" > type in CMD > go tinker with the " shutdown " commands " shutdown /? "
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Doogle
I guess you'd also need a BIOS Password so she couldn't change the Time there, before booting, and / or change the boot sequence so she could load a CD (of which there are a few around) with which she could change the Admin Password or promote her own to Admin status.
well obviously you're going to want to lock the bios out. But if you have the system synced to internet time (a OS feature), it won't matter what it is set at in the bios. Also, those programs can set a password but can't recover a password, so if she were to change the admin password, the admin would notice next time he tried to log in and had the wrong password.
-
Re: "This computer's going to sleep after 3 minutes"
@krtxmrtz, I went through all posts from the beginning and had some inputs into this thread. But this is an honest advice:
You shoudn't do that if you don't want your kid says bad thing about you behind your back to her friends.
I agree with CDRIVE in post#41. Tell her: "I want you to turn off the computer before 10:00 PM if you don't want me to apply some disciplines on you."
Explain to her why she must turn the PC off before 10:00 PM every night except, such as, Saturday.
First time: warning. Second time: warning. Third time: apply the strict rule.
Let your kid grows up with responsibilities on what she is doing.
Teach her what is good, what is bad; what she should do, what she shouldn't do from every simple things.
Train her how to judge every thing in every day of her life.
Believe me, with that you won't get headache when she gets older.
-
Re: "This computer's going to sleep after 3 minutes"
sound advice... but maybe he already tried that route and it hasn't worked. no matter what my parents did or said, i found a way onto the computer. but its not like i was hacking into bank computers... i just enjoyed playing games waaaaaay too much.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by CDtech026
sound advice... but maybe he already tried that route and it hasn't worked. no matter what my parents did or said, i found a way onto the computer. but its not like i was hacking into bank computers... i just enjoyed playing games waaaaaay too much.
The problem is she has a lot of homwework to do and the computer tends to be busy at all times, so when she says "I couldn't do it earlier because my sister was using it" I don't want to be too severe because I know it's true, but at the same time I positively know she wastes some time 'you-tubing' and whatnot. The idea of this auto-logoff utility is some sort of practical way to push her into organizing herself a little better.
It's all a matter of finding a midpoint between I being drastic and letting her do what it jolly well pleases her. But of course, I see the point.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by krtxmrtz
...Now I'm going to see if it works (on other users' sessions) if I place a key in the register. It didn't work in my earlier attempt but it was probably for the same reason.
(Leaving aside for now the question of whether or not I'm going to actually implement it) -
I forgot to post that the result was positive when I installed the application with a distribution pack and placed the key in the register. So, the technical issue seems to be kind of resolved.
-
Re: "This computer's going to sleep after 3 minutes"
you could be a little more robust like this: even though it runs on all users, you could check which user is logged in when it starts and exit if it's not her. Consider a nagging pop-up reminding her what time it is instead of a forced shutdown.
-
Re: "This computer's going to sleep after 3 minutes"
Quote:
Originally Posted by Lord Orwell
...Consider a nagging pop-up reminding her what time it is instead of a forced shutdown.
That's more like it... I think you've hit it. I can leave the logout code inactive, reserved as a last trump if everything else fails.