Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • November 22, 2017, 08:57 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Edit this Autoexec.bat?  (Read 1670 times)

hulkbuster

  • Participant
  • Joined in 2009
  • *
  • Posts: 234
    • View Profile
    • Donate to Member
Edit this Autoexec.bat?
« on: August 16, 2017, 05:38 AM »
Hello folks, i just started using Rufus to make a bootable USB Drive (it contain FreeDos). Its working fine, however whenever i try to put certain folder name in the autoexec.bat file: for ex-
C:\FREEDOS\PSRINVAD;    and   C:\freedos\dosedit\bin;

@echo off
set PATH=.;\;\LOCALE;C:\rar330;C:\editv12;C:\FILEMAN\FILEMAN;C:\FREEDOS\PSRINVAD;
C:\freedos\dosedit\bin;
echo Using US-English keyboard with US-English codepage [437]

The line starting from @echo off is the actual line present in the autoexec.bat file.
My problem is i can only edit this file from DosEdit program or third party software.
As i open it the "set PATH" line continues beyond the screen in one contineous line.When i choose to give the command "WordWrap", the folder name continues in next line.
To take effect, i h' to save and restart the pc. But when i type the program name invader.exe which is present in C:\FREEDOS\PSRINVAD; the program doesn't run. It is supposed to, because the line C:\FREEDOS\PSRINVAD; has been added in autoexec.bat.
But when i edit that autoexec.bat in dosedit.exe program and choose unwrap it, it is in one contineous line and it runs file "invader.exe" also other "exe" file.
So using the wordwrap is not making the file run, what should i do. Hope it is understandable.
I am quite new to DOS. Any suggestion is welcomed.
 ;)
Autorun Virus Remover.V.2.3 / Look n Stop Firewall.v2.07 / Sandboxie.v4.08  / Some Sense

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 8,999
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #1 on: August 16, 2017, 07:31 AM »
Perhaps try to edit in Notepad++ or some other non-dos based editor?  You don't have to edit the file from the command line, AFAIK.

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 6,757
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #2 on: August 16, 2017, 09:03 AM »
@hulkbuster: I'd suggest that you check on the correct usage of the PATH statement first, and in the particular version of Windows being used in each case. (Apparently, it's not necessarily the same for all versions of Windows.)

For example, refer:
  • Microsoft DOS path command - https://www.computerhope.com/pathhlp.htm
    - which provides general info/Help.

  • How to set the path and environment variables in Windowshttps://www.computerhope.com/issues/ch000549.htm
     - where it says:
    Setting the path and environment variables will differ depending on the version of Windows you have on your computer. Choose a link below for your version of Windows.
    Note: Administrator privileges are usually required to modify the path and environment variables.
    _________________________________

Hope that helps/is of use.

hulkbuster

  • Participant
  • Joined in 2009
  • *
  • Posts: 234
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #3 on: August 16, 2017, 11:52 AM »
Thank you both of you (wraith808 and lainB) i tried editing it in notepad++ and there too i had to press enter after where the semicolon ended ( ; ),after saving and restarting i still get the error. It isn't technically error but lets say it fails to run the program after it has been set in the bat file.
I do not see any other way, i saw the MS-DOS ver and the Windows ver as well for the PATH Command, i am little familiar with it; but it didn't help.
Coming to the conclusion, i would use the one liner for the PATH command, because it gets the job done and i do not need to constantly edit.
Thank you guys for taking the time out, i will holler if something works in few days.
 :) :up: :P
Autorun Virus Remover.V.2.3 / Look n Stop Firewall.v2.07 / Sandboxie.v4.08  / Some Sense

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,057
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #4 on: August 16, 2017, 12:01 PM »
IainB, Hulkbuster is trying to run FreeDOS, not an incarnation of Windows, AFAICS.

He just has to get the proper line-breaks in his autoexec.bat file (CR/LF, not a single CR or LF) to get stuff running

