tfsサーバーに接続しようとしています。これをスケジューラーで実行する必要があるため、ユーザー名とパスワードを入力する必要があります。
ご覧のように。tfspreviewバージョンを使用します。ユーザー名(LIVE ID mailadres)とパスワード付き。
パスワードを削除したとき。できます。キャッシュ内のユーザー名とパスワード?ローカルappdataのキャッシュを削除しました!
パスワードで試してみると。次のエラーが発生します。
TF30064: You are not authorized to access the server.
使用するコード。
REM @echo off
REM ... Change the path below. This is the path where the code will be downloaded!
REM Z:
REM cd Backup_TFS_Preview
REM call %VS100COMNTOOLS%\..\..\VC\vcvarsall.bat x86
REM ... Navigate to folder
Z:
cd Backup_TFS_Preview
REM ... Makes folder with date today
mkdir %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4%
REM ... Navigate to folder
cd %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4%
REM ... Add workspace for the folder with date of today
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf" workspace /login:username(LiveID mail adres),password /new /server:https://*.tfspreview.com/DefaultCollection %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4% /noprompt
REM ... Get all items from TFS
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf" get /recursive /all /noprompt
REM ... Navigate to folder
cd ..
REM ... Zip the folder
C:\TFS_Backup_Scripts\7z.exe a %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4%.zip %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4%\
REM ... Remove folder
rmdir %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4%\ /s /q
REM ... Delete workspace
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf" workspace /delete %Date:~-10,2%-%Date:~-7,2%-%Date:~-4,4% /noprompt
REM ... Navigate to folder
cd ..
cd ..
REM ... Delete zip files that are older then 10 days
forfiles -p "Z:\Backup_TFS_Preview" -s -m *.* -d -10 -c "cmd /c del /q @path"
PAUSE