Announcement

Collapse
No announcement yet.

Are Bat. files obsolete?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Are Bat. files obsolete?

    With increasing numbers of people 'upgrading' to Windows XP, there are more and more complaints about batch files not working. These are simple DOS based programs which copy and overwrite files in the main Civ directory and in the scenario folder, allowing changes in graphics, units, terrain and events.

    It has been suggested that installing a file called "Choice" (see attached) will allow Bat. files to work with XP. While they will actually run with choice installed, they don't work the way they're supposed to. In fact, the more times you run them the more they screw up the files they're supposed to change back and forth.

    So my question is whether or not anyone is able to come up with a solution, or whether Bat. files will be rendered obsolete?
    Attached Files
    Tecumseh's Village, Home of Fine Civilization Scenarios

    www.tecumseh.150m.com

  • #2
    I don't know whats wrong with you people, it's not that hard to use a batch file and put choice in your scenario directory...

    Comment


    • #3
      Originally posted by DarthVeda
      I don't know whats wrong with you people, it's not that hard to use a batch file and put choice in your scenario directory...
      What is it about "It doesn't work" that you don't get?
      Tecumseh's Village, Home of Fine Civilization Scenarios

      www.tecumseh.150m.com

      Comment


      • #4


        I've never had a problem running batch files under windows XP after installing choice.
        STDs are like pokemon... you gotta catch them ALL!!!

        Comment


        • #5
          Okay, before we ignite, let's debug a little. Here's a test for CHOICE.

          This batch file works repeatedly on my XP machine, when CHOICE is called from a local directory.

          @echo off
          cls
          echo.
          echo Please choose from the options below:
          echo.
          echo 1. Option 1
          echo 2. Option 2
          echo Ctrl-Break. Exit without Loading
          echo.
          choice /c:12 Enter your selection

          if errorlevel 2 goto Opt2
          if errorlevel 1 goto Opt1

          :Opt1
          echo Opt1
          goto done

          :Opt2
          echo Opt2
          goto done

          :done
          echo.
          pause
          exit
          So now I'm pretty sure that CHOICE.COM isn't the problem, at least when called from the local directory. I'll test some more when I have a chance. From your other posts, Tech, I'd suspect the copy portion of the batch file is at fault.

          Even so, BAT files are obsolete. I just don't know of anything better.
          El Aurens v2 Beta!

          Comment


          • #6
            I've had WindowsXP for the last year and a half, and have never had a major problem with batch files as long as choice.com was installed and properly working. There are two places to install it:

            1. In the scenario directory (this is a temporary fix and will work only for this scenario)
            2. In the windows System32 directory. This will fix it until you reformat.

            I've had the occassional glitch where a rules file doesn't copy for some reason but that is 1 in about 500 sessions that happens.

            Comment


            • #7
              I've had XP installed for the best part of a year on my D drive. I kept Win98 on the C drive, though I just use the XP. I'm specifically referring to the Bat. files in Red October. It includes a bat. file which changes the dialog and city files and 3 .dll files in the main ToT directory.

              It works fine in Win98; never had a problem. It doesn't work at all in XP. Here's the screen I get. If I'm doing something wrong, please tell me.
              Attached Files
              Tecumseh's Village, Home of Fine Civilization Scenarios

              www.tecumseh.150m.com

              Comment


              • #8
                i'm new to xp, so i've never heard of choice, i'll have to go check this out if it really works

                Comment


                • #9
                  Tech, you're onto something. XP enforces a rule that presumably Win98 doesn't. XP requires a second argument for CHOICE.COM after the /Cyx in RO's Restore.bat. When I appended "Enter your selection", it worked okay on my XP. If it's not there, the result isn't pretty. A line of abnormal characters is displayed.

                  The pertinent 'code' with the change underlined.

                  :echo off
                  echo This procedure restores ToT graphic files to their previous state.
                  echo -
                  echo DISCLAIMER: You run this procedure at you own risk.
                  echo -
                  echo Press y to continue
                  echo Press x to exit
                  choice /C:yx Enter your selection
                  IF errorlevel 2 goto abort
                  etc.
                  Two panels attached: top, no 2nd string; bottom, 2nd string present.
                  Attached Files
                  El Aurens v2 Beta!

                  Comment


                  • #10
                    Thanks, though I'm not sure I understand it. I see the C drive referenced in your new line. Could that fact that I've moved everything to the D drive have also affected this?
                    Tecumseh's Village, Home of Fine Civilization Scenarios

                    www.tecumseh.150m.com

                    Comment


                    • #11
                      No. /C is a switch. It has absolutely nothing to do with what drive the program or the scenario is located.

                      Comment


                      • #12
                        I see the C drive referenced in your new line. Could that fact that I've moved everything to the D drive have also affected this?
                        No, I'm pretty sure that as long as CHOICE.COM is either in the local drive or the path (usually c:\Windows\System32 and c:\Windows) you're okay. Otherwise the error message would be different.

                        Looks like you already understand how to use the /C switch that DV's referring to.

                        Simply put some text after the "/Cyx" argument. It can be multiple words, though there's undoubtedly a limit on total length (64 characters?, 128?). As long as there's a space between "/Cyx" and the new text, it ought to work.

                        What you've shown in RO is that W98 doesn't care whether the additional text is there or not. With WXP, however, that bit of text after "/Cyx" (where y and x are the keys that the user uses to reply) appears to be absolutely essential. 'Sfunny the bugs that a new OS can bring out of an old program.
                        El Aurens v2 Beta!

                        Comment


                        • #13
                          Hooray! A reason to not have XP. Maybe I won't spend the (ridiculous) 100+ quid to upgrade...
                          "The cost of living hasn't affected it's popularity." - Anonymous
                          "I must confess, I was born at a very early age." - Groucho Marx
                          "Time is the best teacher. Unfortunatley, it kills all it's pupils." -Hector-Luis Berloiz

                          Comment


                          • #14
                            You were going to pay for that?

                            Comment


                            • #15
                              Friends don't let friends pirate Microsoft programmes.
                              Blog | Civ2 Scenario League | leo.petr at gmail.com

                              Comment

                              Working...
                              X