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 > nuladdto-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
494

被折叠的 条评论
为什么被折叠?



