Remote rebooting

  • Thread starter Thread starter Sawada999
  • Start date Start date
S

Sawada999

I have an unmanned remote machine(Windows 2000 Pro) running an
application I’ve written. I also have an CuteFTP Pro and VNC running.

I need a way to remotely reboot this machine.

Occasionally I manage to cause the application to hang and the only way
to recover is a reboot. When this situation arises I am unable to
communicate with my app and unable to log in with VNC. However I can
always get in with ftp.

I configured task scheduler to run a bat file every 10 minutes. The bat
file looks for a trigger file and if present deletes the file and runs
winboot.exe. Works fine in testing. I upload the trigger file and the
system reboots.

However now I have the system hung and my method isn’t working. I can
upload the trigger file but the system doesn’t reboot.

Seems as though the must be a way to force Windows to run the task
winboot.exe or otherwise cause it to reboot.

Can anyone offer a solution?

Thanks,
 
Sawada999 said:
I have an unmanned remote machine(Windows 2000 Pro) running an
application I’ve written. I also have an CuteFTP Pro and VNC running.

I need a way to remotely reboot this machine.

Occasionally I manage to cause the application to hang and the only way
to recover is a reboot. When this situation arises I am unable to
communicate with my app and unable to log in with VNC. However I can
always get in with ftp.

I configured task scheduler to run a bat file every 10 minutes. The bat
file looks for a trigger file and if present deletes the file and runs
winboot.exe. Works fine in testing. I upload the trigger file and the
system reboots.

However now I have the system hung and my method isn’t working. I can
upload the trigger file but the system doesn’t reboot.

Seems as though the must be a way to force Windows to run the task
winboot.exe or otherwise cause it to reboot.

Can anyone offer a solution?

Thanks,

shutdown -r -f -m \\remotepc
 
Mike said:
shutdown -r -f -m \\remotepc

Thanks for the reply.

The computer is not on my local network. I looked at the Microsoft site
but am not understanding what I'd use for computername. I have the IP
address.

Could you give me some more info?

Thanks,
 
Sawada999 said:
Thanks for the reply.

The computer is not on my local network. I looked at the Microsoft site
but am not understanding what I'd use for computername. I have the IP
address.

Could you give me some more info?

Thanks,
Try the raw IP for the PC.
another possibility is rcmd, but again requires a servername.

can you telnet into it?

btw, I expect the experts to turn up shortly. I'm going offline now.
 
Mike Jones said:
Try the raw IP for the PC.
another possibility is rcmd, but again requires a servername.

can you telnet into it?

btw, I expect the experts to turn up shortly. I'm going offline now.

You're doing fine (Mike) -- IP will work with Shutdown if the network
is routable AND if he has admin authority on the remote computer.

There doesn't seem to be any switches (viewing Help) in Shutdown for
establishing authentication if the machine is not in the same or trusting
domain -- perhaps an initial connection to a share or the IPC$ will
take care of that if needed.

net use \\Server.Name.Or.IP\IPC$ * /user:DomainOrServer\UserName

I have not tried this (for Shutdown) however.
 
Herb said:
You're doing fine (Mike) -- IP will work with Shutdown if the network
is routable AND if he has admin authority on the remote computer.

There doesn't seem to be any switches (viewing Help) in Shutdown for
establishing authentication if the machine is not in the same or trusting
domain -- perhaps an initial connection to a share or the IPC$ will
take care of that if needed.

net use \\Server.Name.Or.IP\IPC$ * /user:DomainOrServer\UserName

I have not tried this (for Shutdown) however.

This is not my day job :>) so I'm in way over my head.

I have the IP address. Routable? I didn't set it up (its 2,000 miles
from me) and wouldn't know how to anyway. I'm not sure how it's
connected to the Internet (not dial up) but it does have a static IP
address.

I do know these things. It has VNC Enterprise and requires a username
and password to log on. Also CuteFTP Pro is for the purpose of a secure
FTP server so I can upload software changes and data. The machine is
running under admin and I can add/modify/delete any files in any folder
with either VNC or CuteFTP Pro.

Presently when I log in with VNC it returns "Connection reset by peer"
and asks if I want to try again.

I can log in with CuteFTP PRO and do what I want with files etc. Seems
odd to me that the ftp server is running yet apparently the Windows task
manage isn't starting scheduled tasks.

I was operating the machine with VNC when the problem occurred. My
program was loading about 700 thumbnails. At about 500 I got a Windows
message to the effect "Dangerously low on system resources ..." . VNC
closed.

Just seems odd to me that there is no file or bit on the hard disk that
I can modify to cause Windows to reboot.

This machine is about 25 miles from the nearest employee so it's a big
hassle (and expense) to get someone to drive out to reset it. Even if I
can't recover from this hang I need to setup a fool proof way to reboot
this system. I thought I had done so using the task manager but not so.
Is this going to require some additional piece of hardware to do this?

Thanks in advance for any help and suggestions.
 
I have an unmanned remote machine(Windows 2000 Pro) running an
application I’ve written. I also have an CuteFTP Pro and VNC running.

I need a way to remotely reboot this machine.

Occasionally I manage to cause the application to hang and the only way
to recover is a reboot. When this situation arises I am unable to
communicate with my app and unable to log in with VNC. However I can
always get in with ftp.

