今天在YouTube看到一个不错的影片,可以直接在浏览器执行CMD
我照上面的方法更改登录编辑程序,并用python写了一个同样效果的。
使用系统管理员 - cmd
cd cmd-protocol xcopy protocol.exe C:\Windows\system32\protocol.exe
- [x] 无法使用参数
- [ ] 无法输入中文字
- [x] 无法使用\符号(有用到目录的无法使用,将尽快修正)
- [x] 无法使用|和-的错误
import sys
import os
URL = sys.argv[1]
commands = URL.split('//')
command_tmp = commands[1]
t22 = command_tmp[len(command_tmp) - 1]
if t22 == "/":
command_tmp2 = command_tmp[:-1]
else:
command_tmp2 = command_tmp
command = command_tmp2.replace('%20', ' ').replace('%5C', '\\').replace('%7C', '|').replace('-/', '-').replace('%25', '%')
print(" URL = " + URL)
print(" command = " + command)
a = 1
while a == 1:
start = input("Are you sure you want to execute[Y/N]")
if start=="Y":
if URL=="cmd:///":
os.system("cmd")
exit()
os.system("cmd /c " + command)
exit()
if start=="y":
if URL=="cmd:///":
os.system("cmd")
exit()
os.system("cmd /c " + command)
exit()
elif start=="N":
exit()
elif start=="n":
exit()
else:
print("Wrong input")
<<: [如何关掉TP-Link WR841N的Beacon]
>>: [python] TFT Display测试心得碎念(拿st7735的经验拯救ili9341)
延续前一天的程序码,首先先把图片里的程序码搬到箭头的地方,固定前面放函数後面放程序,这样看起来比较清...
「糟了!我还没有看信箱!」顶着一头蓬松乱发的诗忆匆匆的掀开被子,迅速且小心翼翼地沿着旁边的梯子往下攀...
写在前面 still placeholder still placeholder still pla...
某人可能会迟到,但从不缺席 (没x 失踪很久了好吗== 故事原点 在正式参加铁人赛之前,我从不知道...
原始题目 Assume you are an awesome parent and want to ...