New to writing .bat files


  1. Posts : 4
    7
       #1

    New to writing .bat files


    I am trying out a few things with a .bat file, and I seem to be running into some issues. The . bat file that I am creating is going to be made to execute 2 files. That part I have down. The issue that I am having is that one of the programs that the .bat file executes defaults to the notification tray area upon opening, and I would like to make it open to the desktop only when running my .bat file. Is there a command to automatically open a program to the desktop? I tried WinSet, Top, but had no luck. I may also want to add in a progress bar eventually to see what % the program has run, so any tips on that would be appreciated as well.
      My Computer


  2. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #2

    I am no good with this stuff, tried this switch? -window

    Found it here Running a Program in Windowed Mode (Windows 7) | Matt Groeber's Blog
      My Computer


  3. Posts : 6,285
    Windows 10 Pro X64
       #3

    What is the program? Nothing you can do from a batch file unless the program has the capability, like a parameter it accepts when starting.
      My Computer


  4. Posts : 4
    7
    Thread Starter
       #4

    No luck, couldn't get it to open in windowed mode. It would just open in the icon tray. even with the -window switch
      My Computer


  5. Posts : 4
    7
    Thread Starter
       #5

    it is called radtray.exe and it's meant to open in a tray, but when it is double clicked from the icon tray, it does open a gui.
      My Computer


  6. Posts : 6,285
    Windows 10 Pro X64
       #6

    All I can find on that is this: radtray.exe is Radia Application Manager from Hewlett-Packard

    Can't find any info on how to use it or if it has options for starting.
      My Computer


  7. Posts : 4
    7
    Thread Starter
       #7

    Yeah by default it will open from the tray which is what I would like it to do, only when my batch file runs would I like it to be brought to front. A progress bar may be an option as a substitute.
      My Computer


  8. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #8

    Ztruker said:
    What is the program? Nothing you can do from a batch file unless the program has the capability, like a parameter it accepts when starting.
    This is correct, the program must have the capability, it must have the needed switches. Batch files cannot directly communicate with applications, so its impossible, Mre, for you have a progress indicator on the batch's Cmd window.


    The Start command has a switch, /max, that will maximise some application's windows, depending on whether the application has that capability.

    E.g.
    Code:
    C:\Windows\system32>start /max "" "C:\PathTo\radtray.exe"
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:31.
Find Us