各ユーザー プロファイルのフォルダーを削除するバッチ ファイルを作成しようとしています。しかし、バッチ ファイルを実行すると、「Y/N を削除してもよろしいですか。ユーザーの操作なしでこのファイルを実行する必要があるため、それを回避する方法はありますか?」というメッセージが表示されます。自動的に Y と答えるか、CMD ウィンドウを完全に非表示にする方法はありますか?
これは私がこれまでに持っているものです:
@echo off
REM This will hide the CMD window while the processes are running
REM Input code here to hide CMD window
REM A message to ask the user to save their Outlook emails they have open
mshta javascript:alert("Please be sure to save any emails that you need in Outlook. Click OK to continue.");close();
REM This will stop DM, Email Marker, Email Filer, Interceptor, Papihost, and Outlook.
taskkill /IM DM.exe /F
taskkill /IM DMMarkEmail.exe /F
taskkill /IM EmailAutoBulkFiling.exe /F
taskkill /IM Interceptor.exe /F
taskkill /IM OUTLOOK.EXE /F
taskkill /IM PAPIHost.exe /F
REM This will delete the DM cache in Appdata under the current user
RMDIR /s "%userprofile%\Appdata\Roaming\OpenText\DM\Cache"
REM This will start all of the programs that were closed
REM START DM.exe
REM Commenting the Marker and Filer since some users don't want it
REM START DMMarkemail.exe
REM START Email AutoBulkFiling.exe
REM START Interceptor.exe
REM START OUTLOOK.EXE
REM START PAPIHost.exe
@echo off
フィードバックをお寄せいただきありがとうございます。
*編集、私は C: を取り出しました。うまくいきました。David Candy に感謝します。