hey how do i set the path in a bat file and config file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
flyhigh427
Posts: 7
Joined: 07 Mar 2010 09:14

hey how do i set the path in a bat file and config file

#1 Post by flyhigh427 » 03 Aug 2011 10:54

hey yall
how do i set the path to find the path, to itself?
i mean if it s in drive a this time then in drive f the next time etc.
is there a way?
thanks


Code: Select all

@ECHO OFF

path=a:\;a:\oak
a:\smartdrv.exe
prompt=$p$g


LH MSCDEX.exe /d:USBCD001



Code: Select all

DEVICE=a:\HIMEM.SYS /TESTMEM:OFF
DEVICE=a:\EMM386.EXE NOEMS
DOS=HIGH,UMB




device=a:\oak\oakcdrom.sys /D:mscd001
;device=a:\oak\btdosm.sys
;device=a:\oak\flashpt.sys
;device=a:\oak\btcdrom.sys /D:mscd001
;device=a:\oak\aspi2dos.sys
;device=a:\oak\aspi8dos.sys
;device=a:\oak\aspi4dos.sys
;device=a:\oak\aspi8u2.sys
;device=a:\oak\aspicd.sys /D:mscd001

shell=a:\command.com /E:1024 /P
FILES=30
BUFFERS=20
lastdrive=z



Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: hey how do i set the path in a bat file and config file

#2 Post by Ed Dyreen » 03 Aug 2011 11:07

'
You mean how to get the active drive ?

Code: Select all

   rem :: Get Boot Drive
   rem ::
   rem ::OUTPUT:
   rem :: @Drive.Boot    BYVAL    Return;    Where @Drive.Boot = '[A-Z]:'
   rem ::
   rem ::(
      >"%Drive.RAM%\DRVStBt.BAT" "%Drive.RAM%\DRVGTACT.EXE"
   rem    ::
      call "%Drive.RAM%\DRVStBt.BAT"
   rem    ::
      set Drive.Boot=%drive%
      set drive=
   rem ::)
This program will not run from config.sys though, but you should avoid loading devices from config.sys anyways.

Code: Select all

DOS=HIGH,UMB

Files=40
Buffers=30
Stacks=0,0

set Drive.RAM=X:
set Drive.CD=T:
set Drive.Server=Y:

install=SHSURDRV.EXE 8192k,D480,X: /Q
install=TUNZ.COM -o BOOT.ZIP X:\

SHELL=X:\COMMAND.COM /E:4096 /P
example: load device driver from autoexec

Code: Select all

   "%Drive.RAM%\SHOWMENU.EXE" Analizing UDMA settings
   rem ::(
      If not ["%UDMA%"] == ["1"] goto AUDMASD ()

      echo.Loading UltraDMA hard-disk driver
   rem    ::(
         "%Drive.RAM%\DEVLOAD.COM" UDMA.SYS
   rem    ::)

      :AUDMASD ()
   rem ::)
:wink:
http://netbootdisk.com

By the way, there are much better ways for getting access to high and upper memory more efficiently than the outdated emms and himem.
http://www.mdgx.com
Last edited by Ed Dyreen on 03 Aug 2011 11:25, edited 2 times in total.

flyhigh427
Posts: 7
Joined: 07 Mar 2010 09:14

Re: hey how do i set the path in a bat file and config file

#3 Post by flyhigh427 » 03 Aug 2011 11:13

thanks it helped alot

Post Reply