It also might be needed to not use SET PATH=... but the regular PATH ... command, but I don't know for sure, as I've never tried FreeDOS,
Spoiler
only several PC/MS-DOS versions from 2.0 (used since 1985/1986) and up to 6.x (Without Windows on top of it, later there was DOS 7.0 with Win95, AFAIR, but that doesn't count as a real DOS).


Well, if adding the proper line-feeds hasn't helped, does it work if you type the entire path to the executable, while having C:\ as the current directory?
It may expect some additional files in the current directory, so you may need to run a batch file to CD to the correct directory and then start the exe.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,698
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #5 on: August 16, 2017, 09:44 PM »
Split it over multiple lines is one option:

Code: Text [Select]
  1. @echo off
  2. set PATH=.;\;\LOCALE;C:\rar330;C:\editv12;C:\FILEMAN\FILEMAN
  3. set PATH=%PATH%;C:\FREEDOS\PSRINVAD;C:\freedos\dosedit\bin;
  4. echo Using US-English keyboard with US-English codepage [437]

or

Code: Text [Select]
  1. @echo off
  2. set PATH=.;\;\LOCALE;C:\rar330;C:\editv12;C:\FILEMAN\FILEMAN;^
  3. C:\FREEDOS\PSRINVAD;C:\freedos\dosedit\bin;
  4. echo Using US-English keyboard with US-English codepage [437]

NOTE: Works fine for normal DOS but who knows for FreeDOS.

hulkbuster

  • Participant
  • Joined in 2009
  • *
  • Posts: 234
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #6 on: August 27, 2017, 05:54 AM »
Split it over multiple lines is one option:

Code: Text [Select]
  1. @echo off
  2. set PATH=.;\;\LOCALE;C:\rar330;C:\editv12;C:\FILEMAN\FILEMAN
  3. set PATH=%PATH%;C:\FREEDOS\PSRINVAD;C:\freedos\dosedit\bin;
  4. echo Using US-English keyboard with US-English codepage [437]

or

Code: Text [Select]
  1. @echo off
  2. set PATH=.;\;\LOCALE;C:\rar330;C:\editv12;C:\FILEMAN\FILEMAN;^
  3. C:\FREEDOS\PSRINVAD;C:\freedos\dosedit\bin;
  4. echo Using US-English keyboard with US-English codepage [437]

NOTE: Works fine for normal DOS but who knows for FreeDOS.
Hello 4wd. Your way worked. Such a nice feeling i h' right now.
Can u write or explain to me or make a short tutorial on how to make a bootable FreeDOS on USB Device.
I think u can do it. The link is there below, if u need some idea.

Install FreeDOS 1.2 in USB.

The link is a short tutorial but i dont think its for Free dos ver 1.2.
The one i m using is a FreeDOS, it came along with Rufus prebuilt. Just made it n its working. Not most of the commands r working but i only use a .txt editor for writing n a little for playing games. Just wanted to try FreeDOS fully from a USB. Hope u r understanding.

Cd Standard n USB Full installer here:
FreeDOS Download
If h' time of course. :D  :P
Autorun Virus Remover.V.2.3 / Look n Stop Firewall.v2.07 / Sandboxie.v4.08  / Some Sense

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 6,757
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #7 on: August 27, 2017, 08:55 AM »
@Ath: Thanks for pointing that out about FreeDOS' interesting differences to MS-DOS. My knowledge of DOS is rather limited.
I'm not sure whether it is feasible, but, given the tortuous problems @hulkbuster seems to be facing with FREEDOS, I'd suggest he consider installing DR-DOS instead.

I had tried/used several versions of DOS over the years - I don't think I ever used FREEDOS though - the last I settled on being (I think) DR-DOS or MS-DOS 6.2 with JP Software's command-line interpreter 4DOS on top of that, which I installed on every PC I supported/used. I do recall the various DOSes having minor differences, but I don't recall them having particularly different or peculiar syntax or control characters compared to MS-DOS. Looks like FREEDOS might have been an exception to that, anyway.

To get the most out of the chronically limited/constrained x86 PC resources on the PCs I supported, I employed a nifty boot startup control language ("Command32" or something - I forget) that I tweaked, together with a RAM optimiser - Quarterdeck Expanded Memory Manager (QEMM) - to offer the user selective paths/choices at bootup, which optimised and configured the use of the 64K RAM (Upper/Lower) depending on what the user intended doing - i.e., whether one was going to play a game (e.g., DOOM) or do some number-crunching (e.g., Ashton-Tate's Framework). I mostly avoided using Windows when it was introduced.

The Command32 (or whatever it was called) enabled the user choices to automatically dynamically change/reconfigure the parameters/commands in the Autoexec.bat and Config.sys files during the booting process.

Last and for the longest time, I used DR-DOS/MS-DOS 6.2 with 4DOS - the latter being compatible with most DOSes, I think, (so it was not necessary to learn/remember any DOS version peculiarities) and which was really more of a macro-driven CLI extension to DOS with a whole bunch of extra (and quite powerful) commands in its command set. This all helped to insulate one from the constipated and limited MS-DOS (or DOS variant) and one could literally program the DOS almost like a GUI, whilst making it far more user-friendly and efficient/fast. I rarely - if ever - needed to use the accursed native DOS or directly edit the Autoexec.bat or Config.sys files after that, never looked back, and forgot how to use DOS.    :-[

After that, to solve some specific problems of data capture at the time, I turned my attention to better capturing/controlling the I/O data flows through the dial-up modem, using a brilliant scripting tool included in Telix.

All of this worked rather well, despite DOS!    ;D
« Last Edit: August 27, 2017, 09:26 AM by IainB »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,698
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #8 on: August 28, 2017, 12:00 AM »
Can u write or explain to me or make a short tutorial on how to make a bootable FreeDOS on USB Device.

Step 1) Download UNetbootin, run it, select FreeDOS from drop-down menu, select USB drive, click OK.

screenshot1.jpgEdit this Autoexec.bat?

Short enough?

hulkbuster

  • Participant
  • Joined in 2009
  • *
  • Posts: 234
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #9 on: August 28, 2017, 07:49 AM »

Can u write or explain to me or make a short tutorial on how to make a bootable FreeDOS on USB Device.

Step 1) Download UNetbootin, run it, select FreeDOS from drop-down menu, select USB drive, click OK.

[ Invalid Attachment ]

Short enough?

I think i  tried tht. It made it bootable, but choosing Usb from boot menu: it asked whether to install freedos from menu. Kind a like similar to using Rufus 2.9.
It didn't make a live freedos USB.

I tried tht. :huh:
Autorun Virus Remover.V.2.3 / Look n Stop Firewall.v2.07 / Sandboxie.v4.08  / Some Sense

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,698
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #10 on: August 28, 2017, 07:52 PM »
Did you boot it?

Option 3, 4, and 5 on the install menu let you run it as a LiveCD - it will be *BASIC*, you will need to modify the image it to install any needed drivers (eg. CD, sound), etc.

Otherwise:
  • use UNetbootin, Rufus, etc to install the FreeDOS 1.2 CD ISO to a USB drive and boot that.
  • install FreeDOS to a VM, the FD 1.2 USB install file includes a VM image.
  • use DOSBoxPortable instead.

hulkbuster

  • Participant
  • Joined in 2009
  • *
  • Posts: 234
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #11 on: August 30, 2017, 03:18 AM »
Did you boot it?

Option 3, 4, and 5 on the install menu let you run it as a LiveCD - it will be *BASIC*, you will need to modify the image it to install any needed drivers (eg. CD, sound), etc.

Otherwise:
  • use UNetbootin, Rufus, etc to install the FreeDOS 1.2 CD ISO to a USB drive and boot that.
  • install FreeDOS to a VM, the FD 1.2 USB install file includes a VM image.
  • use DOSBoxPortable instead.
I tried using UNetbootin; selected  the CD image but still during bootup there is no option 3,4&5.
Using Dosbox wouldn't be a problem.
I used all the tool found here:
5 Tools to make a Dos USB.
Anyways i wanted a live  Freedos USB stick.
Its okay if u couldn't find a way.
 I'll use the old Freedos tht came with Rufus (lite ver).
 :-\
Autorun Virus Remover.V.2.3 / Look n Stop Firewall.v2.07 / Sandboxie.v4.08  / Some Sense
« Last Edit: August 30, 2017, 03:25 AM by hulkbuster »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,698
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #12 on: August 30, 2017, 07:07 AM »
Step 1) Download UNetbootin, run it, select FreeDOS from drop-down menu, select USB drive, click OK.

