id="info"

General discussion

Locked

shutdown.exe related questions. "Access Denied" message. batch file not wor

By roise4000 ·
hello there, i have this room with 37 computers in my school, that i need to be able to shutdown just by pressing something on my so-called-server computer :). all the computers are running WinXP. ALL of them have sequent IP addresses and names, and ABSOLUTELY THE SAME administrator account.

username: admin01
pass: pass01

all firewalls have been disabled on all the computers. if i execute the shutdown command with the -m option it will work for all computers except 4 of them - these 4 give me the "Access Denied" message on shutdown.exe execution. These 4 are the newest computers on the classroom, but still, there is nothing different or special about them... at least none that i know of... they've got the same admin account, no firewall, same OS... Everything is accessible on them just as any other computer, file sharing, Remote Desktop, etc. I don't know why it WON'T let me shutdown them remotely, drives me crazy! I searched the internet, and it seems, there are other people experiencing the same thing, but yet, i coudn't identify a solution...

second thing, as i said i need to make the shutdown process for all the computers as short as possible, that's why i went for a batch file. The shutdown command executed by the batch file will discard additional option like -r (restart), -f (force quit), the only option will not discard is the -m option. So if my first line in the .bat file is:

shutdown -m \\computer01 -r -f

it will only shutdown computer01, no restart and no force quiting of applications

pls help, if you know how :) thanks thanks thanks

This conversation is currently closed to new comments.

28 total posts (Page 1 of 3)   01 | 02 | 03   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Something to try

by Nonapeptide In reply to shutdown.exe related ques ...

This thread gives some hope:

http://www.msfn.org/board/lofiversion/index.php/t50208.html

Take note of the psshutdown suggestion. Actually, the whole PSTools suite is very usefull http://www.microsoft.com/technet/sysinternals/utilities/pstools.mspx

Here's another thread (If you have a Experts-Exchange account): http://www.experts-exchange.com/Operating_Systems/WinXP/Q_20756919.html

Take particular note of the comment at this time: 10.06.2003 at 12:55PM PDT, ID: 9500644 The comment talks about a rather obscure registry key that forces a logon as a guest. Also, you can't disable that for XP Home (I hope you have Pro).

Oh, and if you don't have an E-E account, here's where you can get a free one: http://www.experts-exchange.com/registerFree2.jsp (yes, it's truly free, not the "Free Trial" that they try and hook you into)

Let us know what happens.

Collapse -

Start here...

by scott_heath In reply to shutdown.exe related ques ...

Check the Event Logs for error messages on the remote system.

Or try a WMI based vbscript. Try this:

First you will need to build your collection or array of computernames. There are lots of ways to do this, if you need help ask and I'll demonstrate one. Lets pretend the variable sComputerName is one of the computers in question.

Set colOperatingSystems = GetObject("winmgmts:\\" & sComputerName & "\root\CIMV2").ExecQuery("Select * from Win32_OperatingSystem",,48)
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(2)
Next

This worked fine in my lab. I ran it as local admin on my box making sure the other box had the same local admin password.

Let me know if I can help.

Collapse -

about that batch file... works now ! :)

by roise4000 In reply to Start here...

uh man... this really looks complicated... i don't understand most of it... but I've got good news though... the batch file thing started working as soon as i fixed the ForceGuest thing... i don't know how... i have no idea why, i know there isn't any connection between the two :), but yet... it works now :) lol

Collapse -

One of the problems solved... no more "Access Denied"

by roise4000 In reply to shutdown.exe related ques ...

hello again... i am announcing that the problem with the "access denied" thing is officially over :) thanks Nonapeptide for the threads provided

it was actually the registry key thingie that forces you to logon as Guest on every network executed command...
the location of that registry entry is:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\forceguest" key
set to "0"
By the way: the same can be done by just disabling "Simple File Sharing" :)

Collapse -

Good News

by Nonapeptide In reply to One of the problems solve ...

Glad to hear things worked out. From what I understand, PSTools can be a big help especially for administering a group of workgroup computers. It seems like you could kinda fake a domain environment by using a common admin account on each machine and pushing out commands from a central machine (a poor man's domain controller).

Is this a classroom environment that gets rebuilt every semester or year (like a computer lab) or is it an environment that needs to be maintained as long as possible? Just curious...

Nonapeptide

Collapse -

It is actually a classroom computer lab... :)

by roise4000 In reply to Good News

it doesn't get rebuild every semester, but a lot of sh*t happens because of students :) and needs to be constantly maintained... and i have been working lately on various ways to limit users access to various things, like blocking screen saver changes, or wallpaper changes, and blocking certain programs. i am having kinda hard time, because they (the students) are not supposed to be able to access certain stuff which are accessible by default, but yet ... they must be able to do other stuff, which by default is not accessible...like changing the default Word template... and basically stuff like this :)

Collapse -

Have you tried...

by Nonapeptide In reply to It is actually a classroo ...

...Windows Steady State? http://www.microsoft.com/windows/products/winfamily/sharedaccess/default.mspx

Check it out. It may (or may not) be a help to you.

Collapse -

more questions... :)

by roise4000 In reply to shutdown.exe related ques ...

1. now my next problem that derives from this one is: "i need to change this key for every and single computer that has this set to "1". i am lucky that only four of those computers have this issue, but what if there were a lot more. is there a way to lunch another command and change certain reg key form the network... but then, even if it was possible, this little key wouldn't let it, cause it forces you do log on as guest no matter what, which leads to unableness to alter registry values :))) right??!! :)

2. Is there a way to specify on the regular shutdown.exe username and passwords, like with the psshutdown.exe. is it something with /user:usename pass:password ????

3. I remember there was a way to make a file accessible anytime just by typing its name, regardless of its location or your location from where you are executing the file

for example: i can execute shutdown from my desktop or from c:\, or from any random directory... i want to be able to do this with psshutdown also... i remember there was something in the home path or root structure or something

Collapse -

More responses... :)

by Nonapeptide In reply to more questions... :)

1. Errr... scripting is not my strong point. However, someone else on TR could probably help you out with that one.

Have you tried to connect to the registry remotely? E.g. run >> regedit >> file >> connect to network registry >> [compname] At least that way you could do it without having to visit each workstation.

2. If I understand your question correctly this should do it: runas /user:[domain]\[user] "shutdown.exe [enter switches here]" Take a look at the switches for runas to see if anything else could be of use to you.

3. Try dropping psshutdown in the system32 folder on the machine that you want to run it from.

Does that help you?

Collapse -

what works and what not...

by roise4000 In reply to More responses... :)

1, 2. it was stupid to ask actually if i could alter the registry remotely while the very option i am trying to change is the one that forbids the remote access :) i.e. i was trying to change in the registry the option that would let me to change the registry :) sounds confusing, i know :)... so that didn't work

3. i totally forgot about that... thank you - that worked - dropping stuff on the System32 folder

Back to Networks Forum
28 total posts (Page 1 of 3)   01 | 02 | 03   Next

Hardware Forums