install.bat

install.bat

@ECHO OFF
@color 0a
echo. 
echo. ------------------------------------------------------
echo.
echo.     start install Teleframe service...
echo.
echo. ------------------------------------------------------
echo.
set dest=D:\Program Files\Teleframe
echo.
echo. %0
echo. %~dp0
echo. DEST : %dest%
goto Init 

:Init
echo.
echo. Initing ... to  %dest%
echo. 
pushd %~dp0

:: copy files
xcopy /E /K /Y Teleframe  "%dest%\"

copy /Y "Teleframe\vlpr\install-vlpr.bat"  "%dest%\vlpr\install-vlpr.bat"
copy /Y "Teleframe\vlpr\addto-startup.vbs"  "%dest%\vlpr\addto-startup.vbs"
echo.
echo. Copy File Finish
echo.
rem  Call install-vlpr.bat
pushd "%dest%\vlpr\"
install-vlpr.bat

:end 
echo. Finish 
install-vlpr.bat

@echo off
color 0a
echo. 
echo. ------------------------------------------------------
echo.
echo.     Start Install Teleframe Service VLPR...
echo.
echo. ------------------------------------------------------
echo.
echo.  Installing ...
rem wait 3 minites
ping 127.0.0.1 -n 3 > nul
goto main

:main
goto installDatabase

:installDatabase
rem Install Database 安装数据库
echo.
echo. Installing Database ...
echo.
set DB_DIR=webapp\database\bin\mysqld.exe

:installWebServer
rem 安装web服务器
echo.
echo. Installing WebServer ...
echo.
echo. Addto-Startup
"%SystemRoot%\System32\WScript.exe"  addto-startup.vbs  车辆分析系统WEB服务 "\webapp\tomcat\bin"  "\startup.bat"
echo.


:installMServer
echo.
echo. Installing MServer ... %~dp0
echo.
echo. Addto-Startup
"%SystemRoot%\System32\WScript.exe"  addto-startup.vbs  车辆分析系统服务 "\m-server" "\tfVLPRClone.exe"
echo.
echo. Create Shortcut 
if exist tmp.vbs del /f /s /q tmp.vbs 
call setclasspath.bat
echo 当前桌面路径是: %DESKTOP%  >nul
set shortCutPath="%DESKTOP%\车辆分析系统服务.lnk" 
echo Dim WshShell,Shortcut>>tmp.vbs 
echo Dim path,fso>>tmp.vbs 
echo path="%~dp0m-server\tfVLPRClone.exe">>tmp.vbs 
echo Set fso=CreateObject("Scripting.FileSystemObject")>>tmp.vbs 
echo Set WshShell=WScript.CreateObject("WScript.Shell")>>tmp.vbs 
echo Set Shortcut=WshShell.CreateShortCut(%shortCutPath%)>>tmp.vbs 
echo Shortcut.TargetPath=path>>tmp.vbs 
echo Shortcut.WorkingDirectory="%~dp0m-server\">>tmp.vbs
echo Shortcut.Save>>tmp.vbs 
"%SystemRoot%\System32\WScript.exe" tmp.vbs 
@del /f /s /q tmp.vbs   >nul

:installMClient
echo.
echo. Installing MClient ...
echo. Create Shortcut 
if exist tmp.vbs del /f /s /q tmp.vbs 
call setclasspath.bat
echo 当前桌面路径是: %DESKTOP%  >nul
set shortCutPath="%DESKTOP%\车辆分析系统客户端.lnk" 
echo Dim WshShell,Shortcut>>tmp.vbs 
echo Dim path,fso>>tmp.vbs 
echo path="%~dp0m-client\LprCS.exe">>tmp.vbs 
echo Set fso=CreateObject("Scripting.FileSystemObject")>>tmp.vbs 
echo Set WshShell=WScript.CreateObject("WScript.Shell")>>tmp.vbs 
echo Set Shortcut=WshShell.CreateShortCut(%shortCutPath%)>>tmp.vbs 
echo Shortcut.TargetPath=path>>tmp.vbs 
echo Shortcut.WorkingDirectory="%~dp0m-client\">>tmp.vbs
echo Shortcut.Save>>tmp.vbs 
"%SystemRoot%\System32\WScript.exe" tmp.vbs 
@del /f /s /q tmp.vbs  >nul

:end
echo.
echo. 安装完成
echo.
pause > nul

addto-startup.vbs

Set WshShell = WScript.CreateObject("WScript.Shell")
strStartup = WshShell.SpecialFolders("allusersStartup")

Set oShellLink = WshShell.CreateShortcut(strStartup & "\" & wscript.arguments(0) & ".lnk")
oShellLink.TargetPath = WshShell.CurrentDirectory & wscript.arguments(1) & wscript.arguments(2)
oShellLink.Arguments = ""
oShellLink.WindowStyle = 7
oShellLink.Description = wscript.arguments(0)
oShellLink.WorkingDirectory = WshShell.CurrentDirectory & wscript.arguments(1)
oShellLink.Save
setenvironment.bat

@echo off
for /f "tokens=2,*" %%i in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Desktop"') do Set _da=%%j
set DESKTOP=%_da%
::echo. 当前桌面路径是: %DESKTOP%
::pause

rem 下面是修改桌面路径
set "a=D:\桌面"
::reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Desktop" /t REG_SZ /d %a%
::pause






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值