CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2000
    Location
    Indiana USA
    Posts
    193

    Path in Autoexec.bat in Windows 2000

    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


  2. #2
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Re: Path in Autoexec.bat in Windows 2000

    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.


  3. #3
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Re: Path in Autoexec.bat in Windows 2000

    ...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!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured