News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

PROMPT is case sensitive

Started by Rockphorr, June 15, 2006, 08:24:02 AM

Previous topic - Next topic

Rockphorr

I created program to show it.
If you have free time to test case sensitive of the PROMPT var on your OS type following commands

command.com
set
envirbug.exe
set

after compare value of PROMPT var with prompt on scceen before and after envirbug.exe

[attachment deleted by admin]
Strike while the iron is hot - Бей утюгом, пока он горячий

Rockphorr

the report of my win2k at the work:

Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-1999.

C:\DOCUME~1\92A2~1>cd \!

C:\!>dir
Том в устройстве C имеет метку Локальный диск
Серийный номер тома: 1069-B7DE

Содержимое папки C:\!

15.06.2006  12:55       <DIR>          .
15.06.2006  12:55       <DIR>          ..
13.06.2006  20:07                  903 ENVIRBUG.EXE
13.06.2006  20:09                2 449 ENVIRBUG.ZIP
15.06.2006  12:55              317 712 MASMsetup.EXE
               3 файлов        321 064 байт
               2 папок  12 827 111 424 байт свободно

C:\!>set  <---- correct prompt for  $P$G value
COMSPEC=C:\WINNT\SYSTEM32\COMMAND.COM
ALLUSERSPROFILE=C:\DOCUME~1\ALLUSE~1
APPDATA=C:\DOCUME~1\92A2~1\APPLIC~1
COMMONPROGRAMFILES=C:\PROGRA~1\COMMON~1
COMPUTERNAME=INTER
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\_-в_а
LOGONSERVER=\\INTER
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
OS2LIBPATH=C:\WINNT\system32\os2\dll;
PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0806
PROGRAMFILES=C:\PROGRA~1
PROMPT=$P$G
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINNT
TEMP=C:\DOCUME~1\92A2~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\92A2~1\LOCALS~1\Temp
USERDOMAIN=INTER
USERNAME=_-в_а
USERPROFILE=C:\DOCUME~1\92A2~1

C:\!>envirbug
Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-1999.

C>set   <---- ERROR prompt for $P$G value
COMSPEC=C:\WINNT\SYSTEM32\COMMAND.COM
ALLUSERSPROFILE=C:\DOCUME~1\ALLUSE~1
APPDATA=C:\DOCUME~1\92A2~1\APPLIC~1
COMMONPROGRAMFILES=C:\PROGRA~1\COMMON~1
COMPUTERNAME=INTER
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\_-в_а
LOGONSERVER=\\INTER
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
OS2LIBPATH=C:\WINNT\system32\os2\dll;
PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0806
PROGRAMFILES=C:\PROGRA~1
prompt=$p$g  <--- now prompt var is low case
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINNT
TEMP=C:\DOCUME~1\92A2~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\92A2~1\LOCALS~1\Temp
USERDOMAIN=INTER
USERNAME=_-в_а
USERPROFILE=C:\DOCUME~1\92A2~1

C>
Strike while the iron is hot - Бей утюгом, пока он горячий

hutch--

Rockphorr,

This is what it looks like on my US English Win2000 sp4 CMD.EXE


C:\>prompt $p$g

C:\>prompt $p$d

C:\Fri 06/16/2006prompt $p$x

C:\prompt $p$g

C:\>
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

MichaelW

Rockphorr,

I see now that you are accessing the environment block directly. It seems that for COMMAND the environment variable names are case sensitive, and the system-set variable names are all upper case. I experimented with the path variable from a DOS program running under Windows 2000, and found that "PATH" and "PaTH" are seen as two different variables.
eschew obfuscation

Rockphorr

Michael,

There is windir var in win95. It is low case by default.
Strike while the iron is hot - Бей утюгом, пока он горячий

Rockphorr

Quote from: hutch-- on June 15, 2006, 03:42:58 PM
Rockphorr,

This is what it looks like on my US English Win2000 sp4 CMD.EXE


C:\>prompt $p$g

C:\>prompt $p$d

C:\Fri 06/16/2006prompt $p$x

C:\prompt $p$g

C:\>


You must launch envirbug.exe to see the effect.
Strike while the iron is hot - Бей утюгом, пока он горячий