无需打开对话框即可启动程序 [英] How to launch program without opening dialog

查看:55
本文介绍了无需打开对话框即可启动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过'href调用exe,但是当它执行时,

如果我想打开文件(exe文件),我会收到消息。

有什么方法可以抑制这个出现

并打开程序吗?


谢谢,

SK

解决方案

可能不是ASP问题...


< script language =" vbscript">

函数RunFile(TheFile)

CreateObject(" WScript.Shell")。运行"""" &安培; TheFile& """,0,False"

结束函数

< / script>

< body>

< A href =''vbscript :RunFile(" \\\\\\\\\\\'>>运行此程序< / A>

< / body>


" SK" <一个******* @ discussions.microsoft.com>在消息中写道

news:02 **************************** @ phx.gbl ... < blockquote class =post_quotes>我正在通过'href调用exe,但是当它执行时,
如果我想打开文件(exe文件),我会收到消息。
有没有办法我可以抑制这个出现
并打开程序吗?

谢谢你,
SK



不,谢天谢地......

这是一个巨大的安全隐患。用户必须将其设置更改为

允许这样做。

想一想。我可以将用户发送到带有virus.exe的链接,并且

自动安装...不是一件好事。


-

Curt Christianson

所有者/首席开发人员,DF-Software
www.Darkfalz.com

" SK" <一个******* @ discussions.microsoft.com>在消息中写道

news:02 **************************** @ phx.gbl ... < blockquote class =post_quotes>我正在通过'href调用exe,但是当它执行时,
如果我想打开文件(exe文件),我会收到消息。
有没有办法我可以抑制这个出现
并打开程序吗?

谢谢你,
SK



ljb,


感谢您的回复!


我可以运行我的程序,但是当它启动时,

我得到窗口有些文件会损害你的电脑......


你想打开/保存/取消...


如何避免出现此消息以便它运行程序



接下来是应该使用名称打开文件

我传递给你。例如。你想用excel打开一个excel

文件。


再次感谢你的帮助!

-SK

-----原始消息-----
可能不是ASP问题......

< script language =" ; vbscript">
函数RunFile(TheFile)
CreateObject(" WScript.Shell")。运行"""" &安培; TheFile
& """,0,False"结束功能
< / script>
< body>
< A href =''vbscript :RunFile
(" \\\ \ n \\\\\\\\\&>>运行此程序< / A>< / body>

" SK" <一个******* @ discussions.microsoft.com>写在
messagenews:02 **************************** @ phx.gbl ...

我正在通过'href调用exe,但是当它执行时,
如果我想打开文件(exe文件),我会收到消息。
有什么方法可以抑制这个出现
并打开程序?

谢谢,
SK





I am calling an exe thru'' href, but when it executes,
I get the message if I want to open the file(exe file).
Is there any way I can suppress this from appearing
and open the program?

Thank you,
SK

解决方案

Probably not an ASP question...

<script language="vbscript">
function RunFile(TheFile)
CreateObject("WScript.Shell").Run """" & TheFile & """, 0, False"
end function
</script>
<body>
<A href=''vbscript:RunFile("\\server\path\program.exe" )''>Run this program</A>
</body>

"SK" <an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...

I am calling an exe thru'' href, but when it executes,
I get the message if I want to open the file(exe file).
Is there any way I can suppress this from appearing
and open the program?

Thank you,
SK



No, thank heavens....
It''s a HUGE security risk. The user will have to alter their settings to
allow this.
Think about it. I could send a user to a link with a virus.exe on it and
install it automatically... NOT a good thing.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"SK" <an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...

I am calling an exe thru'' href, but when it executes,
I get the message if I want to open the file(exe file).
Is there any way I can suppress this from appearing
and open the program?

Thank you,
SK



ljb,

Thanks for the reply!

I am able to run my program, however when its launched,
I get window "Some files can harm your computer....

YOu want to Open/Save/Cancel ...

How to avoid this message from appearing so that it
runs the program.
Next thing is it should open the file using the name
that I pass on. For eg. you want to open an excel
file using excel.

Thanks again for your help!
-SK

-----Original Message-----
Probably not an ASP question...

<script language="vbscript">
function RunFile(TheFile)
CreateObject("WScript.Shell").Run """" & TheFile & """, 0, False" end function
</script>
<body>
<A href=''vbscript:RunFile ("\\server\path\program.exe")''>Run this program</A></body>

"SK" <an*******@discussions.microsoft.com> wrote in messagenews:02****************************@phx.gbl...

I am calling an exe thru'' href, but when it executes,
I get the message if I want to open the file(exe file).
Is there any way I can suppress this from appearing
and open the program?

Thank you,
SK


.



这篇关于无需打开对话框即可启动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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