求助Command()传递参数?
"C:\Documents and Settings\cs\桌面\工程1.exe" 'Prince of Persia.lnk' 'E:\Prince of Persia\Prince of Persia.exe'带空格的参数如何传递???
Private Sub Form_Load()
On Error GoTo errhandle:
Dim strLine() As String, i As Integer
strLine = Split(Command(), " ")
For i = 0 To UBound(strLine)
Text1.Text = strLine(0)
Text2.Text = strLine(1)
Next
Set WshShell = CreateObject("Wscript.shell")
Path = "C:\Documents and Settings\All Users\「开始」菜单\"
Set oMyShortcut = WshShell.CreateShortcut(Path & Text1.Text)
'此处为快捷名称,你可以修改路径
oMyShortcut.TargetPath = Text2.Text '此处为源文件
oMyShortcut.Save
Set WshShell = CreateObject("Wscript.shell")
Path = "C:\Documents and Settings\All Users\桌面\"
Set oMyShortcut = WshShell.CreateShortcut(Path & Text1.Text)
'此处为快捷名称,你可以修改路径
oMyShortcut.TargetPath = Text2.Text '此处为源文件
oMyShortcut.Save
Shell Text2.Text
errhandle:
MsgBox "错误"
End Sub