快捷导航
搜索
查看: 2469|回复: 0

打开两套McPOS脚本代码, Only/限制1 Mcpos task bat

[复制链接]

89

主题

96

帖子

1724

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1724
发表于 2019-6-14 15:09:15 | 显示全部楼层 |阅读模式
  • 到 [C:\mis\mcpos]  -> mcpos.exe -> creat shortcut
  • 到 [C:\mis\] creat new [mcpos.bat] then input the code :


    1. @echo off

    2. TASKLIST|FIND "mcpos.exe"
    3. IF %ERRORLEVEL% equ 0 (GOTO kill)
    4. rem TIMEOUT /T 1
    5. cls
    6. Start "" "C:\mis\mcpos\mcpos - Shortcut" (shortcut address maybe different)

    7. :kill
    复制代码

    1. @echo off

    2. :kill
    3. taskkill /im mcpos.exe /F

    4. TASKLIST|FIND "mcpos.exe"
    5. IF %ERRORLEVEL% equ 0 (GOTO kill)
    6. rem TIMEOUT /T 1
    7. cls
    8. Start "" "C:\mis\mcpos\mcpos - Shortcut"  (shortcut address maybe different)
    复制代码

    creat shortcut for [mcpos.bat] to desptop, and change the icon in [C:\mis\mcpos\MCPos.ico]



      打开两套McPOS脚本代码, 2 mcpos for pad order(copy another mcpos files first)
  1. @echo off

  2. :kill
  3. taskkill /im mcpos.exe /F

  4. TASKLIST|FIND "mcpos.exe"
  5. IF %ERRORLEVEL% equ 0 (GOTO kill)
  6. rem TIMEOUT /T 1

  7. CLS
  8. Start /MIN "" "C:\mis\mcpos ooh\mcpos - Shortcut"
  9. TIMEOUT /T 1
  10. Start /MAX "" "C:\mis\mcpos\mcpos - Shortcut"
复制代码


只停掉对应文件路径的mcpos.exe, 并重新启动
代码: 将名称改为具体真实的mcpos.exe文件/路径即可

  1. @echo off
  2. for /f "skip=1 tokens=1" %%a in (
  3.     'wmic process where "name='mcpos.exe' and ExecutablePath like '%%ooh%%'" get ProcessID'
  4. ) do (
  5.     if not defined PID set "PID=%%a"
  6. )


  7. taskkill /PID %PID% /F


  8. Start /MIN "" "C:\mis\mcpos ooh\mcpos - Shortcut"
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|ADS

GMT-6, 2025-5-11 08:31 , Processed in 0.075087 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表