WshShell.Run 不能运行快捷方式了set WshShell = WScript.CreateObject("WScript.Shell") 
WshShell.Run "c:\a.lnk",1 
WSHom.Ocx 已经注册过了..... 以下的也不行....怎么回事啊.... Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long 
Private Const SW_HIDE = 0 
Private Const SW_NORMAL = 1 
Private Const SW_MAX = 10 
Private Const SW_SHOWMAXIMIZED = 3 
Private Const SW_SHOWMINIMIZED = 2 
Private Const SW_SHOWDEFAULT = 10 
Private Sub Command1_Click() 
    ShellExecute Me.hwnd, "open", "C:\a.lnk", vbNullString, vbNullString, 1 End Sub 

解决方案 »

  1.   

    Set WshShell = CreateObject("Wscript.Shell")
    WshShell.Run "c:\a.lnk",1 
      

  2.   


    哦........我的错....
    Set WshShell = CreateObject("Wscript.Shell")
    WshShell.Run "c:\a.lnk",1 这样照样不行的.......
      

  3.   

    还有....ShellExecute Me.hwnd, "open", "C:\a.lnk", vbNullString, vbNullString, 1 
    应该是
    ShellExecute Me.hwnd, vbNullString, "C:\a.lnk", vbNullString, vbNullString, 1 汗......不知道怎么搞的.....WScript.Shell  和  ShellExecute  都不能运行快捷方式了.....奇了大怪了!!!!