-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostK2Install.cmd
39 lines (28 loc) · 1.27 KB
/
postK2Install.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
REM @echo off
echo Switching service to manual...
:: Stop K2 Service and set to Manual start
set K2SERVER=K2 Server
sc stop "%K2SERVER%"
sc config "%K2SERVER%" start= Demand
echo Creating shortcut for SmartObject Service Tester...
:: Add SmartObject Tester shortcut to taskbar
:: Taken from http://superuser.com/a/455383
set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"
set K2DIR=%ProgramFiles%\K2
echo Set oWS = WScript.CreateObject("WScript.Shell") > %SCRIPT%
echo sLinkFile = "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\SmartObject Service Tester.lnk" >> %SCRIPT%
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
echo oLink.TargetPath = "%K2DIR%\Bin\SmartObject Service Tester.exe" >> %SCRIPT%
echo oLink.Save >> %SCRIPT%
cscript /nologo %SCRIPT%
echo Creating favorite in Explorer for K2 blackpearl folder...
:: Add K2 install directory to Explorer favorites
echo Set oWS = WScript.CreateObject("WScript.Shell") > %SCRIPT%
echo sLinkFile = "%USERPROFILE%\Links\K2 blackpearl.lnk" >> %SCRIPT%
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
echo oLink.TargetPath = "%K2DIR%" >> %SCRIPT%
echo oLink.Save >> %SCRIPT%
cscript /nologo %SCRIPT%
del %SCRIPT%
echo Please log off and back on to update shortcuts in the taskbar.
pause