简体   繁体   English

如何在CYGWIN会话中使用URL启动IE

[英]How to start IE with a URL in a CYGWIN session

I have a windows xp machine set up with Cygwin running the ssh service, on that machine I have a bat script that opens up IE using the following command "C:\\Program Files\\Internet Explorer\\iexplore.exe" " http://windowsxpbox:3000/flex/flexUnitTests?debug=true#automated=true ". 我有一台运行ssh服务的Cygwin设置的windows xp机器,在那台机器上我有一个bat脚本,使用以下命令打开IE:“C:\\ Program Files \\ Internet Explorer \\ iexplore.exe”“ http:// windowsxpbox:3000 / flex / flexUnitTests?debug = true#automated = true “。

The script runs fine when I'm calling it locally on that xp machine, I am trying to call that same bat script remotely from another machine and achieve the same result but with IE opened on the remote machine, my problem is when the bat script is called remotely nothing happens on the remote machine. 当我在xp机器上本地调用脚本时,脚本运行正常,我试图从另一台机器远程调用相同的bat脚本并实现相同的结果但是在远程机器上打开IE,我的问题是当bat脚本被远程调用远程机器上没有任何事情发生。

Just: 只是:

cygstart "http://www.google.com"

where google.com is your desired URL. google.com是您所需的网址。

cygstart launches the default windows program for a path. cygstart启动路径的默认Windows程序。 So this way you get the user's preferred web browser... 这样你就可以获得用户首选的网络浏览器......

cygstart /cygdrive/c/Programme/Internet\\ Explorer/iexplore.exe "www.google.at" cygstart / cygdrive / c / Program / Internet \\ Explorer / iexplore.exe“www.google.at”

path may change according to your installation 路径可能会根据您的安装而改变

Cygwin's shell doesn't know how to execute a batch script. Cygwin的shell不知道如何执行批处理脚本。 Use cygwin to start cmd.exe, and let that run the batch file. 使用cygwin启动cmd.exe,然后运行批处理文件。 EG 例如

/cygdrive/c/Windows/System32/cmd.exe /c "c:\myscript.bat"

Edit: if you'd rather run explorer directly rather than relying on a batch file, the following works properly for me: 编辑:如果您宁愿直接运行资源管理器而不是依赖批处理文件,以下方法适合我:

$ "/cygdrive/c/Program Files/Internet Explorer/iexplore.exe" "http://windowsxpbox:3000/flex/flexUnitTests?debug=true#automated=true"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM