|
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Jack>"W:\Game_Install_all\Battlefield bad company\Setup.exe"
C:\Users\Jack>"\\192.168.8.198\autoserv\Game_Install_all\Battlefield bad company
\Setup.exe"
C:\Users\Jack>"W:\Game_Install_all\Battlefield bad company\Setup.exe"
C:\Users\Jack>"\\192.168.8.198\autoserv\Game_Install_all\Battlefield bad company
\Setup.exe"
C:\Users\Jack>"W:\Game_Install_all\Battlefield bad company\Setup.exe"
C:\Users\Jack>cd "\\192.168.8.198\autoserv\Game_Install_all\Battlefield bad comp
any"
'\\192.168.8.198\autoserv\Game_Install_all\Battlefield bad company'
CMD does not support UNC paths as current directories.
我用Run和ShellExecute函数对Setup.exe run不起来耶,有没有大神可以帮忙一下啊
代码:
ConsoleWrite(_Battlefield_Installation("\\192.168.8.198\autoserv\Game_Install_all\Battlefield bad company\Setup.exe","\\192.168.8.198\autoserv\Game_Install_all\Battlefield Bad Company_DVD\BFBC2Game.exe"))
Func _Battlefield_Installation($Dir,$patch)
Sleep(2000)
If RegRead("HKLM64\SOFTWARE\Wow6432Node\Electronic Arts\Battlefield Bad Company 2","Install Dir") Or RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\Battlefield Bad Company 2","Install Dir") Then
Return 1
EndIf
ConsoleWrite($Dir&@CRLF&StringTrimRight($Dir,9))
If ShellExecute($Dir,StringTrimRight($Dir,9)) == 0 Then
return 0
EndIf
EndFunc
我在Cmd模式下用C:\Users\Jack>"W:\Game_Install_all\Battlefield bad company\Setup.exe" 又可以运行对应的exe文件。W是值得\\192.168.8.198\autoserv的map盘符。两种方式为什么执行结果不一样??求解~~ |
|