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

Author Topic: .INI with .BAT  (Read 13701 times)

0 Members and 1 Guest are viewing this topic.

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: .INI with .BAT
« Reply #15 on: June 17, 2008, 06:05:15 PM »
Figure of speech. Both are already installed with the operating system. This is a good place to learn about VBScript. Everything from tools, examples and articles.

You can also find a file on your system named script56.chm. This is a compiled help file which serves as a reference for both VBScript and JScript.

You can also post here should you have any problems. 8)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

HypercamJ

    Topic Starter


    Beginner

  • Oops =0
    Re: .INI with .BAT
    « Reply #16 on: June 17, 2008, 11:07:00 PM »
    Could you upload script56? I don't have it on my computer.  :( (Searched everywhere!)
    ╔░░░░░░░░╗
    _Hypercam⌡_
    ╚░░░░░░░░╝

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: .INI with .BAT
    « Reply #17 on: June 18, 2008, 03:11:49 AM »
    Quote
    I don't have it on my computer.

    That's odd. What OS are you running?

    You can download it here

    Good luck.  8)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    HypercamJ

      Topic Starter


      Beginner

    • Oops =0
      Re: .INI with .BAT
      « Reply #18 on: June 18, 2008, 10:13:47 AM »
      Windows XP Home edition. Probably outdated or it only comes with XP Professional. idk...Thanks for the link anyways! Now I might be able to become a vb noob.  :P
      ╔░░░░░░░░╗
      _Hypercam⌡_
      ╚░░░░░░░░╝

      Dias de verano

      • Guest
      Re: .INI with .BAT
      « Reply #19 on: June 20, 2008, 12:29:46 AM »
      hypercam, you need to stop asking question after question, and start doing some independent study.

      michaewlewis



        Intermediate
      • Thanked: 26
        • Yes
        • Yes
      • Experience: Expert
      • OS: Unknown
      Re: .INI with .BAT
      « Reply #20 on: June 20, 2008, 01:41:11 PM »
      You'd probably be better off trying visual basic with some of the ideas you have. You can download visual basic express for free here. http://www.microsoft.com/express/vb/default.aspx
      And a good book about it: http://www.microsoft.com/MSPress/books/12202.aspx

      ghostdog74



        Specialist

        Thanked: 27
        Re: .INI with .BAT
        « Reply #21 on: June 20, 2008, 09:49:26 PM »
        Is there a way to import settings from an .ini file to use in a batch file? I looked it up on Google but I didn't see anything I was looking for.
        use  a programming language. eg Python. Sample ini file
        Code: [Select]
        [Settings]
        %PrNm%=Program name
        %Auth%=Author's Name
        %PrLc%=Program location

        [Drivers]
        a = abc.dll
        b = efg.ocx
        code
        Code: [Select]
        import ConfigParser
        config = ConfigParser.ConfigParser()
        config.read("file")

        print "Program Name ", config.get("Settings", "%PrNm%")
        print "Program Location", config.get("Settings", "%PrLc%"),

        # dump entire config file
        for section in config.sections():
            print section
            for option in config.options(section):
                print " ", option, "=", config.get(section, option)

        output:
        Code: [Select]
        c:\test> test.py

        Program Name  Program name
        Program Location Program location Drivers
          a = abc.dll
          b = efg.ocx
        Settings
          %auth% = Author's Name
          %prlc% = Program location
          %prnm% = Program name