Click to See Complete Forum and Search --> : Path in Autoexec.bat in Windows 2000
Catrina
June 22nd, 2001, 02:46 PM
This is not really a VB question, but it effects my application. My program used the Path statement in the Autoexec.bat to call certain executables. A client just changed to a Win2000 machine, and the person helping them with the conversion is saying Win2000 does not have an autoexec.bat. Does anyone know if this is true, or how the Path is set on a Win2000 machine. This is my first experience with anything other than Win 95 or Win98. Thanks in advance.
Catrina
Ghost308
June 22nd, 2001, 02:54 PM
That's true, by default Win2K does not use the Autoexec.bat or Config.sys like older versions of Windows that relied more heavily on DOS. But if you do create an Autoexec.bat file on the root of the OS drive, Win2K will execute it just like old versions of Windows and you use the Path command just like always.
Ghost308
June 22nd, 2001, 02:56 PM
...wish I'd thought about this before clicking continue on my last post...
You should be able to execute the Path command from within your code using the Shell function.
retval = Shell("Path C:\Winnt;", 1)
..somethin like that.
You can use APIs like GetWindowsDirectory if you want that kinda stuff in your path. Hope that helps some!
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.