zoukankan      html  css  js  c++  java
  • DOS CHOICE命令

    :begin
    @echo off
    echo 请选择
    echo -------------------------------
    echo 1.清空目录
    echo 2.复制文件
    echo 3.安装服务
    echo 4.卸载服务
    echo 5.打开工作目录
    echo 6.打开服务列表
    echo 7.一键安装后退出
    echo 8.返回主菜单
    echo 9.退出
    echo -------------------------------
    CHOICE /c 123456789 /M "请选择"
    if errorlevel 9 goto Back
    if errorlevel 8 goto begin
    if errorlevel 7 goto ClickOnce
    if errorlevel 6 goto OpenService
    if errorlevel 5 goto OpenFolders
    if errorlevel 4 goto UninstallService
    if errorlevel 3 goto InstallService
    if errorlevel 2 goto CopyFile
    if errorlevel 1 goto ClearFolder
    :ClickOnce
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /u "D:\Release\Beisen.Recruit.Synchronize.ProcessService\Beisen.Recruit.Synchronize.ProcessService.exe"
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /u "D:\Release\Beisen.Recruit.Synchronize.ReceiveService\Beisen.Recruit.Synchronize.ReceiveService.exe"
    
    del D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary\*.dll /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.ReceiveService\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.SynchronizeService\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.PortalTaskExecuter\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.AddTaskExecuter\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.First\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.Normal\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.First\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.Normal\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.PortalTaskExecuter\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.AddTaskExecuter\bin\Debug\*.pdb /q
    
    del D:\Release\Beisen.Recruit.Synchronize.ReceiveService\*.* /q
    del D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary\*.* /q
    del D:\Release\Beisen.Recruit.Synchronize.ProcessService\*.* /q
    del D:\Release\Beisen.Recruit.Synchronize.ProcessService\db\*.* /q
    
    md D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.First\bin\Debug\*.dll D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.Normal\bin\Debug\*.dll D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.PortalTaskExecuter\bin\Debug\*.dll D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.AddTaskExecuter\bin\Debug\*.dll D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.ReceiveService\bin\Debug\*.* D:\Release\Beisen.Recruit.Synchronize.ReceiveService /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.ReceiveService\bin\Debug\TaskLibrary\*.* D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.SynchronizeService\bin\Debug\*.* D:\Release\Beisen.Recruit.Synchronize.ProcessService /y
    md D:\Release\Beisen.Recruit.Synchronize.ProcessService\db
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.SynchronizeService\bin\Debug\db\*.* D:\Release\Beisen.Recruit.Synchronize.ProcessService\db /y
    
    start C:\Sync
    start services.msc
    exit
    
    :OpenService
    start C:\Sync
    start services.msc
    goto begin
    :ClearFolder
    del C:\beisen.logfiles\Beisen.Recruit.Synchronize.ProcessService\*.* /q
    del C:\beisen.logfiles\Beisen.Recruit.Synchronize.ReceiveService\*.* /q
    
    del D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary\*.dll /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.ReceiveService\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.SynchronizeService\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.PortalTaskExecuter\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.AddTaskExecuter\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.First\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.Normal\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.First\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.Normal\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.PortalTaskExecuter\bin\Debug\*.pdb /q
    del D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.AddTaskExecuter\bin\Debug\*.pdb /q
    
    del D:\Release\Beisen.Recruit.Synchronize.ReceiveService\*.* /q
    del D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary\*.* /q
    del D:\Release\Beisen.Recruit.Synchronize.ProcessService\*.* /q
    del D:\Release\Beisen.Recruit.Synchronize.ProcessService\db\*.* /q
    
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "D:\Release\Beisen.Recruit.Synchronize.ProcessService\Beisen.Recruit.Synchronize.ProcessService.exe"
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "D:\Release\Beisen.Recruit.Synchronize.ReceiveService\Beisen.Recruit.Synchronize.ReceiveService.exe"
    
    goto begin
    :CopyFile
    md D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.First\bin\Debug\*.dll D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Synchronize.ChannelTaskExecuter.Normal\bin\Debug\*.dll D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.PortalTaskExecuter\bin\Debug\*.dll D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.AddTaskExecuter\bin\Debug\*.dll D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.ReceiveService\bin\Debug\*.* D:\Release\Beisen.Recruit.Synchronize.ReceiveService /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.Synchronize.ReceiveService\bin\Debug\TaskLibrary\*.* D:\Release\Beisen.Recruit.Synchronize.ReceiveService\TaskLibrary /y
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.SynchronizeService\bin\Debug\*.* D:\Release\Beisen.Recruit.Synchronize.ProcessService /y
    md D:\Release\Beisen.Recruit.Synchronize.ProcessService\db
    copy D:\tfs_source_20100609\Public\Recruiting\Beisen.Recruit.Synchronize\Beisen.Recruit.SynchronizeService\bin\Debug\db\*.* D:\Release\Beisen.Recruit.Synchronize.ProcessService\db /y
    goto begin
    :InstallService
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "D:\Release\Beisen.Recruit.Synchronize.ProcessService\Beisen.Recruit.Synchronize.ProcessService.exe"
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "D:\Release\Beisen.Recruit.Synchronize.ReceiveService\Beisen.Recruit.Synchronize.ReceiveService.exe"
    goto begin
    
    :UninstallService
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /u "D:\Release\Beisen.Recruit.Synchronize.ProcessService\Beisen.Recruit.Synchronize.ProcessService.exe"
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /u "D:\Release\Beisen.Recruit.Synchronize.ReceiveService\Beisen.Recruit.Synchronize.ReceiveService.exe"
    goto begin
    
    :OpenFolders
    start D:\Release\Beisen.Recruit.Synchronize.ReceiveService
    start D:\Release\Beisen.Recruit.Synchronize.ProcessService
    goto begin
    
    :Back
    echo Goodbye
  • 相关阅读:
    自己动手丰衣足食之轮播图一动态修改marginTop属性实现轮播图
    自己动手丰衣足食之 jQuery 数量加减插件
    Asp.net 中,在服务端向客户端写脚本的常用方法
    Asp.Net使用加密cookie代替session验证用户登录状态 源码分享
    Javascript技术之详尽解析event对象
    Javascript的V8引擎研究
    11个实用的CSS学习工具[转载收藏]
    为什么JavaScript声明变量的时候鼓励加var关键字
    asp.net菜鸟到中级程序员的飞跃 --30本好书点评
    创建安全的ashx文件,ashx编译
  • 原文地址:https://www.cnblogs.com/kkun/p/1804052.html
Copyright © 2011-2022 走看看