﻿@echo off & setlocal enabledelayedexpansion
  ::ipconfig>ip.txt
  
   
netstat -aon |findstr 8084>pid.txt
      
     for /f "delims=" %%a in (pid.txt) do (
         
      for /f "tokens=1* delims=:" %%i in ('call echo %%a^|find /i "TCP"') do (
         echo %%a
     ::��ȡ�����ݹ��˺�,д����һ�����±���
     rem Echo %%a>>"text.txt"
        ) 
    )
rem ��ȡ�ļ�������
set /P OEM=<pid.txt
  
rem ��ȡ�ļ��е��ַ���
  
echo  %OEM:~71,76%
  
taskkill /f /pid %OEM:~71,76%

@echo off
       cd C:\server\risk\gateway-service
       if not exist C:\server\risk\backup\gateway md C:\server\risk\backup\gateway
       if exist "C:\server\risk\gateway-service\com-crm-gateway-1.0.0.jar" (
	copy "C:\server\risk\gateway-service\com-crm-gateway-1.0.0.jar" "C:\server\risk\backup\gateway\com-crm-gateway-1.0.0-%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%.jar"
	del "C:\server\risk\gateway-service\com-crm-gateway-1.0.0.jar"
) 
       cd "C:\Users\Administrator\crm\crm-gateway"
       c:
       copy "C:\Users\Administrator\crm\crm-gateway\com-crm-gateway-1.0.0.jar" "C:\server\risk\gateway-service\com-crm-gateway-1.0.0.jar"
       cd C:\server\risk\gateway-service
       title crm-gateway
        javaw -Xmx1024m  -Dloader.path=dependency -jar com-crm-gateway-1.0.0.jar --spring.profiles.active=prod
       echo good bye