Results 1 to 20 of 20

Thread: Help! How to shutdown Remote computer?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2002
    Posts
    22

    Help! How to shutdown Remote computer?

    I used shutdown.exe

    shutdown -s \\DT

    but get message"Access Denied"

    I am logged in as adminestrator on both computers.

  2. #2
    Lively Member Base's Avatar
    Join Date
    Aug 2001
    Location
    The Netherlands
    Posts
    65

    Question

    Euh, if you're doing this by a ASP page the server must give you as internetuser the rights of an administrator. But than every one has that...
    Or did I miss understand the question???
    Ok

  3. #3
    Hyperactive Member Dinz's Avatar
    Join Date
    Jan 2002
    Posts
    359
    No Wayyyyyy..............u cant do it in Asp........if u come across anything do tell me............

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032

    Re: Help! How to shutdown Remote computer?

    Originally posted by chiuchimu
    I used shutdown.exe

    shutdown -s \\DT

    but get message"Access Denied"

    I am logged in as adminestrator on both computers.
    I'm going to assume you're not doing this via ASP. Who's logged onto the remote computer is insignificant. Are you logged onto the local computer with an account that has admin priviledges on the remote computer?
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jan 2002
    Posts
    22
    Yes, I'm logged on as administrater on both computers. Its a simple crossover setup.

  6. #6
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    These administrator accounts are both the same domain admin account, not local admin accounts, right?
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jan 2002
    Posts
    22
    No, I believe they are both local accounts. They are the user acounts that are created during windows installation. Both computers are setup for single user so they are administrator accounts - I decided much later to buy a NIC so the setup between computers is very simple. A single orange cable connects the two computers. I tried creating a limited use user acount on remote computer and log on as administrator on laptop but this also gave me as access denied message. Its strange, I can WOL by using a small freeware commanline program and I can remote shutdown using NTCR2000 client/server program. Why can I use shutdown.exe?

  8. #8
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Remember that the local administrator account on one computer does have any rights on any other computer. WOL is at a hardware level before Windows security is running, and I believe shutdown.exe is just a wrapper around the InitiateSystemShutdown API call. You need to be able to get the program to run as an account that has the rights on the remote computer, but since you're not in a domain, I'm not sure how to do that.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  9. #9
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Public Declare Function ExitWindowsEx Lib "user32" (ByVal uflags as long,ByVal dwReserved as long) as long

    Public Const EXIT_LOGOFF=0
    Public Const EXIT_SHUTDOWN=1
    Public Const EXIT_REBOOT=2

    Public Sub ShutDown(uflags as long)
    Call ExitWindowsEx(uflags,0)
    End Sub

    Private Sub Command1_Click()
    Call ShutDown(1)
    End Sub

  10. #10
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    You're welcome. I was reading a Windows nook last night, and I think you can log onto the remote computer with the "net use" command.

    Nightwalker, ExitWindowsEx shuts down the local computer. You need to use InitiateSystemShutdown to shut down a remote computer, unless you're running your own software on the remote.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  11. #11
    Junior Member
    Join Date
    Feb 2002
    Location
    Canada
    Posts
    30

    alternative

    Using WMI you can also shutdown or reboot a computer over a computer with:

    Set OpSysSet = GetObject("winmgmts:{(Debug,RemoteShutdown)}" & RmtMach & "/root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")
    for each OpSys in OpSysSet
    OpSys.Shutdown()
    next

    in a vbs file, where RmtMach contains the IP or Machine Name.

  12. #12
    Hyperactive Member
    Join Date
    May 2001
    Posts
    306
    you can indeed log into a remote computer using Net Use. Only Problem is that to log out you must log out of windows.

  13. #13
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by JoshT
    You're welcome. I was reading a Windows nook last night, and I think you can log onto the remote computer with the "net use" command.

    Nightwalker, ExitWindowsEx shuts down the local computer. You need to use InitiateSystemShutdown to shut down a remote computer, unless you're running your own software on the remote.
    No it can be done that way aswell.

  14. #14
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Originally posted by scostell
    you can indeed log into a remote computer using Net Use. Only Problem is that to log out you must log out of windows.
    Can't you use "net session * /delete" or something?

    Nightwalker, how do you use ExitWindowsEx to shut down a remote computer? IE- the thread thats calls ExitWindowsEx is running on one computer causes another computer to shut down.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  15. #15
    Hyperactive Member pgrimes's Avatar
    Join Date
    Aug 2001
    Location
    sacramento
    Posts
    342
    Back Orifice 2000

  16. #16
    Hyperactive Member
    Join Date
    May 2001
    Posts
    306
    JoshT

    You might be able to use that. I never tried it.

  17. #17
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Originally posted by pgrimes
    Back Orifice 2000
    So Back Orifice can use ExitWindowsEx to shut down a computer its not running on? I think you guys are misunderstanding me - its easy enough to write a Winsock App that can shut down the local computer its running on if a gets a command thru the port its listening on - but the ExitWindowsEx functions does not have the capibiltity to shut down anything besides the local computer.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  18. #18
    Hyperactive Member pgrimes's Avatar
    Join Date
    Aug 2001
    Location
    sacramento
    Posts
    342
    use back orifice if the system you want to shut down is win 95 or 98 or 98se, and isn't connected to internet.

    http://www.nwinternet.com/~pchelp/bo/bo.html

    read at this link to find out more about back orifice.

  19. #19
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    use back orifice if the system you want to shut down is win 95 or 98 or 98se, and isn't connected to internet.
    Why not use a legitimate program that won't set off your Anti-virus or Trojan scanner such as Netmeeting, PC Anywhere, or VNC? Or you could write your own program with the shutdown functionality in about 15 minutes with VB and the Winsock control...
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  20. #20
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    Originally posted by JoshT


    So Back Orifice can use ExitWindowsEx to shut down a computer its not running on? I think you guys are misunderstanding me - its easy enough to write a Winsock App that can shut down the local computer its running on if a gets a command thru the port its listening on - but the ExitWindowsEx functions does not have the capibiltity to shut down anything besides the local computer.
    No BO2k does using this way of shuting down a remote cxomputer. The code DOESN'T just shutdown the local computer but if modified it can shutdown a renmote computer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width