Monday, September 19, 2011

Executing Turbo C++ on Windows 7, 64-bit using DOSBox

Best Blogger Tips

Who said you cannot run the old 16 bit Turbo C++ on Windows 7 64-bit???

Of course you can, even without the hassles of when an OS natively supports it. I mean that because, you have to install C++ in root of C: drive in order to effectively work, isn’t??? Well, that’s the problem when we try to execute that application directly through a Windows OS. When using a DOSBox, you can overcome that glitch & execute the program anywhere effectively. To do that you either have to copy & paste the installed files onto any drive or any folder you wish & execute the ‘TC.exe’ from there. Another way is to do a clean install by DOS BOX. You just have to enter the following commands onto your DOSBox window. First of all, copy the Turbo C++ installer to any drive or folder you wish & execute the following commands. In my case the installer name is ‘TurboC.exe’. In all the commands below, you have to replace the drive letter & path according to yours, but the commands remain the same.

Installing via DOSBox
1) MOUNT D D:\C++
2) D:

Executing via DOSBox
1) MOUNT D D:\C++
2) D:

If you enter these commands accurately the good old blue window will open up without any error saying ‘Invalid Directory’.
CAUTION: Whatever may be the case, don’t mount your original root of C: drive as C:, or else you will probably screw up with your OS files.

If you’re sick of typing these commands every time, then there’s an easy way to do that & that is, editing the ‘conf’ file.
1) After installation of Turbo C++ via DOSBox, copy down the path of TC.exe. That is D:\C++\TC\BIN\TC.exe

2) Go to ‘C:\Users\Robin Mathew Rajan\AppData\Local\DOSBox’. (You need to replace ‘Robin Mathew Rajan’ to your username. The easier way to go to that directory is to type %AppData% onto the RUN box & hit enter, move back onto LOCAL, search for DOSbox & voila you’re there!!)There you’ll find a file called ‘dosbox-0.74.conf’. Copy that file to that folder itself & rename it as ‘TurboC.conf’ (without the quotes)
Open ‘TurboC.conf’ with the notepad & enter these lines at the end of the file, just below you see ‘# You can put your MOUNT lines here’. Please note that the MOUNT command below require a double quote when specifying the path, or else the code don’t work.

MOUNT D "D:\C++"

3) Save it & close the file

4) Now go to the desktop, where the shortcut of DOSBox is, while installation.

5) Right click on it & select properties

6) In the ‘Target box’ at the end of the line, type a space & enter ‘-conf’ (without the quotes). Type again a space & enter the path of the conf file which we created in double quotes, that is, TurboC.conf. For eg: “C:\Users\Robin Mathew Rajan\AppData\Local\DOSBox\TurboC.conf” (Please note that, this time we have to enter the path in double quotes as mentioned above). Click on OK & close the dialog box.

7) Rename the ‘DOSBox’ shortcut on Desktop to ‘C++’ for quick reminding.
That’s it. Click on the shortcut on the desktop & enjoy.


Post a Comment

Related Posts Plugin for WordPress, Blogger...

Get Our Latest Posts Via Email - It's Free

Enter your email address:

Delivered by FeedBurner