クライアントへインストール用のスクリプトを追加
This commit is contained in:
parent
5653b79906
commit
5a1ac0e3c1
2 changed files with 28 additions and 0 deletions
20
script/setup.cmd
Normal file
20
script/setup.cmd
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
@echo off
|
||||||
|
set dir=%~dp0
|
||||||
|
cd %dir%
|
||||||
|
schtasks /create /tn "Dislocker_Client" /tr "%dir%dislocker_client.exe" /sc onlogon /ru "%USERNAME%" /rl highest /f
|
||||||
|
if %ERRORLEVEL% == 0 (
|
||||||
|
echo タスクスケジューラーの設定は完了しました。
|
||||||
|
)
|
||||||
|
if %ERRORLEVEL% == 1 (
|
||||||
|
echo タスクスケジューラーの設定でエラーが発生しました。
|
||||||
|
)
|
||||||
|
Cscript "%dir%shortcut.vbs" "%dir%" "dislocker_client.exe" "stop" "%USERNAME%"
|
||||||
|
if %ERRORLEVEL% == 0 (
|
||||||
|
echo ショートカットの作成は完了しました。
|
||||||
|
)
|
||||||
|
if %ERRORLEVEL% == 1 (
|
||||||
|
echo ショートカットの作成でエラーが発生しました。
|
||||||
|
)
|
||||||
|
set /P pc_number=PC番号を入力
|
||||||
|
start %dir%dislocker_client.exe setup %pc_number%
|
||||||
|
pause
|
8
script/shortcut.vbs
Normal file
8
script/shortcut.vbs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
Set WshShell = CreateObject("WScript.Shell")
|
||||||
|
Set args = Wscript.Arguments
|
||||||
|
Set Shortcut = WshShell.CreateShortcut(args(0) & "\シャットダウンと終了処理.lnk")
|
||||||
|
Shortcut.TargetPath = args(0) & args(1)
|
||||||
|
Shortcut.Arguments = args(2)
|
||||||
|
Shortcut.WorkingDirectory = args(0)
|
||||||
|
Shortcut.Save
|
||||||
|
WScript.Quit(0)
|
Loading…
Reference in a new issue