당신은 REG 명령을 사용할 수 있습니다 참조하십시오. http://www.ss64.com/nt/reg.html에서 :

    REG QUERY [ROOT\]RegKey /v ValueName [/s] 
    REG QUERY [ROOT\]RegKey /ve --This returns the (default) value 

    REG ADD [ROOT\]RegKey /v ValueName [/t DataType] [/S Separator] [/d Data] [/f] 
    REG ADD [ROOT\]RegKey /ve [/d Data] [/f] -- Set the (default) value 

    REG DELETE [ROOT\]RegKey /v ValueName [/f] 
    REG DELETE [ROOT\]RegKey /ve [/f] -- Remove the (default) value 
    REG DELETE [ROOT\]RegKey /va [/f] -- Delete all values under this key 

    REG COPY [\\SourceMachine\][ROOT\]RegKey [\\DestMachine\][ROOT\]RegKey 

    REG EXPORT [ROOT\]RegKey FileName.reg 
    REG IMPORT FileName.reg 
    REG SAVE [ROOT\]RegKey FileName.hiv 
    REG RESTORE \\MachineName\[ROOT]\KeyName FileName.hiv 

    REG LOAD FileName KeyName 
    REG UNLOAD KeyName 

    REG COMPARE [ROOT\]RegKey [ROOT\]RegKey [/v ValueName] [Output] [/s] 
    REG COMPARE [ROOT\]RegKey [ROOT\]RegKey [/ve] [Output] [/s] 

Key: 
    ROOT : 
     HKLM = HKey_Local_machine (default) 
     HKCU = HKey_current_user 
     HKU = HKey_users 
     HKCR = HKey_classes_root 

    ValueName : The value, under the selected RegKey, to edit. 
       (default is all keys and values) 

    /d Data : The actual data to store as a "String", integer etc 

    /f  : Force an update without prompting "Value exists, overwrite Y/N" 

    \\Machine : Name of remote machine - omitting defaults to current machine. 
       Only HKLM and HKU are available on remote machines. 

    FileName : The filename to save or restore a registry hive. 

    KeyName : A key name to load a hive file into. (Creating a new key) 

    /S  : Query all subkeys and values. 

    /S Separator : Character to use as the separator in REG_MULTI_SZ values 
        the default is "\0" 

    /t DataType : REG_SZ (default) | REG_DWORD | REG_EXPAND_SZ | REG_MULTI_SZ 

    Output : /od (only differences) /os (only matches) /oa (all) /on (no output) 

Echo Checking SCCM CLIENT

if exist "C:\Windows\SysWOW64\CCM" goto End
if not exist %C:\Windows\SysWOW64\CCM" go to Install

:End
cls
exit

:Install
Start C:\sccm\ccmsetup.exe

pause


http://basickey.tistory.com/3


http://upfactory.tistory.com/268


http://mwultong.blogspot.com/2006/11/dos-if-else-bat.html



@echo off

setlocal


set foo=test.txt




::(1번 예제)::::::::::::::::::::::::::::::::::::::::::::


if exist %foo% (

  echo %foo% 라는 파일이 존재하는군요

) else (

  echo %foo% 라는 파일이 없군요

)




::(2번 예제)::::::::::::::::::::::::::::::::::::::::::::


if exist %foo% echo %foo% 라는 파일이 존재하는군요

if not exist %foo% echo %foo% 라는 파일이 없군요



'CMD BAT 인스톨' 카테고리의 다른 글

DOS(cmd) 명령 결과값 변수 저장후 재 이용  (0) 2018.11.10
bat 명령어  (0) 2018.11.08
Acad 레지값  (1) 2018.11.04
레지수정방법  (5) 2018.11.04
cmd 명령어  (0) 2018.11.04