IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Windows 10 Discussion :

Problème echo $Path + problème nom du disque local c:\


Sujet :

Windows 10

  1. #1
    Membre à l'essai
    Femme Profil pro
    Étudiant
    Inscrit en
    Octobre 2013
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Octobre 2013
    Messages : 17
    Points : 19
    Points
    19
    Par défaut Problème echo $Path + problème nom du disque local c:\
    Bonjour,
    j'ai un problème avec windows 10.
    A chaque fois que je tape echo $Path, il m'envoie $Path. alors qu'il y a deux jours, il m'envoie la valeur des variables d'environnements.
    De plus, j'ai ce message bizarre :

    Le volume dans le lecteur C s’appelle Disque local
    Le numéro de série du volume est 8004-ABF8

    De plus qu'on j'utilise maven pour les projets java j2EE. mvn est reconnu uniquement dans le répertoire bin de maven. en dehors, càd quand je vais dans le répertoire du projet et surtout celui contenant pom.xml, mvc n'est pas reconnu.

    Je ne sais pas ce qui s'est passé.

    quelqu'un pourrait m'aider à résoudre ce problème car ça me bloque pour avancer.

    Merci d'avance pour votre aide.

    Batman90.

  2. #2
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 839
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut

    Si tu tapes dans la console de cmd ceci :
    ça retourne quoi ?

  3. #3
    Membre à l'essai
    Femme Profil pro
    Étudiant
    Inscrit en
    Octobre 2013
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Octobre 2013
    Messages : 17
    Points : 19
    Points
    19
    Par défaut
    Bonjour,

    Merci pour votre réponse. quand je tape echo %PATH% --> ça m'affiche le contenu des variables d'environnements.


    Mais je ne comprends toujours pas le message qui s'affiche sans que je demande quoi que ce soit :

    Le volume dans le lecteur C s’appelle Disque local
    Le numéro de série du volume est 8004-ABF8

    Avez-vous une idée ou une suggestion ou bien un tutoriel à lire.

    Merci par avance

    Batman90.

  4. #4
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 839
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut

    Copier et coller ce code batch dans votre noteapd et enregistrer le sous le nom de Info.bat et exécuter-le par double clique :
    Code Batch : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    :: INFO.BAT version 1.4
    :: source http://www.dostips.com
    :: Bugs and suggestions can be reported in thread http://www.dostips.com/forum/viewtopic.php?f=3&t=7347
    ::
    :: Release History:
    ::  2016-09-24 v1.4: Bugfix for trailing backslashes in PATH
    ::  2016-09-24 v1.3: RunAs check simplified
    ::  2016-09-20 v1.2: Version added to the output
    ::  2016-09-19 v1.1: Faulty percent sign in the "dirs" variable corrected
    ::  2016-09-10 v1.0: Initial release
     
    @echo off
    set ex_noreg=Disabled
    2>nul set "ex_noreg=Enabled "
    set de_noreg=Disabled
    if "!!"=="" (set de_noreg=Enabled )
     
    setlocal EnableExtensions DisableDelayedExpansion
    cd /d "%~dp0"
    set /p "v="<"%~fs0"
    >"%temp%\info.txt" echo [code^]%v:~2%
     
    :: prepare some variables to shorten lines in the script
    set "International=Control Panel\International"
    set "CurrentVersion=SOFTWARE\Microsoft\Windows NT\CurrentVersion"
    set "CodePage=SYSTEM\CurrentControlSet\Control\Nls\CodePage"
    set "CMDproc=Software\Microsoft\Command Processor"
    set /a "HKCU=80000001, HKLM=80000002, HKU=80000003"
     
    :: try to assign variables for used tools in order to make the script run even if the path or pathext variables are corrupted
    if exist "%__APPDIR__%chcp.com" (set "chcp=%__APPDIR__%chcp.com") else (set "chcp=echo" &>>"%temp%\info.txt" echo chcp.com not found.)
    if exist "%__APPDIR__%find.exe" (set "find=%__APPDIR__%find.exe") else (set "find=echo" &>>"%temp%\info.txt" echo find.exe not found.)
    if exist "%__APPDIR__%findstr.exe" (set "findstr=%__APPDIR__%findstr.exe") else (set "findstr=echo" &>>"%temp%\info.txt" echo findstr.exe not found.)
    if exist "%__APPDIR__%gpresult.exe" (set "gpresult=%__APPDIR__%gpresult.exe") else (set "gpresult=" &>>"%temp%\info.txt" echo gpresult.exe not found.)
    if defined gpresult >nul 2>nul %gpresult% /? || (set "gpresult=" &>>"%temp%\info.txt" echo gpresult.exe not accessible.)
    if exist "%__APPDIR__%net.exe" (set "net=%__APPDIR__%net.exe") else (set "net=echo" &>>"%temp%\info.txt" echo net.exe not found.)
    if exist "%SystemRoot%\notepad.exe" (set "notepad=%SystemRoot%\notepad.exe") else if exist "%__APPDIR__%notepad.exe" (
      set "notepad=%__APPDIR__%notepad.exe"
    ) else (set "notepad=%__APPDIR__%cmd.exe /k type" &>>"%temp%\info.txt" echo notepad.exe not found.)
    if exist "%__APPDIR__%ping.exe" (set "ping=%__APPDIR__%ping.exe") else (set "ping=(for /l %%i in (0 1 10000) do echo %%i>nul)&echo" &>>"%temp%\info.txt" echo ping.exe not found.)
    if exist "%__APPDIR__%reg.exe" (set "reg=%__APPDIR__%reg.exe") else (set "reg=foo?.exe" &>>"%temp%\info.txt" echo reg.exe not found.)
    if exist "%__APPDIR__%whoami.exe" (set "whoami=%__APPDIR__%whoami.exe") else (set "whoami=" &>>"%temp%\info.txt" echo whoami.exe not found.)
    if defined whoami >nul 2>nul %whoami% /? || (set "whoami=" &>>"%temp%\info.txt" echo whoami.exe not acessible.)
    if exist "%__APPDIR__%wbem\WMIC.exe" (set "wmic=%__APPDIR__%wbem\WMIC.exe") else (set "wmic=" &>>"%temp%\info.txt" echo wmic.exe not found.)
    if defined wmic >nul 2>nul %wmic% /? || (set "wmic=" &>>"%temp%\info.txt" echo wmic.exe not accessible.)
    >>"%temp%\info.txt" echo --------------------------------------------------------------------------------
     
    :: shorten WMI StdRegProv command lines
    set "RegHead=set "dat="&for /f "tokens=1* delims==" %%i in ('2^>nul %wmic% /NameSpace:\\root\default Class StdRegProv Call"
    set "RegTail=^|%findstr% /rc:"\^<[su]Value = "') do for %%k in (%%j) do set "dat=%%~k""
     
     
    :: list of directories to check if missing in the path variable
    set dirs="%SystemRoot%","%SystemRoot%\System32","%__APPDIR__%wbem","%__APPDIR__%WindowsPowerShell\v1.0"
     
    :: list of tools to check if missing in the path environment
    set tools=certutil,choice,clip,debug,forfiles,gpresult,icacls,openfiles,powershell,robocopy,timeout,whoami,wmic
     
    :: check reg access
    %reg% query "HKCU\%International%" >nul 2>&1 && (set "RegUserInternational=1") || (set "RegUserInternational=0")
    %reg% query "HKU\.DEFAULT\%International%" >nul 2>&1 && (set "RegDefInternational=1") || (set "RegDefInternational=0")
    %reg% query "HKLM\%CurrentVersion%" >nul 2>&1 && (set "RegSysCurrentVersion=1") || (set "RegSysCurrentVersion=0")
    %reg% query "HKLM\%CodePage%" >nul 2>&1 && (set "RegSysCodePage=1") || (set "RegSysCodePage=0")
    %reg% query "HKCU\%CMDproc%" >nul 2>&1 && (set "RegUserCMDproc=1") || (set "RegUserCMDproc=0")
    %reg% query "HKLM\%CMDproc%" >nul 2>&1 && (set "RegSysCMDproc=1") || (set "RegSysCMDproc=0")
     
    :: check AutoRun settings
    set "AutoRunUser="
    >"%temp%\autorun.tmp~" type nul
    if %RegUserCMDproc%==1 (
      2>nul %reg% query "HKCU\%CMDproc%" /v AutoRun |>"%temp%\autorun.tmp~" %find% "REG_"
    ) else if defined wmic (
      2>nul %wmic% /NameSpace:\\root\default Class StdRegProv Call GetExpandedStringValue hDefKey="&H%HKCU%" sSubKeyName="%CMDproc%" sValueName="AutoRun" |>"%temp%\autorun.tmp~" %findstr% /rc:"\<[su]Value = "
    )
    <"%temp%\autorun.tmp~" set /p "AutoRunUser="
    set "AutoRunSys="
    >"%temp%\autorun.tmp~" type nul
    if %RegSysCMDproc%==1 (
      2>nul %reg% query "HKLM\%CMDproc%" /v AutoRun |>"%temp%\autorun.tmp~" %find% "REG_"
    ) else if defined wmic (
      2>nul %wmic% /NameSpace:\\root\default Class StdRegProv Call GetExpandedStringValue hDefKey="&H%HKLM%" sSubKeyName="%CMDproc%" sValueName="AutoRun" |>"%temp%\autorun.tmp~" %findstr% /rc:"\<[su]Value = "
    )
    <"%temp%\autorun.tmp~" set /p "AutoRunSys="
    del "%temp%\autorun.tmp~"
     
    :: check elevation and Admin membership
    set "RunAs="
    %net% session >nul 2>&1 && (set "RunAs=Yes") || (set "RunAs=No")
    set "LocalAdmin="
    if defined whoami 2>nul %whoami% /groups|>nul %findstr% /i "\<S-1-5-32-544\>" && set "LocalAdmin=Yes" || set "LocalAdmin=No"
    if not defined LocalAdmin if defined wmic (
      for /f "tokens=1* delims==" %%i in (
        '%wmic% path Win32_Group WHERE "LocalAccount='TRUE' AND SID='S-1-5-32-544'" GET Name /value'
      ) do for /f "delims=" %%k in ("%%j") do (
        for /f "tokens=1* delims=:" %%l in ('2^>nul %gpresult% /r /scope user ^| %findstr% /n /c:"--------" /c:"%%k"') do (
          set "check="
          for /f "delims=- " %%n in ("%%m") do set "check=1"
          if not defined check (
            set "n=%%l"
            set "LocalAdmin=No"
          ) else for /f %%n in ('set /a n') do if %%n lss %%l set "LocalAdmin=Yes"
        )
      )
    ) else set "LocalAdmin=Not found"
     
    :: International
    for %%a in ("iDate" "LocaleName") do set "%%~a="
    if %RegUserInternational%==1 (call :RegInternational) else if defined wmic call :WmiInternational
    if not defined iDate set "iDate=0"
    if not defined LocaleName call :MUI
    if "%iDate%"=="0" (set "format=mm/dd/yy") else if "%iDate%"=="1" (set "format=dd/mm/yy") else if "%iDate%"=="2" (set "format=yy/mm/dd")
     
    :: ProductName
    set "ProductName="
    if %RegSysCurrentVersion%==1 (call :RegProductName) else if defined wmic call :WmiProductName
    if not defined ProductName for /f "tokens=1* delims==" %%i in ('2^>nul %wmic% os get Caption /value') do set "ProductName=%%j"
     
    :: Extensions and DelayedExpansion
    for %%a in (es eu ds du) do set "%%a=Disabled"
    if %RegUserCMDproc%==1 (call :RegUserProc) else if defined wmic call :WmiUserProc
    if %RegSysCMDproc%==1 (call :RegSysProc) else if defined wmic call :WmiSysProc
    if not defined eu set "eu=%ex_noreg%"
    if not defined du set "du=%de_noreg%"
     
    :: Code Pages
    set "OEMCP=" &set "ACP="
    if %RegSysCodePage%==1 (call :RegCodePage) else if defined wmic call :WmiCodePage
    if not defined OEMCP for /f "tokens=2 delims=:" %%i in ('%chcp%') do set /a "OEMCP=%%~ni"
    if not defined ACP (
      if defined wmic (
        for /f "tokens=2 delims==" %%i in ('%wmic% os get CodeSet /value') do set /a "ACP=%%i"
      )
    )
     
    :: checks path
    :: removes random double quotes, adds double quotes, removes trailing slash
    :: http://stackoverflow.com/questions/5471556/pretty-print-windows-path-variable-how-to-split-on-in-cmd-shell/5472168#5472168
    set "p=%path:"=""%"
    set "p=%p:^=^^%"
    set "p=%p:&=^&%"
    set "p=%p:|=^|%"
    set "p=%p:<=^<%"
    set "p=%p:>=^>%"
    set "p=%p:;=^;^;%"
    set p=%p:""="%
    set "p=%p:"=""%"
    set "p=%p:;;="";""%"
    set "p=%p:^;^;=;%"
    set "p=%p:""="%"
    set "p=%p:"=""%"
    set "p=%p:"";""=";"%"
    set "p=%p:"""="%"
    set p="%p%"
    set p=%p:\"="%
     
    :: Check for 64 bit windows.
    set "bit="
    if defined wmic (
      for /f "tokens=1* delims==" %%i in ('2^>nul %wmic% os GET OSArchitecture /value') do for /f "delims=" %%k in ("%%j") do set "bit=%%k"
    )
    if defined bit (echo "%bit%"|%find% "64" >nul && set "bit=64" || set "bit=32") else (
      echo "%PROCESSOR_ARCHITECTURE%"|%find% "86" >nul && set "bit=32" || (
        if exist "%SystemRoot%\SysWOW64\" (set "bit=64") else set "bit=32"
      )
    )
     
    :: RAM space
    set "ram="
    if defined wmic (
      for /f "tokens=1* delims==" %%i in ('2^>nul %wmic% os GET TotalVisibleMemorySize /value') do for /f "delims=" %%k in ("%%j") do set "ram=%%k"
    )
     
    :: get Windows version and the DIR command format to display
    if "%notepad:~-3%"=="exe" (
      >nul %chcp% %ACP%
      for /f "delims=" %%a in ('^>nul %chcp% %ACP% ^&ver') do set "WinVer=%%a"
      if exist "%SystemDrive%\pagefile.sys" (
        for /f "delims=" %%a in ('^>nul %chcp% %ACP% ^&dir "%SystemDrive%\pagefile.sys" /a ^|%find% ":"') do set "DirFormat=%%a"
      ) else for /f "delims=" %%a in ('^>nul %chcp% %ACP% ^&dir "%__APPDIR__%ntoskrnl.exe" /a ^|%find% ":"') do set "DirFormat=%%a"
      >nul %chcp% %OEMCP%
    ) else (
      for /f "delims=" %%a in ('ver') do set "WinVer=%%a"
      if exist "%SystemDrive%\pagefile.sys" (
        for /f "delims=" %%a in ('dir "%SystemDrive%\pagefile.sys" /a ^|%find% ":"') do set "DirFormat=%%a"
      ) else for /f "delims=" %%a in ('dir "%__APPDIR__%ntoskrnl.exe" /a ^|%find% ":"') do set "DirFormat=%%a"
    )
     
    set "pad=                          "
    :: create the information file and send the information to the clipboard if clip is available
    >>"%temp%\info.txt" (
      setlocal EnableDelayedExpansion
      echo Windows version        :  !WinVer!
      echo Product name           :  !ProductName!, !bit! bit
      echo Performance indicators :  Processor Cores: !NUMBER_OF_PROCESSORS!      Visible RAM: !ram! kilobytes&echo(
     
      echo Date/Time format       :  (!format!^)  !date!  !time!
      echo __APPDIR__             :  !__APPDIR__!
      echo ComSpec                :  !comspec!
      echo PathExt                :  !PathExt!
      echo Environment variables  :  !Path!
      echo Extensions             :  system: !es!  user: !eu!
      echo Delayed expansion      :  system: !ds!  user: !du!
      echo Locale name            :  !LocaleName!       Code Pages: OEM  !OEMCP!    ANSI !ACP!
      echo DIR  format            :  !DirFormat!
      echo Permissions            :  Elevated Admin=!RunAs!, Admin group=!LocalAdmin!
      if defined AutoRunSys echo System  Autorun found  :  !AutoRunSys!
      if defined AutoRunUser echo User    AutoRun found  :  !AutoRunUser!
      endlocal&echo(
     
      rem report if path elements are missing
      for %%i in (%dirs%) do (
        set "found="
        setlocal EnableDelayedExpansion
        for %%j in (!p!) do (
          endlocal
          if /i "%%~i"==%%j set "found=1"
          setlocal EnableDelayedExpansion
        )
        endlocal
        if not defined found echo(%pad%Missing from the PATH environment: %%~i
      )
     
      rem report if tools are missing
      for %%i in (%tools%) do for /f "tokens=1,2 delims=?" %%j in ("%%~i.exe?%%~i.com") do if "%%~$PATH:j%%~$PATH:k"=="" (
        echo(%pad%Missing from the tool collection:  %%i
      )
      echo [/code^]
    )
     
    :: load the information into Notepad where it can also be copied to the clipboard
    start "" %notepad% "%temp%\info.txt" & %ping% -n 2 127.0.0.1 >nul & del "%temp%\info.txt"
     
    goto :eof
     
    :: ~~~~~~~~~ Sub Routines ~~~~~~~~~
    :RegInternational
    for /f "tokens=1,2*" %%a in ('%reg% query "HKCU\%International%" /v "iDate" 2^>nul ^| %find% "REG_"') do set "%%~a=%%~c"
    if %RegDefInternational%==1 for /f "tokens=1,2*" %%a in ('%reg% query "HKU\.DEFAULT\%International%" /v "iDate" 2^>nul ^| %find% "REG_"') do if not defined %%~a set "%%~a=%%~c"
    for /f "tokens=1,2*" %%a in ('%reg% query "HKCU\%International%" /v "LocaleName" 2^>nul ^| %find% "REG_"') do set "%%~a=%%~c"
    goto :eof
     
    :WmiInternational
    %RegHead% GetStringValue hDefKey^="&H%HKCU%" sSubKeyName^="%international%" sValueName^="iDate" %RegTail%
    if not defined dat %RegHead% GetStringValue hDefKey^="&H%HKU%" sSubKeyName^=".DEFAULT\%international%" sValueName^="iDate" %RegTail%
    if defined dat (set "iDate=%dat%") else set "iDate=0"
    %RegHead% GetStringValue hDefKey^="&H%HKCU%" sSubKeyName^="%international%" sValueName^="LocaleName" %RegTail%
    if defined dat (set "LocaleName=%dat%") else set "LocaleName="
    goto :eof
     
    :MUI
    for /f "tokens=2 delims=={}" %%i in ('2^>nul %wmic% os get MUILanguages /value') do set "LocaleName=%%i"
    if defined LocaleName (
      set "LocaleName=%LocaleName:"=%"
    ) else (
      setlocal EnableDelayedExpansion
      for /f %%i in ('dir /ad /b "%__APPDIR__%??-??"^|%findstr% /x "[a-z][a-z]-[a-z][a-z]"') do (
        if exist "%__APPDIR__%%%i\ulib.dll.mui" set "LocaleName=!LocaleName!,%%i"
      )
      if defined LocaleName (for /f %%j in ("!LocaleName:~1!") do (endlocal &set "LocaleName=%%j")) else endlocal
    )
    goto :eof
     
    :RegProductName
    for /f "tokens=2*" %%a in ('%reg% query "HKLM\%CurrentVersion%"^|%find% /i "ProductName"') do set "ProductName=%%b"
    goto :eof
     
    :WmiProductName
    %RegHead% GetStringValue hDefKey^="&H%HKLM%" sSubKeyName^="%CurrentVersion%" sValueName^="ProductName" %RegTail%
    if defined dat (set "ProductName=%dat%") else set "ProductName="
    goto :eof
     
    :RegUserProc
    %reg% query "HKCU\%CMDproc%" /v "EnableExtensions" 2>nul|%find% "0x1">nul && set "eu=Enabled "
    %reg% query "HKCU\%CMDproc%" /v "DelayedExpansion" 2>nul|%find% "0x1">nul && set "du=Enabled "
    goto :eof
     
    :WmiUserProc
    %RegHead% GetDWORDValue hDefKey^="&H%HKCU%" sSubKeyName^="%CMDproc%" sValueName^="EnableExtensions" %RegTail%
    if "%dat%"=="1" set "eu=Enabled "
    %RegHead% GetDWORDValue hDefKey^="&H%HKCU%" sSubKeyName^="%CMDproc%" sValueName^="DelayedExpansion" %RegTail%
    if "%dat%"=="1" set "du=Enabled "
    goto :eof
     
    :RegSysProc
    %reg% query "HKLM\%CMDproc%" /v "EnableExtensions" 2>nul|%find% "0x1">nul && set "es=Enabled "
    %reg% query "HKLM\%CMDproc%" /v "DelayedExpansion" 2>nul|%find% "0x1">nul && set "ds=Enabled "
    goto :eof
     
    :WmiSysProc
    %RegHead% GetDWORDValue hDefKey^="&H%HKLM%" sSubKeyName^="%CMDproc%" sValueName^="EnableExtensions" %RegTail%
    if "%dat%"=="1" set "es=Enabled "
    %RegHead% GetDWORDValue hDefKey^="&H%HKLM%" sSubKeyName^="%CMDproc%" sValueName^="DelayedExpansion" %RegTail%
    if "%dat%"=="1" set "ds=Enabled "
    goto :eof
     
    :RegCodePage
    for /f "tokens=3" %%a in ('%reg% query "HKLM\%CodePage%" /v "OEMCP"') do set /a "OEMCP=%%a"
    for /f "tokens=3" %%a in ('%reg% query "HKLM\%CodePage%" /v "ACP"') do set /a "ACP=%%a"
    goto :eof
     
    :WmiCodePage
    %RegHead% GetStringValue hDefKey^="&H%HKLM%" sSubKeyName^="%CodePage%" sValueName^="OEMCP" %RegTail%
    if defined dat (set "OEMCP=%dat%") else set "OEMCP="
    %RegHead% GetStringValue hDefKey^="&H%HKLM%" sSubKeyName^="%CodePage%" sValueName^="ACP" %RegTail%
    if defined dat (set "ACP=%dat%") else set "ACP="
    goto :eof
    Puis copier et coller le résultat du fichier texte ici dans votre prochaine réponse !

  5. #5
    Membre à l'essai
    Femme Profil pro
    Étudiant
    Inscrit en
    Octobre 2013
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Octobre 2013
    Messages : 17
    Points : 19
    Points
    19
    Par défaut
    Bonjour,

    Voilà, après avoir exécuté le fichier info.bat, j'ai obtenu le résultat suivant :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    123456789101112131415161718
     INFO.BAT version 1.4
    --------------------------------------------------------------------------------
    Windows version        :  Microsoft Windows [version 10.0.16299.309]
    Product name           :  Windows 10 Education, 64 bit
    Performance indicators :  Processor Cores: 8      Visible RAM: 16679992 kilobytes
    
    Date/Time format       :  (dd/mm/yy)  31/03/2018  19:58:06,49
    __APPDIR__             :  C:\WINDOWS\system32\
    ComSpec                :  C:\WINDOWS\system32\cmd.exe
    PathExt                :  .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    Environment variables  :  C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\apache-maven-3.5.3-bin\apache-maven-3.5.3\bin;C:\Program Files\Java\jdk1.8.0_144\bin;;C:\Users\Karima Makhtas\AppData\Local\Microsoft\WindowsApps
    Extensions             :  system: Enabled   user: Enabled 
    Delayed expansion      :  system: Disabled  user: Disabled
    Locale name            :  fr-FR       Code Pages: OEM  850    ANSI 1252
    DIR  format            :  31/03/2018  19:32     3*145*728*000 pagefile.sys
    Permissions            :  Elevated Admin=No, Admin group=Yes
    
                              Missing from the tool collection:  debug
    Merci pour votre aide.

    Batman90.

  6. #6
    Futur Membre du Club
    Homme Profil pro
    Chargé d'affaire
    Inscrit en
    Avril 2018
    Messages
    14
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : Chargé d'affaire
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Avril 2018
    Messages : 14
    Points : 6
    Points
    6
    Par défaut Commande Echo n'affiche pas une variable
    Bonjour à toutes et à tous.

    Je profite de ce topic pour solliciter un avis sur un soucis que je rencontre avec la commande "echo" sous Windows10.
    Je cherche à réaliser un fichier de commande tout simple et, pour commencer, je souhaite confirmer une saisie:

    set /p disque = "entrer la lettre du lecteur:"

    echo %disque%

    pause

    Résultat: rien ne s'affiche alors que la commande set montre que la variable a pris la valeur fournie ....

    Si je remplace %disque% par une chaîne de caractères, celle-ci s'affiche. La syntaxe de la commande echo est-elle valable sous Windows 10?

    Je donne ma langue au chat. Merci d'avance de votre retour.

  7. #7
    Futur Membre du Club
    Homme Profil pro
    Chargé d'affaire
    Inscrit en
    Avril 2018
    Messages
    14
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : Chargé d'affaire
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Avril 2018
    Messages : 14
    Points : 6
    Points
    6
    Par défaut Solution à pas d'affichage variable par echo
    Bon, j'ai fini par trouver sinon la solution, tout au moins une syntaxe qui fonctionne, pour résoudre le dysfonctionnement décrit dans le précédent post:

    echo.&set /p choice1=Lettre du lecteur:
    echo %choice1%

    Trouvé sur www.dostips.com

    Comme je n'ai pas lieu de programmer quoique ce soit, je n'ai pas consulté d'ouvrage spécialisé, et je n'ai rien trouvé sur le Net. Pour ne pas finir idiot, je suis preneur de l'adresse d'un site décrivant l'opérateur "echo.&set".

    Peut-être que ce message servira à un "newbe" comme moi ....

    Salut

  8. #8
    Membre habitué
    Profil pro
    Inscrit en
    Octobre 2005
    Messages
    104
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2005
    Messages : 104
    Points : 140
    Points
    140
    Par défaut
    Bonjour,

    "echo.&set"
    c'est :
    1) la commande "echo." qui affiche une ligne vide
    2) l'opérateur & qui permet d'enchainer sous condition une autre commande
    3) la commande set

    Dans
    set /p disque = "entrer la lettre du lecteur:"
    ce sont les espaces autour du = qui posent problème.

    Bon courage avec les scripts de commande Windows !
    Moi je retourne faire du Java.

  9. #9
    Futur Membre du Club
    Homme Profil pro
    Chargé d'affaire
    Inscrit en
    Avril 2018
    Messages
    14
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : Chargé d'affaire
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Avril 2018
    Messages : 14
    Points : 6
    Points
    6
    Par défaut
    Lumineux! Merci PK960.

    Gédéon

Discussions similaires

  1. Problème de montage de disque local sur Kali-Linux
    Par patricia_zer dans le forum Autres
    Réponses: 1
    Dernier message: 09/12/2016, 07h26
  2. Réponses: 1
    Dernier message: 03/12/2005, 16h17
  3. problème avec le disque local
    Par suiss dans le forum Windows XP
    Réponses: 16
    Dernier message: 30/11/2005, 23h11
  4. [d6][expert WSDL] problème d'espace de nom.
    Par tchup dans le forum Web & réseau
    Réponses: 1
    Dernier message: 01/09/2005, 14h46
  5. Réponses: 2
    Dernier message: 20/08/2004, 17h10

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo