Skip to content

Instantly share code, notes, and snippets.

@hidekuro
Created May 23, 2013 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hidekuro/5632601 to your computer and use it in GitHub Desktop.
Save hidekuro/5632601 to your computer and use it in GitHub Desktop.
実行したユーザの環境において、%UserProfile%直下にautorun.cmdが あれば、コマンドプロンプトの起動時に実行するようにするレジストリ登録のワンライナー。 http://goo.gl/V7QrQ
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor" /v AutoRun /d "@ECHO OFF & IF EXIST \"%HOMEDRIVE%%HOMEPATH%\autorun.cmd\" \"%HOMEDRIVE%%HOMEPATH%\autorun.cmd\" & ECHO ON"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment