![]() |
||
|
|
Welcome to the Exploding Garrmondo Weiner Interactive Swiss Army Penis. |
GFF is a community of gaming and music enthusiasts. We have a team of dedicated moderators, constant member-organized activities, and plenty of custom features, including our unique journal system. If this is your first visit, be sure to check out the FAQ or our GFWiki. You will have to register before you can post. Membership is completely free (and gets rid of the pesky advertisement unit underneath this message).
|
![]() |
|
Thread Tools |
Problems automatically running a batch file
First, let me explain the story.
I have a sister who's 15 years old. My parents and myself are both worried about her, due to the fact that lately she has been up later than everyone else (till around 12 AM) on the computer/internet. None of us believe she is mature or responsible enough to be left alone down here on the computer that late into the night. Please don't ask me to go any further or start a debate with me on why she needs to be allowed to grow up or what have you. Basically, my parents want me to make it so that she cannot use the computer past 10 PM. All of the networking hardware is in my room, and this computer that my sister uses gets the connection to the internet wireleslly. For the past few days I have simply been unplugging the router's power to shut down our connection. There are two problems though 1) This kills my internet also 2) My sister can hop onto the other network that is floating around here somewhere, it's very slow, but she can and does use it when I disconnect ours So now I'm stepping up a bit and am trying to just shut down the entire computer after a certain point. I have created a batch file that gives the user 30 seconds warning and then shuts down. (shutdown -s incase you were wondering). My problem is I cannot get this file to run as a scheduled task (I would like it to take effect every night at 10 PM) locally. Whenever I try, Windows gives me a "Access is denied" error even though Im logged on as an administrator and have supplied an admin password to the task. Preferrably though, I would like to somehow get it to run remotely, and give control of execution to me at my computer. Is there a way to place the batch file on the target computer and then remotely run it on said computer from my own computer? Better yet, is their a piece of software than can remotely shut down computers? I've tried this one piece of software that was free to download whos name has slipped my mind, but it didn't work, it would alwats cause an error whenever I told it to shutdown (Probably for the same reason Windows cant do it for whatever reason) Jam it back in, in the dark. ![]() |
You can remotely shut down computers with the -m //computername switch on the shutdown command.
So, you could have it entirely run on your computer. Best thing, it won't be nearly as easy to find and "accidentally" delete. There's nowhere I can't reach. |
Merv, I thought it was /m \\COMPUTER_NAME?
It's been too long since I've used Windows, but that's what all my online references say. And if she's not an administrator, you could disable her right to alter the file (since in Scheduled Tasks, it'll run as whoever you set it up with). Beyond that, you can try the below. The first line kills her account (makes it impossible to log in with it), and the second shuts down the box with some extra switches. Code:
net user ACCOUNT_NAME /active:no shutdown /s /f /t:30 /c "Shutting down in 30 seconds. Please save your files." To enable the account again, another scheduled task that calls as below would work fine: Code:
net user ACCOUNT_NAME /active:yes This thing is sticky, and I don't like it. I don't appreciate it. |
I got confused because I have my region settings set to Japanese, so \ shows up as a yen sign, even in command prompts. How ya doing, buddy? |
I can't remember exactly which command I used at the prompt before, but I know it was a shutdown command and I know I had the syntax at one point because it attempted to shutdown the computer downstairs. The only problem as mentioned though, is that when it attempts this, it gives me an "Access Denied" error (Im using a certain application in this example, but it's the same results using plain vanilla CMD).
![]() I was speaking idiomatically. ![]() |
Katie, you know what I think about your sister.
What about... psshutdown \\computer -u user -p psswd so: psshutdown \\family -u KTsHotSis -p lolomgbbq Source: http://www.sysinternals.com/Utilities/PsShutdown.html What kind of toxic man-thing is happening now? ![]() |
Erm, anyways, (Username, Password obviously blacked out) ![]() It's still giving me a denied access message. I just wish I knew why, I tried logging on as both admin accounts on that computer. FELIPE NO ![]() |
Do both computers have the same Workgroup set? If not, I believe remote shutdown attempts will always fail. Further, is the computer actually named "FAMILY"? Check in System Properties to make sure (enter it in the command as displayed--I don't think Windows cares, but you never know).
Next, when the other machine is on, get its IP. I will assume 192.168.0.100, so alter that as necessary below. Then, enter this into Explorer's address bar (as in the File Manager) and hit Enter:
If that works, try running your shutdown command again using the IP address instead of the computer's name? What, you don't want my bikini-clad body? |
Normally this would work fine in a domain environment as your admin password would be globally recognized by the managed system (as it would be looking to Active Directory to authenticate). Since it is merely a workgroup however, the remote system isn't recognizing YOURSYSTEM\Administrator account, and instead needs the FAMILY\Administrator account to perform the remote shutdown. One way to go about getting around this would be to add the YOUISYSTEM\Administrator account (or another account on your system that is a member) to the FAMILY\Administrators group on your sister's PC. I'm not sure if this would work though, or if Windows would even allow you go add a user account from another machine.
How ya doing, buddy? |
That's why I mentioned the account name/passwords being equal.
![]() Back on Windows 98, I was required to use accounts with the same username and password pair to share files and devices amongst them. Even 98->XP seemed to need this. Technically speaking, I don't think Windows XP even cares about computer names on workgroup logins like this. Again, not sure though. There's nowhere I can't reach. |
This may sound stupid, but I don't see it mentioned, so I figured it's worth asking. My router has the ability to shut off specific computers at certain times. Are you sure your router doesn't? Then you could just take apart the other connection if it is wired, disconnect the jack at the wall.
How ya doing, buddy?
and Brandy does her best to understand
Last edited by BlueMikey; Jun 9, 2006 at 10:11 PM.
|
From what I gathered of the first post, the Family computer is connected through Wireless. If you just knocked the connection off (or shut the box down), she'd be able to kick it back on and connect to that other, slow network, would she not?
Or did I just completely misunderstand you? Interesting router feature, though--I've never seen that before. I am a dolphin, do you want me on your body? |
I always thought that this was a fairly standard feature, I mean, my router is a few years old and it's Microsoft.
![]() And whatever the other network is, I'd suggest to just get rid of it, it sounds fairly worthless anyway, or just disable that computer's ability completely to get onto it. I was speaking idiomatically.
and Brandy does her best to understand
|
No, you have it right Mikey. The wireless router is in my room upstairs, and the computer downstairs get's it's signal wireleslly. So even when I do shut down the router, my sister can still connect to any other network in range.
So anyways, a couple things. For one, I have confirmed the computer is called "family." Second of all, no I don't believe my router allows me tt block entire networks. I think I can block certain computers from accessing the network on a schedule, but I'm not entirely sure how to set it, unfourtanately (I really hate the Dlink admin tool, it makes no real sense) I tried creating a matching admin account on the computer downstairs, but the shutdown command still didn't do anything, access denied and all. Going on your suggestion though Duminas, I tried accessing it through Explorer. I was able to pull up the computer, but the login screen that spawned forced me to log on as Family\Guest. There was no way to change which user I logged on as, the field was gray (I have guest disabled on that computer). Could that be a cause for all the problems? What kind of toxic man-thing is happening now? ![]() |
I don't think that'd be the cause of the problems, no. If you got in with \\address\C$ on a guest account, that's a bit of a security issue. Beyond that, I don't really know what to tell you. Does Task Scheduler recognise that batch file I posted earlier? If so, why not give it a shot, since it'd kick her off and kill the account. :P
For help with your router's configuration, check out http://www.portforward.com and see if they have documentation to help you. How ya doing, buddy? |
Just out of curiosity, are both of these computers Home Editions of XP?
What, you don't want my bikini-clad body? |
One of them is running XP home, mine is running XP proffesional.
Also Duminas, I didn't actually get into the computer. It chose for me to logon as a guest but still requires a password (And I've ever set a password for that account) so I was unable to actually logon through Explorer. Jam it back in, in the dark. ![]() |