Created
June 27, 2013 07:50
-
-
Save t2psyto/5874687 to your computer and use it in GitHub Desktop.
一時的にフォルダリダイレクトをする。リダイレクト先を設定してexplorerを再起動。explorerが起動できたら、リダイレクト先を元に戻しておく。
リダイレクト先を記録するレジストリ項目はexplorerが起動するときに読み込まれる。それ以外のタイミングで変更しても次のexplorer再起動時まで影響しない。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| taskkill /F /IM explorer.exe | |
| set remotehome=\\server\profile\username | |
| reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /d "%remotehome%\Documents" /f | |
| reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Desktop" /d "%remotehome%\Desktop" /f | |
| start explorer | |
| sleep 1 | |
| reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /d "%USERPROFILE%\Documents" /f | |
| reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Desktop" /d "%USERPROFILE%\Desktop" /f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment