ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Edit this Autoexec.bat?

(1/5) > >>

hulkbuster:
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.
 ;)

wraith808:
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:
@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 Windows -  https://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.
_________________________________

--- End quote ---

Hope that helps/is of use.

hulkbuster:
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

Ath:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version