Python通过ctypes调用windows api函数ShellExecute,ctypesshellexecute,[Python]代码#!


[Python]代码

#!c:/python27/python.exe#-*- coding:utf-8 -*-"执行程序"import ctypes;handler = None;operator = "open";fpath = r"D:\Program Files\TTPlayer\TTPlayer.exe";param = None;dirpath = None;ncmd = 1;shell32 = ctypes.windll.LoadLibrary("shell32.dll");shell32.ShellExecuteA(handler,operator,fpath,param,dirpath,ncmd);

评论关闭