Syntax for adding a program to autoexec.bat...

This is a discussion on Syntax for adding a program to autoexec.bat... within the C Programming forums, part of the General Programming Boards category; I tried: LH C:\Dev\NetWorker\Stock Market\S.exe ...but the "LH" didn't work? Any ideas?...

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,703

    Syntax for adding a program to autoexec.bat...

    I tried:

    LH C:\Dev\NetWorker\Stock Market\S.exe

    ...but the "LH" didn't work? Any ideas?
    Code:
    #include <cmath>
    #include <complex>
    bool flip(bool value)
    {
           return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0)*(1 << (value + 2)))
        ).real() < 0;
    }

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,703
    BTW: I am assuming this is the file used by Windows to load programs on boot?
    Code:
    #include <cmath>
    #include <complex>
    bool flip(bool value)
    {
           return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0)*(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    Registered User Azuth's Avatar
    Join Date
    Feb 2002
    Posts
    236
    LH ius short for LOADHIGH, which can also be used once you've allocated memory using himem.sys in the config.sys file.
    It is even possible to specify the address in to which you want the program loaded (memmaker did this automatically).

    A good number of programs cannot be loaded high however, and so you simply need the command line in the batch file

    c:\progra~1\myfile.exe
    Demonographic rhinology is not the only possible outcome, but why take the chance

  4. #4
    Registered User Azuth's Avatar
    Join Date
    Feb 2002
    Posts
    236
    Oh, and it is not used by Windows* (Well, not entrirely true dependent upon your version of Windows). In Windows 3.X or 9X the config.sys and autoexec.bat get called before windows starts. If you want your program to be run in Windows when Windows starts you have several options; win.ini, registry, startup folder. Again dependent upon your version of Windows.

    * Know that's up for debate across different versions, but for the sake of clarity and in an attempt at gauging what the poster wants to know, lets just say that.
    Demonographic rhinology is not the only possible outcome, but why take the chance

  5. #5
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,703
    Thank you very much. I can figure the rest, now.

    Cheers mate!
    Code:
    #include <cmath>
    #include <complex>
    bool flip(bool value)
    {
           return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0)*(1 << (value + 2)))
        ).real() < 0;
    }

  6. #6
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    LH C:\Dev\NetWorker\Stock Market\S.exe

    In addition, you have a blank in there that normally seperates parameters of LH. You might try

    LH "C:\Dev\NetWorker\Stock Market\S.exe"

    but that's just a guess.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. syntax error for another program.
    By nesagsar in forum C++ Programming
    Replies: 19
    Last Post: 12-14-2006, 03:07 PM
  2. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 10:17 PM
  3. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 09:33 AM
  4. I need some help with my program please.
    By agentxx04 in forum C Programming
    Replies: 9
    Last Post: 09-26-2004, 07:51 AM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21