regsvr32无法注册@CommonFilesDir目录下的文件
ShellExecute("regsvr32",@CommonFilesDir & "\core.dll")提示
loadlibrary(c:\program")失败 - 找不到指定的模块 有人知道是咋回事么? 两个尝试:
1.
试一下
ShellExecute("regsvr32","""" & @CommonFilesDir & "\core.dll""")
2.
试一下用命令行命令:
run("cmd.exe /c regsvr32 /s """ & @CommonFilesDir & "\core.dll""") 本帖最后由 jscpu 于 2011-2-10 21:31 编辑
回复 3# kevinch
谢谢楼上的 用你的第一个方法
但是要是加参数怎么加呢?
/U 想卸载它,我试了几个位置都不对! 回复 4# jscpu
我是引用3楼的第二种方法
run("cmd.exe /c regsvr32 /u """ & @CommonFilesDir & "\core.dll""")
帮regsvr32后面的/S 改为/U 又一个字符串连接没学好的.
你这个问题是因为路径包含了空格导致的,需要使用引号把路径包括起来.Local $sProgram = "regsvr32.exe"
Local $sParameter = "/s" & " " & '"' & @CommonFilesDir & "\core.dll" & '"'
Local $sCommandLine = $sProgram &" "& $sParameter
MsgBox(4096, "命令行", $sCommandLine)
Run($sCommandLine) 话说回来,看了3楼的""""我才知道原来双引号可以这么用,真晕
页:
[1]