*ALWAYS UNDER CONSTRUCTION*

Cmd 자동실행 파일 만들기

created:

♟필요성

이전 글인 🏷리눅스 cat 명령어 구현하기 글만 봐도 cmd를 실행할 때 파일을 여는 것은 필요해 보입니다.
아니면 아래처럼 cmd의 시작 경로를 설정할 때도 쓰일 수 있죠.

> cd C:\Users

또한 여태 제 글에 나오턴 아래와 같은 모습을 한 터미널 또한 자동 실행파일로 구현한 것입니다.

[C:\Users\username] (12:00:00.00) (C)
~$

(대충 이런느낌) {:.small}

💎설치(?)

터미널에 다음 명령어 2개를 실행시킵니다.

> reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun ^ /t REG_EXPAND_SZ /d "C:\init.cmd" /f
> echo @echo off > C:\init.cmd

C: 드라이버로 가서 init.cmd를 열어줍니다. 아래와 같이 적어주면 됩니다.

{% include code title=‘C:\init.cmd’ %}

@echo off

;명령어

;다 지우기
cls
;기능 작동 확인 출력
@echo on
@echo Activate custom command.
@echo off

이제 명령어를 ;명령어아래에 추가해주면 됩니다.

여기에 추가할 명령어는 다음글에서 다루도록 하겠습니다.

🎞마무리

이상으로 {{ page.title }} 포스팅을 마치겠습니다.

Webmentions[0]

    Q. Why isn't my webmention not appearing?

    A. I deploy this site not so often and this site is static site. So don't expect your webmention to appear instantly. Thanks for the webmention and sorry for the inconvenience.
    last deployed: see footer