Anyone made a program that can remotely shut down a PC in Access?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anoble1
    New Member
    • Jul 2008
    • 246

    Anyone made a program that can remotely shut down a PC in Access?

    Anyone made a program that can remotely shut down a PC in Access?

    I saw the Microsoft automation message when you go to CMD and hit : Shutdown -i
    I wanted that format in an Access DB, was wondering if anyone has made anything like that? I was wanting to do that customly in access

    Thanks,
    [imgnothumb]http://bytes.com/attachments/attachment/6701d1351709831/box.jpg[/imgnothumb]
    Attached Files
    Last edited by NeoPa; Nov 2 '12, 01:30 AM. Reason: Made pic viewable.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Here is a link to window's documentation on the shutdown command: http://www.microsoft.com/resources/d....mspx?mfr=true.

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #3
      one cavet... in Win-Vista and Win-7 enterprise, the IT can disallow that command in various ways...
      I used to use it an idle time log-out for my workstation under sceduled tasks on idle... IT upgraded us to Win7 and now it doesn't work as IT has dis-allowed the un-attened and script execution.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32661

        #4
        I assume you already know that you can use Shell() to invoke any command line utility?

        Comment

        • anoble1
          New Member
          • Jul 2008
          • 246

          #5
          Yeah, works differently in windows 7. But, I as wanting some code that could intertwine with Windows where I could connect to a PC, and perform commands in MS Access. That way I could customize it. Wish I was smarter!

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32661

            #6
            There are ways of interfacing with Windows directly using the API. However, that is some of the most complicated coding for a VBA programmer (as VBA was designed to use a somewhat different interface than the standard (C-type) interface used by Windows. Module to Read From the Windows Registry is a small example of some of the things needed even for something very straightforward . I have no idea what is available within Windows, mind you, for handling shutdowns.

            On the other hand, you can also take pretty full control from within Access itself by building your CMD files from the project itself before executing them and then deleting them. I keep my CMD files in a table called tblCMD. I export them on the fly into the same folder that the database is in and then run them (Generally using my ShellWait() Function, but Shell can also work for you.) then I delete them after they've done their work.

            Comment

            • anoble1
              New Member
              • Jul 2008
              • 246

              #7
              I think my head just exploded

              Comment

              • Rabbit
                Recognized Expert MVP
                • Jan 2007
                • 12517

                #8
                For remote shutdowns in Windows, the two options that I know of is to use the shutdown command line tool and using a WMI object. There are probably other options as well.

                Comment

                • NeoPa
                  Recognized Expert Moderator MVP
                  • Oct 2006
                  • 32661

                  #9
                  Originally posted by ANoble
                  ANoble:
                  I think my head just exploded
                  Sorry if my explanations are somewhat complicated. TBF the subject matter is not too trivial, so covering it for the inexperienced is a bit tough.

                  If you can identify which part(s) of the process you're having difficulty with though, I can deal more directly with that specific part. Hopefully in an easier manner to understand.

                  Comment

                  Working...