脚本打开DOS命令窗口并在客户端上运行exe(INTRANET) [英] Script to open a DOS Command Window and run exe on client (INTRANET)

查看:157
本文介绍了脚本打开DOS命令窗口并在客户端上运行exe(INTRANET)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我在Intranet上运行了一个asp.net应用程序。从我的一个aspx

页面我想运行一个javascript,它将运行以下

命令在CLIENT机器上的IIS / asp.net环境的OUTSIDE

(记住,一个受控的Intranet!)。这可能吗?这个窗口

程序需要打开并定期输入数据,同时使用

的asp.net应用程序。


exe在dos命令窗口中运行,绑定到Citrix ica文件。


C:\Program Files \ Citrix \ICA Client \wfica32.exe ciq.ica


请帮助我......老板真的很想要这个!


谢谢,


凯西

解决方案

在文章< 75 ************************* *@posting.google.com>,
Ka ********** @ attbi.com 启发我们...



我有一个在Intranet上运行的asp.net应用程序。从我的一个aspx
页面我想运行一个javascript,它将运行以下
命令在CLIENT机器上的IIS / asp.net环境OUTSIDE
(记住,一个受控的Intranet !)。这可能吗?




您可以使用HTA(jscript或vbscript)。

它们在客户端运行。


正常 javascript,就像只是一个指向application / exe的链接或者一个

window.open,需要一个浏览器环境。

你可以在aspx页面中找到一个链接指向你的hta,

打开过程并显示dos窗口。


< a href =" myHTA.hta">点击这里for process< / a>

HTA文档:
http://msdn.microsoft.com/workshop/a...taoverview.asp


-

-

~kaeli~

无论我的Rice Krispies告诉我什么都做。
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace


< blockquote> KathyB说:


我有一个在Intranet上运行的asp.net应用程序。从我的一个aspx
页面我想运行一个javascript,它将运行以下
命令在CLIENT机器上的IIS / asp.net环境OUTSIDE
(记住,一个受控的Intranet !)。这可能吗?使用
asp.net应用程序时,需要打开这个窗口
程序并定期输入数据。

exe在dos命令窗口中运行,与Citrix绑定ica文件。

C:\Program Files\Citrix\ICA客户端\ wfica32.exe ciq.ica

请帮助我...老板真的想要这个!



仅限IE:

var shell = new ActiveXObject(" WScript.Shell");

shell.Run (cmd / K CD C:\& Dir,1);


peeve:

这不是一个javascript,不仅仅是Java程序是Java。


Lee,我试过这个但是得到一个IE6错误,一个;,预计...在

位置15,但这没有意义。


具体来说,从aspx页面中的onclick事件,我有


Response.Write("< script> var shell = new

ActiveXObject("" WScript.Shell""); shell.Run ("" cmd / K CD C:\\Program

Files \\Citrix \\ICA Client \\wfica32.exe ciq.ica"", 1);< / script>")

我在运行时看到html源代码中的脚本,但是我收到了错误

as上文提到的。有什么想法吗?


感谢您的帮助。


Kathy


p.s.什么是1在shell.run行结束时做什么?


***通过Developersdex发送 http://www.developersdex.com ***

不要只是参加USENET ......获得奖励!

Hi,

I have an asp.net app running on an Intranet. From one of my aspx
pages I would like to run a javascript that will run the following
command OUTSIDE of the IIS/asp.net environment on the CLIENT machine
(remember, a controlled Intranet!). Is this possible? This windows
program needs to be opened and data entered periodically while using
the asp.net app as well.

The exe runs in a dos command window, tied to a Citrix ica file.

C:\Program Files\Citrix\ICA Client\wfica32.exe ciq.ica

PLEASE help me...the boss really wants this!

Thanks,

Kathy

解决方案

In article <75**************************@posting.google.com >,
Ka**********@attbi.com enlightened us with...

Hi,

I have an asp.net app running on an Intranet. From one of my aspx
pages I would like to run a javascript that will run the following
command OUTSIDE of the IIS/asp.net environment on the CLIENT machine
(remember, a controlled Intranet!). Is this possible?



You can use an HTA for this (jscript or vbscript).
They run on the client.

"Normal" javascript, as in just a link to the application/exe or a
window.open, would require a browser environment.
You could have a link in the aspx page that points to your hta, which
opens the process and shows the dos window.

<a href="myHTA.hta">Click here for process</a>

HTA documentation:
http://msdn.microsoft.com/workshop/a...taoverview.asp

--
--
~kaeli~
I do whatever my Rice Krispies tell me to.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace


KathyB said:


Hi,

I have an asp.net app running on an Intranet. From one of my aspx
pages I would like to run a javascript that will run the following
command OUTSIDE of the IIS/asp.net environment on the CLIENT machine
(remember, a controlled Intranet!). Is this possible? This windows
program needs to be opened and data entered periodically while using
the asp.net app as well.

The exe runs in a dos command window, tied to a Citrix ica file.

C:\Program Files\Citrix\ICA Client\wfica32.exe ciq.ica

PLEASE help me...the boss really wants this!


IE only:
var shell=new ActiveXObject("WScript.Shell");
shell.Run("cmd /K CD C:\ & Dir", 1);

peeve:
It is not "a javascript", any more than a Java program is "a Java".


Lee, I tried this but get an IE6 error that a ";" is expected...at
position 15 but that doesn''t make sense.

Specifically, from an onclick event in aspx page, I have

Response.Write("<script>var shell=new
ActiveXObject(""WScript.Shell"");shell.Run(""cmd /K CD C:\\Program
Files\\Citrix\\ICA Client\\wfica32.exe ciq.ica"", 1);</script>")

I see the script in the html source when I run it, but I get the error
as mentioned above. Any thoughts?

Thanks for your help.

Kathy

p.s. what does the "1" do at the end of the shell.run line?

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


这篇关于脚本打开DOS命令窗口并在客户端上运行exe(INTRANET)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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