将参数传递给.exe [英] Pass a Parameter to an .exe

查看:70
本文介绍了将参数传递给.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过URL或链接或脚本或任何其他方式将参数传递给可执行文件。


.exe是:\\CL001 \ Martart \ OP2 \Test1.exe


参数是:''\\CL001\mart\op2 \Test''

URL中的直接类型有效:


\\CL001\Mart\OP2 \Test1.exe / p''\\CL001 \ mart\op2 \Test''

但是,如果我输入(\\CL001\Mart\OP2\Test1.exe / p''\\CL001 \\\\\\\\\\\\\\\一个URL的链接,然后是file:\\前缀放在之前,找不到文件错误。

这会打开应用程序,但参数未正确传递:

< A HREF =" \\CL001\Mart\OP2 \Test1.exe?''p = \\CL001 \ mart\o p2 \Test''''"> ;< / A>

我尝试了各种javascripts和操作但没有成功。有人有想法吗?


谢谢,

cj

I need to pass a parameter to an executable either via URL or link or script or whatever but nothing is working.

The .exe is: \\CL001\Mart\OP2\Test1.exe

The parameter is: ''\\CL001\mart\op2\Test''

A direct type of this in the URL works:

\\CL001\Mart\OP2\Test1.exe /p ''\\CL001\mart\op2\Test''

However, if I type this (\\CL001\Mart\OP2\Test1.exe /p ''\\CL001\mart\op2\Test'') into a link for a URL, then the "file:\\" prefix is placed before and file not found error occurs.

This opens the app but the parameter is not passed properly:
<A HREF="\\CL001\Mart\OP2\Test1.exe?''p=\\CL001\mart\o p2\Test''''"></A>

I''ve tried various javascripts and manipulations with no success. Anyone have an idea?

Thanks,
cj

推荐答案

有你试过设置location.href吗?
Have you tried setting location.href?


感谢你的回复。我尝试过location.href,但得到错误Object Expected:

Thanks the response. I have tried location.href but get the error "Object Expected":

展开 | 选择 | Wrap | 行号



感谢您的回复。我尝试过location.href,但得到错误Object Expected:

Thanks the response. I have tried location.href but get the error "Object Expected":

展开 | 选择 | Wrap | 行号


这篇关于将参数传递给.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