Loading ...
Sorry, an error occurred while loading the content.

%windir% environment variable

Expand Messages
  • Michael Marquart
    Can anyone tell me how to remove the %windir% environment variable in a dos window under windows 98 se? Michael
    Message 1 of 9 , May 22, 2001
    • 0 Attachment
      Can anyone tell me how to remove the %windir% environment variable in a dos
      window under windows 98 se?

      Michael
    • Bob Bissinnar
      At 12:13 AM 5/23/2001 +1000, Michael Marquart Writes ... Greetings Michael, My bad news is that I could not get the changes to stick . Having said that here s
      Message 2 of 9 , May 23, 2001
      • 0 Attachment
        At 12:13 AM 5/23/2001 +1000, Michael Marquart Writes
        >Can anyone tell me how to remove the %windir% environment variable in a dos
        >window under windows 98 se?

        Greetings Michael,
        My bad news is that I could not get the changes to "stick". Having said
        that here's what I tried (maybe this will trigger something for you or
        others to try) <Using Win 98 SEWindows 98 [Version 4.10.2222]
        Revision A DOS is in HMA>

        The %windir% appears to be set from the reg key
        [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup]

        I changed the key and made changes to msdos.sys, vmm32.vxd and win.com
        using a hex editor. I found nothing to change in command.com or
        explorer.exe that seemed to work. (did screw up a couple of reboots though!
        <grin>)

        Could be I'm failing in my tests for what you want to do. I used the follow
        batch file: (86 the **)
        *******************************
        @echo off
        echo First Environment:
        set
        echo @echo off > try.bat
        path >> try.bat
        echo echo. >> try.bat
        echo echo Here is the Second Environment: >> try.bat
        echo set >> try.bat
        command Noenvir /c try.bat
        del try.bat
        *****************************
        I'm not the "sharpest pencil in the box" when it comes to WIN or DOS....I
        do this for fun!<smile>

        Thanks for your help in the past! Good luck and best wishes! Let us know if
        you find a solution!
        bob
      • Michael Marquart
        ... Thanks for going to the effort Bob! Much appreciated. I did get some help from Todd Vargo which solved my problem, and his advice was: Sure, create a
        Message 3 of 9 , May 23, 2001
        • 0 Attachment
          >At 12:13 AM 5/23/2001 +1000, Michael Marquart Writes
          > >Can anyone tell me how to remove the %windir% environment variable in a dos
          > >window under windows 98 se?
          >
          >Greetings Michael,
          >My bad news is that I could not get the changes to "stick". Having said
          >that here's what I tried (maybe this will trigger something for you or
          >others to try) <Using Win 98 SEWindows 98 [Version 4.10.2222]
          >Revision A DOS is in HMA>
          >
          >The %windir% appears to be set from the reg key
          >[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup]
          >
          >I changed the key and made changes to msdos.sys, vmm32.vxd and win.com
          >using a hex editor. I found nothing to change in command.com or
          >explorer.exe that seemed to work. (did screw up a couple of reboots though!
          ><grin>)

          Thanks for going to the effort Bob! Much appreciated.

          I did get some help from Todd Vargo which solved my problem, and his advice
          was:

          "Sure, create a PIF to your batch (or program). Then open the properties
          dialog for that PIF, make the Program tab current, press the Advanced
          button, and select the "Prevent MS-DOS-based programs from detecting
          Windows" CheckBox. Make sure to press both OK buttons."


          My test batch simply looks like this, and when it doesn't echo anything then
          that's how I wanted it.

          @echo off
          echo. %windir%




          >..I do this for fun!<smile>
          >
          >Thanks for your help in the past! Good luck and best wishes! Let us know if
          >you find a solution!
          >bob

          I do it for fun also - and thanks for your kind words.

          Michael
        • Bob Bissinnar
          At 03:55 AM 5/24/2001 +1000, Michael Marquart Writes ... Very simple.....nice job and smart! As usual I used my 38-55 vs a 22 to shoot the problem
          Message 4 of 9 , May 23, 2001
          • 0 Attachment
            At 03:55 AM 5/24/2001 +1000, Michael Marquart Writes
            >I did get some help from Todd Vargo which solved my problem, and his advice
            >was:>"Sure, create a PIF to your batch (or program). Then open the properties
            >dialog for that PIF, make the Program tab current, press the Advanced
            >button, and select the "Prevent MS-DOS-based programs from detecting
            >Windows" CheckBox. Make sure to press both OK buttons."

            Very simple.....nice job and smart! As usual I used my 38-55 vs a 22 to
            shoot the problem <grin>
            thanks for the reply.......
            good luck & best wishes
          Your message has been successfully submitted and would be delivered to recipients shortly.