Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch file help. Needing to position windows.  (Read 4851 times)

0 Members and 1 Guest are viewing this topic.

YukoValis

    Topic Starter


    Starter

    • Experience: Experienced
    • OS: Windows 7
    Batch file help. Needing to position windows.
    « on: January 07, 2019, 02:35:35 PM »
    I'm creating simple batch files for work.  Since I need to constantly check switches and servers at various stores.  So I need to ping them to see if they are online.
    So my batch file is a simple, which just leads to a bunch of this after checking a variable I added beforehand.
    start cmd /k ping xxx.xxx.yyy.xxx -t
    start cmd /k ping xxx.xxx.yyy.xxx -t
    start cmd /k ping xxx.xxx.yyy.xxx -t
    My issue is that it opens all of these windows on top of each other.  I was wondering if there is some way to tell each to open on a specific area of my screen?  Or just not on top of each other?
    I'm trying to share these with my co-workers (with my bosses permission of course) so the fix can't be something as simple as messing with the settings of my own cmd promt windows.
    Is there a way to maybe "start" command at a specific screen position?
    Thank you for your time.
    « Last Edit: January 07, 2019, 03:30:23 PM by YukoValis »

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Batch file help. Needing to position windows.
    « Reply #1 on: January 07, 2019, 03:11:55 PM »
    Why not just send the output to a text file and look at it later?  :)

    YukoValis

      Topic Starter


      Starter

      • Experience: Experienced
      • OS: Windows 7
      Re: Batch file help. Needing to position windows.
      « Reply #2 on: January 07, 2019, 03:29:31 PM »
      Why not just send the output to a text file and look at it later?  :)
      I don't get what you mean.  My batch opens like 6 command prompt windows.  They open on top of each other.  I wanted them to open spread apart.  Is there a way to tell them to open at certain positions on the screen?  For troubleshooting I need them all to be going.

      Term_ite



        Beginner
      • Thanked: 10
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 10
        Re: Batch file help. Needing to position windows.
        « Reply #3 on: January 07, 2019, 04:55:17 PM »
        Position your Command Prompt window where you want it to appear by left click & hold the top border to drag the window. Right click the top border of the window. Select properties. Click the layout tab. Then click OK. The next time it opens it will open in the position you dragged it to.
        Now you can do this with 1 window. But with 6 I’m not sure. But you could try to position each window this way & give it a try.
        You can also size the window this way.

        Term_ite



          Beginner
        • Thanked: 10
          • Computer: Specs
          • Experience: Familiar
          • OS: Windows 10
          Re: Batch file help. Needing to position windows.
          « Reply #4 on: January 07, 2019, 05:16:25 PM »
          Hi Yuko Valis:
          I missed something in my last post. You have to uncheck "let the system position window" when your in the layout window. Sorry about that.

          Geek-9pm


            Mastermind
          • Geek After Dark
          • Thanked: 1026
            • Gekk9pm bnlog
          • Certifications: List
          • Computer: Specs
          • Experience: Expert
          • OS: Windows 10

          DaveLembke



            Sage
          • Thanked: 662
          • Certifications: List
          • Computer: Specs
          • Experience: Expert
          • OS: Windows 10
          Re: Batch file help. Needing to position windows.
          « Reply #6 on: January 07, 2019, 05:37:37 PM »
          From looks of what your doing.... you might find Alert Ping software a better solution. I bought the Alert Ping Pro edition 10 years ago and it will monitor network devices/nodes and you can set rules on what to do if a certain condition is met including calling to start batch files, and EXE files or run console type command lines when a condition is met or not met.

          I used this software to build a system that monitored 7 sites and with custom rules set in it I even had a PC Speaker to VoIP phone in a cardboard box together making it to where I had a script that called my phone and when I answered it it would play recorded voice audio files for conditions could be played to me in loop telling me where the problem is.... well Me telling myself since it was in my voice so I could be anywhere and get a phone call and be made aware that something is offline or misbehaving and then i can remote into the site and fix the issue or go to the site that the trouble is being reported from and fix the issue to stop getting called about it over and over again.

          Lastly to state it can monitor any device/node as long as that device is set to allow pinging to it. So I had Network Printers, Computers and Servers, Point of Sale systems and servers, Scales in Deli, Meat, and Seafood departments on it, as well as other devices such as a Managed Switch or a Bridge connection from one site to another with latency info. And for one site that had these Copper-Link Modems that acted like a private DSL bridge connection at 2.4MB/2.4MB network bridge over a rented copper pair from the telephone company that we had listed with them as a burglar alarm circuit for reason we needed it were susceptible to static from bad storms ( Electro Magnetic Noise ) and the modems would get hung and unable to handshake and so the network bridge would go down and so I also had rules to have a script that worked with Web Power Control devices that would shut a relay off that the modems were powered through at each end and then relay would turn back on connecting them to 120VAC again and they would sync up and then network would fix itself from automated scripts that ran with the rules set in Alert Ping Pro.

          Yes its $17 but I got a sweet raise from constructing this automated "Correction and Reporting System" project at the time and got reimbursed for the $17 cost. It made my job easier knowing what is going on and where at any time. As well as a system that would fix problems for me.

          http://www.bestshareware.net/alert-ping.htm

          YukoValis

            Topic Starter


            Starter

            • Experience: Experienced
            • OS: Windows 7
            Re: Batch file help. Needing to position windows.
            « Reply #7 on: January 08, 2019, 01:26:45 AM »
            I thank you for the advice, but I tried to explain that I can't just adjust my settings or even download other things for that matter.  I'm trying to share this stuff at work.  So if they have my batch, they wouldn't know to have those settings or any other program.  I'm simply asking if there is anyway in the batch file itself to have windows open up as specific positions. 
            like start cmd (position) /k ping xxx.xxx.yyy.xxx -t  or anything else that might exist?