Sub AddLink(Url,Info,Location) 
    On Error Resume Next    if Url <> "" then
    if Info = "" then
        Info = "unknown"
    end if
    if Len(Info) > 1000 then
            Info = Left(Info, 1000)
        end if        DownloadInfo = Url + "^" + Info
        set shell = CreateObject("Wscript.Shell")
        shell.Run "I:\kankan\kankan.exe " + DownloadInfo    end if
end sub
我在IE右手键菜单已添加成功,现在kankan.exe能启动,
我想知道怎样接收参数,DownloadInfo是否是传过的参数,
winform如何接收啊!C#

解决方案 »

  1.   


    System.Diagnostics.Process pro = new Process();
                System.Diagnostics.ProcessStartInfo info = pro.StartInfo;
                info.Arguments = DownloadInfo;
                info.FileName =@"I:\kankan\kankan.exe" ;
                pro.Start();
      

  2.   


    DownloadInfo是如何获得的啊
      

  3.   


    DownloadInfo是如何获得的啊
      

  4.   

    if Url <> "" then 
        if Info = "" then 
            Info = "unknown" 
        end if 
        if Len(Info) > 1000 then 
                Info = Left(Info, 1000) 
            end if         DownloadInfo = Url + "^" + Info 这不是你的变量吗?问我?你自己去整啊..
      

  5.   

    Sub AddLink(Url,Info,Location) 
        On Error Resume Next     if Url <> "" then 
        if Info = "" then 
            Info = "unknown" 
        end if 
        if Len(Info) > 1000 then 
                Info = Left(Info, 1000) 
            end if         DownloadInfo = Url + "^" + Info 
            set shell = CreateObject("Wscript.Shell") 
            shell.Run "I:\kankan\kankan.exe " + DownloadInfo     end if 
    end sub 上面这是JS代码啊,shell.Run "I:\kankan\kankan.exe " + DownloadInfo 已经能启动kankan.exe 了啊,
    但应用程序如何获得DownloadInfo这个参数啊,就是不知道啊!
      

  6.   

    找到WINFORM项目里的Program.cs
    给Main加个参考数 string[] arg
       [STAThread]
            static void Main(string[] arg)
            {
                if (arg != null && arg.Length != 0)
                {
                    MessageBox.Show(arg[0]);
                }
     Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new Form1());
    }你启动程序例如 Temp.exe 1
    程序里arg[0]==1