Option 3, 4, and 5 on the install menu let you run it as a LiveCD - it will be *BASIC*, you will need to modify the image it to install any needed drivers (eg. CD, sound), etc.

IMG_20170830_220058129.jpgEdit this Autoexec.bat?


Alternatively:

Download FD12FULL.zip, extract FD12FULL.img, write it to a flash drive using Win32DiskImager, boot it, select the language, then answer No - Proceed to DOS on the next screen.

Either way you will need to modify it to do what you want.
« Last Edit: August 30, 2017, 08:14 AM by 4wd »

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 8,140
    • View Profile
    • The Blog of Deozaan
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #13 on: August 30, 2017, 04:04 PM »
autoexec bat.png

hulkbuster

  • Participant
  • Joined in 2009
  • *
  • Posts: 234
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #14 on: August 30, 2017, 07:59 PM »
Step 1) Download UNetbootin, run it, select FreeDOS from drop-down menu, select USB drive, click OK.

No - Proceed to DOS[/b] on the next screen.
Either way you will need to modify it to do what you want.
-4wd
Alternatively:
Download FD12FULL.zip, extract FD12FULL.img, write it to a flash drive using Win32DiskImager, boot it, select the language, then answer [b
Its clearly evident from the screen shot tht u're using Freedos 1.0 n the one they r providing is 1.2.
So i believe they did change certain things.
I tried every method.
U should try with ver1.2.
 :huh:
Autorun Virus Remover.V.2.3 / Look n Stop Firewall.v2.07 / Sandboxie.v4.08  / Some Sense

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,698
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #15 on: August 30, 2017, 08:30 PM »
Alternatively:
Download FD12FULL.zip, extract FD12FULL.img, write it to a flash drive using Win32DiskImager, boot it, select the language, then answer No - Proceed to DOS on the next screen.
Either way you will need to modify it to do what you want.
-4wd
Its clearly evident from the screen shot tht u're using Freedos 1.0 n the one they r providing is 1.2.
So i believe they did change certain things.
I tried every method.
U should try with ver1.2.
 :huh:

That is the archive for FreeDOS 1.2 is it not?

It boots to FreeDOS from that point you can modify it however you like.  It might be that it loads it all into RAM to run in which case you'll need to modify the image it's running from.  It might be that it runs from the flash drive mapping it as C:

The point is it runs, FreeDOS 1.2, from this point you need to work on it to get it to do what you want.

I have minimal interest in doing searches and combining bits from multiple websites, (something you're quite capable of doing), since there are easier ways to run DOS programs.

hulkbuster

  • Participant
  • Joined in 2009
  • *
  • Posts: 234
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #16 on: August 31, 2017, 03:57 AM »
Alternatively:
Download FD12FULL.zip, extract FD12FULL.img, write it to a flash drive using Win32DiskImager, boot it, select the language, then answer No - Proceed to DOS on the next screen.
Either way you will need to modify it to do what you want.
-4wd
Its clearly evident from the screen shot tht u're using Freedos 1.0 n the one they r providing is 1.2.
So i believe they did change certain things.
I tried every method.
U should try with ver1.2.
 :huh:

That is the archive for FreeDOS 1.2 is it not?

It boots to FreeDOS from that point you can modify it however you like.  It might be that it loads it all into RAM to run in which case you'll need to modify the image it's running from.  It might be that it runs from the flash drive mapping it as C:

The point is it runs, FreeDOS 1.2, from this point you need to work on it to get it to do what you want.

I have minimal interest in doing searches and combining bits from multiple websites, (something you're quite capable of doing), since there are easier ways to run DOS programs.
Thank you for taking out time to explain things. So far i h' tried all the tools necessary to achieve n make a live usb freedos.
But its not working , i h' already bricked a 16 gb brand new drive i bought recently.
I do not want to do the same, Rufus kind is little robust in this dept. It promises to make a live freedos but all it does is make an installer.
Win32Disk Imager; i think i used tht once on a 4gb drive. It made it bootable but some spaces were lost in the process. After using the format feature from the window: i was able to use the lost space again. But it lost the ability to recognise itself from the boot menu.
So please do not be angry at my continuous request, u h' helped in the past. But this time its not helping. I m okay with the older lighter ver (Rufus prebuilt).So lets close this case. For now. Let just let it be.
I thought u could do something like this from here.
Like here.
I'll just giveup on tht idea.
Autorun Virus Remover.V.2.3 / Look n Stop Firewall.v2.07 / Sandboxie.v4.08  / Some Sense

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,265
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #17 on: September 01, 2017, 12:15 PM »
Thank you for taking out time to explain things. So far i h' tried all the tools necessary to achieve n make a live usb freedos.
But its not working , i h' already bricked a 16 gb brand new drive i bought recently.

Was that device made by SanDisk, by any chance? Because I have several of these with varying capacities that work fine, except for turning them into a boot-able device. And that while using the exact same creation software and/or iso file with a different brand of pen drive results in a boot-able device 100% of the time.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,698
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #18 on: September 01, 2017, 08:54 PM »
Was that device made by SanDisk, by any chance? Because I have several of these with varying capacities that work fine, except for turning them into a boot-able device. And that while using the exact same creation software and/or iso file with a different brand of pen drive results in a boot-able device 100% of the time.

This is true, SanDisk chose to have the flash drives identify themselves as Local Drive instead of Removable Drive for a few years - caused a lot of trouble, only need to have a look across their forums and elsewhere.

That being said, the flash drive I was using above was a 3-4 years old SanDisk Cruzer Switch 4GB and it was working fine.

Case in point:
images.jpgEdit this Autoexec.bat?

Two 8GB SanDisk Cruzer Switches, bottom identifies as a Local Disk, top identifies as a USB Drive.
« Last Edit: September 02, 2017, 02:45 AM by 4wd »

wjamoe

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 90
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #19 on: September 03, 2017, 12:13 PM »
Just to be complete, creating the autoexec.bat file was and is also possible from the DOS commandline (cmd.exe in windows), I do not know if this is true for freedos, though.

COPY CON FILENAME copies keyboard input to filename.

use [Ctrl-Z] after your last character, do not forget an [Enter] before [Ctrl-Z]. 8)

for example

Code: Text [Select]
  1. copy con autoexec.bat[Enter]
  2. <type here your first line>[Enter]
  3. <type here your second line which is verry very very .....................................................................................long I think max 255 chars>[Enter]
  4. [ctrl-Z]

In case the destination file already exists, DOS asks permission to overwrite the existing file.

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,265
    • View Profile
    • Donate to Member
Re: Edit this Autoexec.bat?
« Reply #20 on: September 03, 2017, 01:03 PM »
EDLIN is also available for FreeDOS...