如何创建打开网址的exe文件 [英] how to create exe file that opens an url

查看:130
本文介绍了如何创建打开网址的exe文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在一个系统上的IIS上托管了一个Web应用程序,它连接到局域网上的其他系统



我只需输入安装IIS的系统的IP地址,即可从局域网内访问应用程序(由IIS托管):



Hi All,

I have a web application hosted on IIS in one system and its connected to other system on LAN

I access the application (hosted with IIS) from within the LAN by just typing the IP address of the system on which IIS is installed as:

"http://IPAddress:Portnumber"





我想创建一个访问权限的exe以上网址并在浏览器上打开,这样用户无需每次都输入网址



问候



I want to create a exe that access the above url and open on a browser so the users need not have to type the url every time

Regards

推荐答案

创建网址的快捷方式并分发。

发送一个EXE是过度的,捷径的优势在于它将在默认浏览器中打开。



当你是创建快捷方式,而不是浏览到您想要浏览的网址中的应用程序。
Create a shortcut to the web address and distribute that.
Sending an EXE is overkill, and the advantage of the short cut is that it will open in their default browser.

When you are creating the shortcut, instead of browsing to an application you put in the web address you want to browse to.


您在询问之前是否谷歌了?

那么让我为你而谷歌 [ ^ ]





这甚至可以通过批处理文件来实现,创建一个应用程序并且无需编译所有的铃声和​​口哨......

Did you Google it before asking?
So Let Me Google That For You[^]


This can even achieved by a batch file, creating an application and going through all the bells and whistles of compiling isn't necessary...
<br />
@echo off<br />
start http://ipaddress:port<br />


创建C#控制台应用程序。请参阅下面提到的用于在控制台应用程序中使用您的URL打开浏览器的代码。



Create C# console application. Refer below mention code for opening browser with your url in console application exe

class Program
    {
        static void Main(string[] args)
        {
            System.Diagnostics.Process.Start("http://IPAddress:Portnumber");
        }

      
    }


这篇关于如何创建打开网址的exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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