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

Author Topic: Running old software on XP  (Read 4808 times)

0 Members and 1 Guest are viewing this topic.

geoffl

    Topic Starter


    Intermediate

    • Experience: Beginner
    • OS: Unknown
    Running old software on XP
    « on: January 02, 2011, 11:22:54 PM »
    Hi,
    I run old Dos software on XP. It works fine with a few exceptions. My program opens files with temporary names and when it quits requests the OS to rename the temporary file with the correct name. eg: a.dat is opened as a.19x and when my files are closed renamed to a.dat. This works fine the first time, but if I try to open the same file without quitting and reloading my program, I get the message 'cannot create'. My manual says this is because the file is in use by another process. Sure enough if I go to 'my computer' and try to open the file windows says 'access denied'. I can look at 'my computer' and quit my program and the file disappears. I guess my program is asking for the rename and windows is denying access but on quitting windows is deleting the temporary file as requested.
    Any help greatly appreciated
    GeoffL

    comda



      Adviser
    • Thanked: 6
      • Yes
    • Experience: Experienced
    • OS: Windows XP
    Re: Running old software on XP
    « Reply #1 on: January 03, 2011, 08:01:24 PM »
    I don't know much about how windows and dos run but the reason it won't run is because windows xp still uses MS DOS in the back round but this version of dos is newer that your program is and windows is trying to change the program so that it works under its version of dos but the program from my perspective won't run after words because its not made to run under windows xp version of dos. I suggest if u still have your old pentium 1 or 2 running windows 95 or 98. I still play classic dos games on these systems. Or try using Dos Box. Its a great emulator for DOS and works great will all the dos software i still use when im using OSX. Try it heres the download link. Just select the os your using. In this case click on the windows one.

    http://www.dosbox.com/download.php?main=1

     

    geoffl

      Topic Starter


      Intermediate

      • Experience: Beginner
      • OS: Unknown
      Re: Running old software on XP
      « Reply #2 on: January 04, 2011, 02:01:10 AM »
      Hi,
      Thanks for your reply. If I use dosbox and every thing runs fine but very slow. I cant use my old machine forever and need to find an answer to this problem. My prog is a fairly complicated data base and we run it under XP and win7 eight hours a day every day. Under XP every thing works fine except this issue. Somehow windows is not letting go of this file the way dos would.
      GeoffL

      JJ 3000



        Egghead
      • Thanked: 237
      • Experience: Familiar
      • OS: Linux variant
      Re: Running old software on XP
      « Reply #3 on: January 04, 2011, 02:11:29 AM »
      Have you tried running your program in compatibility mode?
      Save a Life!
      Adopt a homeless pet.
      http://www.petfinder.com/

      geoffl

        Topic Starter


        Intermediate

        • Experience: Beginner
        • OS: Unknown
        Re: Running old software on XP
        « Reply #4 on: January 04, 2011, 02:45:53 AM »
        Compatability mode only goes back to win95-98. It didn't run as well as it does on NTVDM. It was originally written for dos-2.
        Thanks

        mroilfield



          Mentor
        • Thanked: 42
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 11
        Re: Running old software on XP
        « Reply #5 on: January 04, 2011, 03:08:51 AM »
        It would be in your best interest to either start rebuilding your database in a more modern program that is easily used with windows or find some one that can do it for you. Like you said you can't use your old system forever and there might come a day when you are no longer able to get anything to work with the current data base.

        It sounds like this maybe a business application and if I was a perspective client/customer I would be a little leery of a company that is still reliant on old Dos programs.
        You can't fix Stupid!!!

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: Running old software on XP
        « Reply #6 on: January 04, 2011, 03:30:31 AM »
        Hi,
        Thanks for your reply. If I use dosbox and every thing runs fine but very slow. I cant use my old machine forever and need to find an answer to this problem. My prog is a fairly complicated data base and we run it under XP and win7 eight hours a day every day. Under XP every thing works fine except this issue. Somehow windows is not letting go of this file the way dos would.
        GeoffL

        If the program was written for DOS 2.0, that's nearly 30 years old. Surely there is a up-to-date equivalent for this program that runs on a modern OS?


        DOS has never had a concept of "processes" Either a program is running, or it is not. only using add-on programs like "SHARE.EXE" could a sharing system be emulated. Applications themselves needed to be written to take advantage of SHARE when it was loaded to properly support concurrent activities. Since SHARE didn't even appear until about the time of DOS4, we can safely say that the program in question is designed to be the only program running on the system.

        Even back then you couldn't "open a file as another" (if I understand you correctly) this sounds more like the old (and always wrong) method that used to be used where the program would open the file, save a changed version of that file to another file, and then when closing that file, delete the original and then rename the copy to the old name. Thing is you're lucky it worked at all for this long. With DOS, many operations were handled "by name" that is, you would operate on files by giving their filename (except in a few cases where it actually took a handle). NT operates largely with handles; for example, a file is deleted by literally opening it with a "DELETE_ON_CLOSE" flag, and then closing it.

        Where does this come in, though? well, the NTVDM clearly has to "emulate" DOS functions by calling the NT functions, so while the functions themselves generally emulate it properly there can be any number of corner cases where DOS programs try to take advantage of any number of undocumented side effects or the handle file information in order to try to speed up the program. In this case it sounds like the program isn't deleting the temporary file and when you open the file again it has problems creating it  (since it already exists).


        What software product is this? There is certain to be a newer windows version of either the same software or another compatible software.
        I was trying to dereference Null Pointers before it was cool.

        geoffl

          Topic Starter


          Intermediate

          • Experience: Beginner
          • OS: Unknown
          Re: Running old software on XP
          « Reply #7 on: January 04, 2011, 04:41:57 AM »
          Hi,
          This is a program called FMS80. Originally written in 1980 for CPM. Just made the jump to DOS in 1886 when the writers probably closed up shop & went to work for someone like Microsoft. It is a relational data base with a programing language in which I have written 300 - 400 programs.
          It runs our business from Cash register through orders, reports and analysis to p&L and balance sheets. I have looked at things like Data Flex but a little too complicated for me. The fact that FMS runs at all amasses me. It runs all my programs perfectly, day after day except for 3-4 functions which I have written batch files to do. If I want to sort files I write a batch file
          fms sort file 1
          fms sort file 2
          fms sort file 3
          Fms is the program sort is an internal program and works 1 time
          If I try   fms sort file 1  sort file2
          I get message Cannot create file 2
          This is not a great problem but there are other things which I can't do  under dosbox which is a pain.
          I don't understand 'Handles'
          Thanks for your interest

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: Running old software on XP
          « Reply #8 on: January 04, 2011, 05:26:24 AM »
          If you want to continue using old, abandoned software, for whatever reason- you should stick with the operating systems it was designed  for. In this case you should set up a DOS system for use with the software; otherwise you will no doubt be plagued with miscellaneous issues related to the completely different architectures (CP/M, DOS, and Windows 9x all used a Monolithic kernel whereas NT is a microkernel; basically, the entire foundation is different and while you can stick the same buildings on top, some of the programs are going to make "assumptions" about what the foundation is comprised of that will cause problems because it is no longer the same.

          I see you've asked questions about various things in regards to FMS80:
          http://forums.devshed.com/c-programming-42/maybe-a-silly-question-691581.html

          However, it also appears that you are somewhat reluctant to move to a new system, mostly due to the various scripts you've written for this "FMS80" program. While this is somewhat admirable in some ways in a "stick with what works" type of manner, you are already trying to move to a new system; I have seen plenty of POS systems and so forth that are running just fine sticking with DOS as their OS, what you are doing is migrating one side (the Operating System) without migrating the other; It's either both or neither for the most part.

          You've also asked similar questions about this software here: http://www.computerhope.com/forum/index.php?topic=34814.0 Contrex (now Salmon Trout) noted:

          Quote
          You are OK in DOS mode, you'll just have to stick to that.

          Which echoes true. As you note here:

          Quote
          I cant use my old machine forever and need to find an answer to this problem.

          Indeed- but you can't expect to continue to use this 25 year old program forever either; at some point it will be necessary to migrate to something else, and at that time it will not matter how many programs you've, or anybody else has written in it's proprietary pascal-like language, because none of them will work- the beginnings of why you are starting to see. Contrex/ST made a similar suggestion in that thread to use a Floppy-disk with an earlier DOS version on it to run the program under; DOS boot disks will generally work on even modern systems in this manner, and since the incompatibility is due to running under Windows (and more precisely in this case the NTVDM) that idea I think bears some consideration. Basically, you cannot prevent the migration to a new tool, just delay it as long as possible, and maybe hope (perhaps sadistically) that by the time it becomes necessary it is no longer your problem.
          I was trying to dereference Null Pointers before it was cool.

          geoffl

            Topic Starter


            Intermediate

            • Experience: Beginner
            • OS: Unknown
            Re: Running old software on XP
            « Reply #9 on: January 05, 2011, 03:01:04 AM »
            Hi,
            I really do hear what you are saying and thanks for taking the time to say it. I have asked many questions and now can run this stuff full screen on win7, send printer codes down my network to a HP multi function printer and open a com port - all things most people told me were not possible. So asking questions on the web has been great for me. Maybe there is no answer but it seems to me to be so close to almost working perfectly. I have the same problem if I load my data files onto a remote network drive. Can you tell me what is the difference between a local drive and a remote drive?
            Geoffl