I configured task scheduler to run a bat file every 10 minutes. The bat
file looks for a trigger file and if present deletes the file and runs
winboot.exe. Works fine in testing. I upload the trigger file and the
system reboots.

However now I have the system hung and my method isn’t working. I can
upload the trigger file but the system doesn’t reboot.

Seems as though the must be a way to force Windows to run the task
winboot.exe or otherwise cause it to reboot.

Can anyone offer a solution?

Thanks,

Have read the whole thread - and I wonder if the machine is having trouble
launching a scheduled task, but would work if the task was always running?
Try putting this in the startup group.

@echo off
:loop
if exist "c:\flag.file" del "c:\flag.file" & winboot.exe
ping -n 600 127.0.0.1 >nul
goto :loop
 
Sawada999 said:
This is not my day job :>) so I'm in way over my head.

I have the IP address. Routable? I didn't set it up (its 2,000 miles
from me) and wouldn't know how to anyway. I'm not sure how it's
connected to the Internet (not dial up) but it does have a static IP
address.

Well? what's to lose? Why not try the remote shutdown command? (and yes,
I'll bet you need to make a connection as administrator to the PC (using
IPC$ as shown above) first.
I do know these things. It has VNC Enterprise and requires a username
and password to log on. Also CuteFTP Pro is for the purpose of a secure
FTP server so I can upload software changes and data. The machine is
running under admin and I can add/modify/delete any files in any folder
with either VNC or CuteFTP Pro.

Presently when I log in with VNC it returns "Connection reset by peer"
and asks if I want to try again.

I can log in with CuteFTP PRO and do what I want with files etc. Seems
odd to me that the ftp server is running yet apparently the Windows task
manage isn't starting scheduled tasks.

I was operating the machine with VNC when the problem occurred. My
program was loading about 700 thumbnails. At about 500 I got a Windows
message to the effect "Dangerously low on system resources ..." . VNC
closed.
Ok there's a resource leak somewhere, I'm guessing in "your program".
This needs fixing for long-term solution.
Just seems odd to me that there is no file or bit on the hard disk that
I can modify to cause Windows to reboot.

Hmmm, isn't it VNC that you wish to restart?
pskill/psexec would do it, and again will require authentication.
This machine is about 25 miles from the nearest employee so it's a big
hassle (and expense) to get someone to drive out to reset it. Even if I
can't recover from this hang I need to setup a fool proof way to reboot
this system. I thought I had done so using the task manager but not so.
Is this going to require some additional piece of hardware to do this?

Thanks in advance for any help and suggestions.

I've used RIB boards on Compaq hardware - as long as you have electric
to the PC (let's call it a server shall we?) you can remotely connect &
reboot the machine via it's interface. I don't know if they're
available for non HPCompaq devices.
 
Well? what's to lose? Why not try the remote shutdown command? (and yes,
I'll bet you need to make a connection as administrator to the PC (using
IPC$ as shown above) first.

Thanks for the responses Mike. I appreciate the help.

However this is as clear as mud to me. I've Googled and read and read,
but have no clue what I'm trying to do with this net use command. I'm
a total newbie in this area. (Just a step ahead of someone who thinks
the CD tray is a cup holder)

I read port 139 has to be open. (???)

What goes here?
/user:DomainOrServer\UserName

I assume the UserName is admin.

I've opened up a cmd window and tried a lot of variations of the net use
command from your example and others I've found. I always get the same
result, "The network path was not found."

I've put in for a service call so hopefully I'll be back up sometime in
the near future. When I get back up and can use VNC again what
information do I need to gather or what settings do I need to make? I'd
like to learn how to use this command in case this happens again.

Thanks again.
 
foxidrive said:
Have read the whole thread - and I wonder if the machine is having trouble
launching a scheduled task, but would work if the task was always running?
Try putting this in the startup group.

@echo off
:loop
if exist "c:\flag.file" del "c:\flag.file" & winboot.exe
ping -n 600 127.0.0.1 >nul
goto :loop

Thanks I'll do that.
 
Herb said:
net use \\Server.Name.Or.IP\IPC$ * /user:DomainOrServer\UserName

I have not tried this (for Shutdown) however.

OOPS. I just realized it was your response that provided the above
command. Please read my last response to Mike.

Thanks for the help.
 
However now I have the system hung and my method isn’t working. I can
upload the trigger file but the system doesn’t reboot.

Seems as though the must be a way to force Windows to run the task
winboot.exe or otherwise cause it to reboot.

Can anyone offer a solution?

Hopefully the ideas offered by the others have helped you. I'll add my 2¢
and suggest installing a second form of remote administration to the
computer so if the first one hangs, you have a second vector by which to get
in. I'd use Remote desktop since it's free and readily available. With
Win2000, you have to install terminal services and select remote
administration.

HTH

Matt
 
Sawada999 said:
I read port 139 has to be open. (???)

In order to use shutdown across a network yes. If that network is the
Internet you would be seriously crazy to take a suggestion to do this :)
If you can make a vpn tunnel then it would be OK...

I would recommend you use the psshutdown utility from within a batch
file. It has a similar syntax as shutdown (psshutdown -r -f -t 0 would
reboot immediately forcing closed all apps) Alternatively, if you know
what program is so badly behaved, then maybe pskill would be a better
option so you aren't always rebooting?

~Jason

--
 
Back
Top