shounei 发表于 2010-9-23 17:09:14

麻烦高手帮我看一下,怎么带参数运行?以下是代码小弟不知道哪里错了!高手指教

#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_outfile=3.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
Global $inipath = @ScriptDir & "\run.dll"
if $Cmdline = "" then
Exit
endif
if $Cmdline = "/A" then
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "Runs", "REG_SZ",@ScriptDir& "\" &"Run.exe /R")
Exit
endif
if $Cmdline = "/D" then
RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "Runs")
endif
If $Cmdline = "/R" Then
If Not FileExists($inipath) Then
MsgBox(4096, "警告", "程序目录未发现配置文件 Run.dll", 10)
Exit
EndIf
Local $HostName
$HostName = StringSplit(IniRead($inipath, "计算机名", "计算列表", ""), ",")
for $i=0 to ubound($HostName)-1
If @ComputerName=$HostName[$i] Then
        $RUN=IniRead($inipath, "计算机名", "程序列表", "")
Run($RUN, "")
EndIf
Next
页: [1]
查看完整版本: 麻烦高手帮我看一下,怎么带参数运行?以下是代码小弟不知道哪里错了!高手指教