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

Author Topic: ms-dos start command  (Read 5444 times)

0 Members and 1 Guest are viewing this topic.

justaguy84

  • Guest
ms-dos start command
« on: January 18, 2008, 04:22:35 AM »
hello ,
i want to make a .bat file that calls 7 program 1 by one .
the problem is , when i do that , the 7 programs are open as i wanted , but my program makes a settings.ini file where it is located , while each program has a settings.ini in her folder.
i want the calls programs will use there own settings.ini file
can i do some thing like it or is it impossible in dos.

thanks a lot for you help.
« Last Edit: January 18, 2008, 04:39:22 AM by justaguy84 »

gpl



    Apprentice
  • Thanked: 27
    Re: ms-dos start command
    « Reply #1 on: January 18, 2008, 04:55:42 AM »
    Not knowing anything about the code you are using, I suspect that the reference to the ini file will be something like

    "C:\Documents and Settings\%USER%\MyApplication\MyProgram.ini"

    Where the environment variable %USER% holds the identity of the currently logged in user

    You will have to change the detail to match your needs
    Graham

    justaguy84

    • Guest
    Re: ms-dos start command
    « Reply #2 on: January 18, 2008, 06:32:29 AM »
    hi.
    first thank you for your help.
    let me give you some more info...
    i want to make a file on my desktop (lets call it desktop.bat) , that calls , or start 7 program that are in different directories (c:\work\1 | c:\work\2 | c:\work\3 ...)
    the programs are .exe files and each have a settings.ini file in his directory

    i tried opening each file with this code:

    start c:\work\1\run.exe
    start c:\work\2\run.exe
    but that makes 1 settings.ini file in my desktop

    i have also tried to make a .bat file in side the directory ( start c:\work\1\start.bat - which had the code from before ) but that gave me the same result.

    basically , i want to make a file , that when i run it , the 7 program will open , each with it's own settings.ini file in his directory.

    again thank you for your help.

    macdad-



      Expert

      Thanked: 40
      Re: ms-dos start command
      « Reply #3 on: January 19, 2008, 07:27:46 AM »
      what versions of dos have the "Start" command?
      If you dont know DOS, you dont know Windows...

      Thats why Bill Gates created the Windows NT Family.

      WillyW



        Specialist
      • Thanked: 29
      • Experience: Experienced
      • OS: Windows XP
      Re: ms-dos start command
      « Reply #4 on: January 19, 2008, 09:41:43 AM »
      what versions of dos have the "Start" command?

      See:
      http://www.computerhope.com/starthlp.htm
      for the answer to that.

      Also see:
      http://www.computerhope.com/forum/index.php/topic,33325.0.html
      , the third entry under "When posting make sure to keep the below guidelines in mind."         
      We really don't mind new threads -  go for it.  ;)


      Lastly,  I see this is only your 9th post here,   -   Welcome to Computer Hope.           :)
      .



      macdad-



        Expert

        Thanked: 40
        Re: ms-dos start command
        « Reply #5 on: January 19, 2008, 10:08:31 AM »
        thanks for the welcome
        If you dont know DOS, you dont know Windows...

        Thats why Bill Gates created the Windows NT Family.

        justaguy84

        • Guest
        Re: ms-dos start command
        « Reply #6 on: January 20, 2008, 03:31:38 AM »
        any one have an answer ?
        a no can do is also one.

        thanks

        Sidewinder



          Guru

          Thanked: 139
        • Experience: Familiar
        • OS: Windows 10
        Re: ms-dos start command
        « Reply #7 on: January 20, 2008, 05:25:50 AM »
        Quote
        any one have an answer ?

        We really don't have enough information. The only thing we know for sure is that you're running Windows. Maybe this will help, I suspect you might need to be logged into the directory where in the ini file can be found:

        Code: [Select]
        @echo off
        for /l %%x in (1,1,7) do (
        cd /d c:\work\%%x
        start c:\work\%%x\run.exe
        )

        Any reason you need to have all jobs running simultaneously?
        The true sign of intelligence is not knowledge but imagination.

        -- Albert Einstein

        justaguy84

        • Guest
        Re: ms-dos start command
        « Reply #8 on: January 21, 2008, 04:28:20 AM »
        Hi, and thank you for your help.
        each of the 8 ( i have add one..) programs connects to each of my websites with the admin user name and password (which is saved in the settings.ini so it wont ask you the next time you open )
        each of them checks some impotent information in my accounts.
        so instead of opening each one by itself , i want to open them all together so i can have a greater look at my websites.
        i don't know much in ms-dos but i understand about pc , and windows , so just ask what you need and i will add the info.

        also i just tried you suggestion , and it WORKS !!!!.
        i needed to change some lines in my code and folder names to fix some problems BUT IT WORKS  ;D !!!

        but that gave me a different problem.
        each of the program name is different ( it has the name of my website ) so in each folder i did a start.bat file that just have the name of the program for the same folder.
        so now my code fore the desktop file is :

        Code: [Select]
        @ECHO Off
        cls
        for /l %%x in (1,1,8) do (
        cd /d c:\work\%%x
        start c:\work\%%x\start.bat
        )

        and this is the code for the start.bat file:

        Code: [Select]

        @ECHO off

        start ideas.com.check.exe

        exit

        so now all my programs opens as i want , with the user name and password already saved , but all of them opens one on top of the other.
        can i make it to open in a specific location on my screen ( like at the top right corner and so on ...)

        again if you need more info just ask and i will try to give you as much as i can.

        and thank you a lot for you help

        electricmidget

        • Guest
        Re: ms-dos start command
        « Reply #9 on: January 22, 2008, 08:42:11 PM »
        why dont you just type:

                        @ECHO OFF
                        START "" /MAX "C:/work/1"
                        START "" /MAX "C:/work/2"
                        etc.

        for .exe files you usually don't have to type '1.exe', 1 is good enough  ;)

        did that help??

        justaguy84

        • Guest
        Re: ms-dos start command
        « Reply #10 on: January 23, 2008, 05:51:00 AM »
        Hi,
        this does not help me because it just makes each of the program display is a maximize windows.
        each of the 9 program ( add another one  ;D ) is in small size , so if i want all of them all to show on my screen with out me needing to move each program to see the other one it should all take up about half my screen from the top right corner to the bottom right corner.

        again thank you all a lot for the help , at least the bigger problem is now solved ( the setting.ini problem - thanks again Sidewinder )

        Sidewinder



          Guru

          Thanked: 139
        • Experience: Familiar
        • OS: Windows 10
        Re: ms-dos start command
        « Reply #11 on: January 23, 2008, 02:41:14 PM »
        Quote
        can i make it to open in a specific location on my screen

        Doubtful. The coordinates of the window when the program loads are probably hardcoded into the program. You might find some command line switches the programmer built into the program to allow you to control the vertical and horizontal positions. Many programs calculate the coordinate values based on each users screen width and height.

        If the a shortcut for the program hosts the horizontal and vertical properties, you might be able to manipulate the numbers prior to each program call, but not with batch code. This would be an awful lot of work for so little payoff....better to manually move the windows around the screen.

        You mentioned websites. It's possible to load multiple tabs into a browser from the command line with Firefox but not IE.

         8)
        « Last Edit: January 23, 2008, 02:52:15 PM by Sidewinder »
        The true sign of intelligence is not knowledge but imagination.

        -- Albert Einstein

        justaguy84

        • Guest
        Re: ms-dos start command
        « Reply #12 on: January 24, 2008, 03:19:19 AM »
        hi and thank you again for your help.
        i do use Firefox and have all my website in one folder in my bookmark so it will open in tabs , but i still need to enter each website with the username and password ( which is saved in Firefox profile but still... ) and also i don't get a complete look as i need to changes tabs for each website.

        never the less , i guess you right that it's too long and complex to make the window position code.

        so i will move the programs for 5 second , no big deal , at least now i don't need to go in to each folder and open each program or start entering each username and password for each website  ???....

         you really helped me a lot . thank you very much
        if there is any way for me to help you or this web site just ask....