安装包,创建快捷方式,开机启动项,配置文件参数覆盖窗体类库

2023-05-16

//using IWshRuntimeLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;

namespace setup
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();        
            label1.Text = "";
            textBox2.Visible = false;
        }
       static  string Parameter_path1_old = "";
      static  string Parameter_path2_old = "";
       static  string Parameter_path3_old = "";
       static  string Parameter_path4_old = "";
       static string Parameter_path1_new = "";
       static string Parameter_path2_new = "";
       static string Parameter_path3_new = "";
       static string Parameter_path4_new = "";

        private void button_Install_Click(object sender, EventArgs e)
        {
           
            button_Install.Enabled = false;
            textBox2.Visible = true;
            label1.Text = "请等待...";
            string installPath = GetInstallPath();
            if(!Directory.Exists(installPath))
            {
                Directory.CreateDirectory(installPath);
            }
            string path1 =installPath+"//Debug1" ;
            string path2 = installPath + "//Debug2";
            textBox2.Text = installPath;
            textBox2.Enabled = false;

            string sourcePath = AppDomain.CurrentDomain.BaseDirectory+"Debug";
            if (!Directory.Exists(sourcePath) )
            {
                return;
            }
            Task.Factory.StartNew(() => {
                if (!Directory.Exists(path1))
                {
                    Directory.CreateDirectory(path1);
                    CopyDirectory(sourcePath, path1);
                    ShortcutCreator.SetSetupWindowOpenRun(path1 + "//Unfix.exe", "Unfix", "拉曼光谱仪");
                    ShortcutCreator.CreateShortcutOnDesktop("Unfix", path1 + "//Unfix.exe"); 
                    this.Invoke(new Action(() => { label1.Text = "安装完成"; })); 
                    return;//首次安装
                }

                if (Directory.Exists(path2))
                {
                    DelectDir(path2);
                }
                Directory.CreateDirectory(path2);
                CopyDirectory(path1, path2);
                DelectDir(path1);
                Directory.CreateDirectory(path1);
                CopyDirectory(sourcePath, path1);

                Parameter_path1_old = path2 + "//SaveParameters-Small.xml";
                Parameter_path2_old = path2 + "//SaveParameters-Middle-NemoN532.xml";
                Parameter_path3_old = path2 + "//SaveParameters-Middle-NemoN532Or785.xml";
                Parameter_path4_old = path2 + "//Unfix.exe.config";

                Parameter_path1_new = path1 + "//SaveParameters-Small.xml";
                Parameter_path2_new = path1 + "//SaveParameters-Middle-NemoN532.xml";
                Parameter_path3_new = path1 + "//SaveParameters-Middle-NemoN532Or785.xml";
                Parameter_path4_new = path1 + "//Unfix.exe.config";
                UpDataConfig(Parameter_path1_new, Parameter_path1_old);
                UpDataConfig(Parameter_path2_new, Parameter_path2_old);
                UpDataConfig(Parameter_path3_new, Parameter_path3_old);
                UpdataAppConfig(Parameter_path4_new, Parameter_path4_old);//更新应用程序配置
                ShortcutCreator.SetSetupWindowOpenRun(path1 + "//Unfix.exe", "Unfix", "拉曼光谱仪");
                ShortcutCreator.CreateShortcutOnDesktop("Unfix", path1 + "//Unfix.exe"); 
                this.Invoke(new Action(() => { label1.Text = "安装完成"; })); 
            
            
            });
           
        }
        public static void CopyDirectory(string srcPath, string destPath)
        {
          
                try
                {

                    DirectoryInfo dir = new DirectoryInfo(srcPath);
                    FileSystemInfo[] fileinfo = dir.GetFileSystemInfos();  //获取目录下(不包含子目录)的文件和子目录
                    foreach (FileSystemInfo i in fileinfo)
                    {
                        if (i is DirectoryInfo)     //判断是否文件夹
                        {
                            if (!Directory.Exists(destPath + "\\" + i.Name))
                            {
                                Directory.CreateDirectory(destPath + "\\" + i.Name);   //目标目录下不存在此文件夹即创建子文件夹
                            }
                            CopyDirectory(i.FullName, destPath + "\\" + i.Name);    //递归调用复制子文件夹
                        }
                        else
                        {
                            //File.Create(destPath + "\\" + i.Name);
                            File.Copy(i.FullName, destPath + "\\" + i.Name, true);      //不是文件夹即复制文件,true表示可以覆盖同名文件
                        }
                    }
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.ToString());
                }
                            
         
        }

       
        public static void UpDataConfig(string pathNew,string pathOld)//参数配置更新
        {
            oldXd = null;//初始化加载赋值
            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.Load(pathNew);
            XmlNodeList xmlNLis = xmlDocument.ChildNodes;
            foreach(XmlNode xn in xmlNLis[1])
            {
               foreach(XmlNode xn2 in xn.ChildNodes)
               {
                   string value=GetParameterValue(pathOld,xn.Name, xn2.Name, "");
                  if( value!=null)//获取参数值
                  {
                      xn2.InnerText = value;
                  }
                  
                 

               }

 

            }
            xmlDocument.Save(pathNew);

        }
        public void UpdataAppConfig(string pathNew, string pathOld)//更新应用程序配置
        {
            oldXd = null;//初始化加载赋值
            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.Load(pathNew);
            XmlNodeList xmlNLis = xmlDocument.ChildNodes;
        
            foreach (XmlNode xn in xmlNLis[1].ChildNodes)
            {
                if (xn.Name == "#comment" || xn.Name == "configSections")
                {
                    continue;
                }
                foreach (XmlNode xn2 in xn.ChildNodes)
                {
                  foreach(XmlNode xn3 in xn2.ChildNodes)
                  {
                      if (xn3.Name == "#comment") continue;
                      string value = APPConfigHelper.GetValue(pathOld, xn3.Attributes[0].Value, "");
                      if (value != null&&value!="")//获取参数值
                      {
                          xn3.Attributes[1].Value = value;
                      }

                  }
                   

 

                }

 

            }
            xmlDocument.Save(pathNew);

 

        }

 


        static XmlDocument oldXd;//老配置文件
        public static string GetParameterValue(string filePath,string parameterType, string parameterName, string defaultValue)//获取参数值
        {


          if(oldXd==null)
          {
              oldXd = new XmlDocument();
              oldXd.Load(filePath);
          }
          
            XmlNode pXmlNode = oldXd.ChildNodes[1];
            XmlNodeList xmlNodeList = pXmlNode.ChildNodes;
            foreach (XmlNode xmlNode in xmlNodeList)
            {
                if (xmlNode.Name == parameterType)
                {
                    XmlNodeList xmLis = xmlNode.ChildNodes;
                    foreach (XmlNode xx in xmLis)
                    {
                        if (xx.Name == parameterName)
                        {

                            return xx.InnerText;

                        }


                    }

 

                }

 

            }
            return defaultValue;

        }


        public  string GetInstallPath()//获取路径
        {
            string configPath = AppDomain.CurrentDomain.BaseDirectory+ "setup.exe.config";

           string installPath= GetValue(configPath, "InstallPath", "");//获取配置文件值

            return installPath;
        }
        public static string GetValue(string configPath,string key, string value)//获取配置文件值
        {

            XmlDocument doc = new XmlDocument();
            {
                string strFileName = configPath;
                doc.Load(strFileName);//获得配置文件的全路径
                XmlNodeList nodes = doc.GetElementsByTagName("add");//找出名称为“add”的所有元素
                for (int i = 0; i < nodes.Count; i++)
                {
                    //获得将当前元素的key属性
                    XmlAttribute att = nodes[i].Attributes["key"];
                    //根据元素的第一个属性来判断当前的元素是不是目标元素
                    if (att.Value == key)
                    {
                        //对目标元素中的第二个属性赋值

                        att = nodes[i].Attributes["value"];
                        return att.Value;


                    }
                }
                //保存上面的修改

                //doc.Save(strFileName);

                return value;
            }

        }
        public static void DelectDir(string srcPath)//删除文件夹及所有文件
        {
            try
            {
                DirectoryInfo dir = new DirectoryInfo(srcPath);
                FileSystemInfo[] fileinfo = dir.GetFileSystemInfos();  //返回目录中所有文件和子目录
                foreach (FileSystemInfo i in fileinfo)
                {
                    if (i is DirectoryInfo)            //判断是否文件夹
                    {
                        DirectoryInfo subdir = new DirectoryInfo(i.FullName);
                        subdir.Delete(true);          //删除子目录和文件
                    }
                    else
                    {
                        File.Delete(i.FullName);      //删除指定文件
                    }
                }
                Directory.Delete(srcPath);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }

    }


    public class APPConfigHelper
    {
        public static object obj = 500;
       


        public static string GetValue(string filePath, string key, string value)//获取配置文件值
        {
            lock (obj)
            {
                XmlDocument doc = new XmlDocument();
                {
                    string strFileName = filePath;
                    doc.Load(strFileName);//获得配置文件的全路径
                    XmlNodeList nodes = doc.GetElementsByTagName("add");//找出名称为“add”的所有元素
                    for (int i = 0; i < nodes.Count; i++)
                    {
                        //获得将当前元素的key属性
                        XmlAttribute att = nodes[i].Attributes["key"];
                        //根据元素的第一个属性来判断当前的元素是不是目标元素
                        if (att.Value == key)
                        {
                            //对目标元素中的第二个属性赋值

                            att = nodes[i].Attributes["value"];
                            return att.Value;


                        }
                    }
                    //保存上面的修改

                    //doc.Save(strFileName);

                    return value;
                }
            }
        }

        public static void SetValue(string filePath, string key, string value)//获取配置文件值
        {
            lock (obj)
            {
                XmlDocument doc = new XmlDocument();
                {
                    string strFileName = filePath;
                    doc.Load(strFileName);//获得配置文件的全路径
                    XmlNodeList nodes = doc.GetElementsByTagName("add");//找出名称为“add”的所有元素
                    for (int i = 0; i < nodes.Count; i++)
                    {
                        //获得将当前元素的key属性
                        XmlAttribute att = nodes[i].Attributes["key"];
                        //根据元素的第一个属性来判断当前的元素是不是目标元素
                        if (att.Value == key)
                        {
                            //对目标元素中的第二个属性赋值

                            att = nodes[i].Attributes["value"];
                            att.Value = value;

                            break;
                        }
                    }
                    //保存上面的修改

                    doc.Save(strFileName);

                }
            }
        }

 


    }

   
   
    public class ShortcutCreator
     {

         /// <summary>
         /// 创建快捷方式的函数
         /// </summary>
         /// <remarks></remarks>
         /// <summary> 
         /// 将文件放到启动文件夹中开机启动 
         /// </summary> 
         /// <param name="setupPath">启动程序</param> 
         /// <param name="linkname">快捷方式名称</param> 
         /// <param name="description">描述</param> 
         public static void SetSetupWindowOpenRun(string setupPath, string linkname, string description)
         {
             string desktop = Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\" + linkname + ".lnk";
             if (System.IO.File.Exists(desktop)) System.IO.File.Delete(desktop);
             IWshRuntimeLibrary.WshShell shell; IWshRuntimeLibrary.IWshShortcut shortcut;
             try
             {
                 shell = new IWshRuntimeLibrary.WshShell();
                 shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(desktop);
                 shortcut.TargetPath = setupPath;//程序路径   
                 shortcut.Arguments = "";//参数   
                 shortcut.Description = description;//描述   
                 shortcut.WorkingDirectory = System.IO.Path.GetDirectoryName(setupPath);//程序所在目录   
                 shortcut.IconLocation = setupPath;//图标      
                 shortcut.WindowStyle = 1; shortcut.Save();
             }
             catch (Exception ex)
             {
                 System.Windows.Forms.MessageBox.Show(ex.Message, "友情提示");
             }
             finally
             {
                 shell = null; shortcut = null;
             }
         } 


         //需要引入IWshRuntimeLibrary,搜索Windows Script Host Object Model

        /// <summary>
         /// 创建快捷方式
         /// </summary>
         /// <param name="directory">快捷方式所处的文件夹</param>
         /// <param name="shortcutName">快捷方式名称</param>         /// <param name="targetPath">目标路径</param>         /// <param name="description">描述</param>
        /// <param name="iconLocation">图标路径,格式为"可执行文件或DLL路径, 图标编号",
        /// 例如System.Environment.SystemDirectory + "\\" + "shell32.dll, 165"</param>
         /// <remarks></remarks>
         public static void CreateShortcut(string directory, string shortcutName, string targetPath,
             string description = null, string iconLocation = null)
         {
             if (!System.IO.Directory.Exists(directory))
            {
                 System.IO.Directory.CreateDirectory(directory);
             }
 
            string shortcutPath = Path.Combine(directory, string.Format("{0}.lnk", shortcutName));
            IWshRuntimeLibrary.WshShell shell = new IWshRuntimeLibrary.WshShell();
            IWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(shortcutPath);//创建快捷方式对象
             shortcut.TargetPath = targetPath;//指定目标路径
             shortcut.WorkingDirectory = Path.GetDirectoryName(targetPath);//设置起始位置
             shortcut.WindowStyle = 1;//设置运行方式,默认为常规窗口
            shortcut.Description = description;//设置备注
             shortcut.IconLocation = string.IsNullOrWhiteSpace(iconLocation) ? targetPath : iconLocation;//设置图标路径
             shortcut.Save();//保存快捷方式
        }
 
         /// <summary>
        /// 创建桌面快捷方式
        /// </summary>
         /// <param name="shortcutName">快捷方式名称</param>
         /// <param name="targetPath">目标路径</param>
         /// <param name="description">描述</param>
        /// <param name="iconLocation">图标路径,格式为"可执行文件或DLL路径, 图标编号"</param>
         /// <remarks></remarks>
         public static void CreateShortcutOnDesktop(string shortcutName, string targetPath, 
             string description = null, string iconLocation = null)
         {
             string desktop = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);//获取桌面文件夹路径
             CreateShortcut(desktop, shortcutName, targetPath, description, iconLocation);
         }

    }
 
}
 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

安装包,创建快捷方式,开机启动项,配置文件参数覆盖窗体类库 的相关文章

  • 变量名和内存地址及符号表

    1 变量名是给编译器看的 xff0c 编译器根据变量是局部还是全局分配内存地址或栈空间 xff0c 所谓的变量名在内存中不存在 xff0c 操作时转换成地址数存放在寄存器中了 其实可以理解为是符号表起到了连接作用 2 符号表 xff08 此
  • C/C++编译和链接过程详解 概述 (重定向表,导出符号表,未解决符号表)

    详解link 有 些人写C C 43 43 以下假定为C 43 43 程序 xff0c 对unresolved external link或者duplicated external simbol的错误信息不知所措 xff08 因为这样的错误
  • 编译器构造概述(详细)

    一 编译器简介 前面谈到静态链接器构造的基本流程 xff0c 最后提到所构造的链接器若要能正常工作的前提是需要构造一个能生成符合链接器输入文件格式的编译器 xff0c 本文构造一个符合这种具体格式要求编译器 但是编译器的直接编译的结果一般是
  • nm命令中符号类型详解

    nm命令介绍的很多 xff0c 但大多不介绍其函数符号标志的含义 最近在调试动态库时常用到 xff0c 其中用的最多的用法 nm A grep aaa c 43 43 filt A 为了显示文件 xff0c c 43 43 filt转换为可
  • 电脑怎样执行编程语言的?

    链接 xff1a https www zhihu com question 29227521 answer 154819061 来源 xff1a 知乎 著作权归作者所有 商业转载请联系作者获得授权 xff0c 非商业转载请注明出处 这个问题
  • 汇编中的标号概念

    地址标号和数据标号 地址标号 1 assume cs code 2 code segment 3 a db 1 2 3 4 5 6 7 8 4 b dw 0 5 start mov si offset a 6 mov bx offset b
  • 汇编语言不带冒号标号的用法

    汇编语言中 xff0c 有一种编程方法 xff1a 直接定址表 这种方法和高级语言 xff0c C语言中的数组有类似的思想 xff0c 就是将参数编排在一起 xff0c 然后通过数组名的调用 xff0c 得到需要的数值 汇编语言中 xff0
  • 实战录 | 基于openflow协议的抓包分析

    实战录 导语 云端卫士 实战录 栏目定期会向粉丝朋友们分享一些在开发运维中的经验和技巧 xff0c 希望对于关注我们的朋友有所裨益 本期分享人为云端卫士安全SDN工程师宋飞虎 xff0c 将带来基于openflow协议的抓包分析 一 什么是
  • 汇编中的标号

    当程序中要跳转到另一位置时 xff0c 需要有一个标识来指示新的位置 xff0c 这就是标号 xff0c 通过在目标地址的前面放上一个标号 xff0c 可以在指令中使用标号来代替直接使用地址 使用变量是任何编程语言都要遇到的工作 变量是计算
  • win32常用的汇编指令和寄存器

    通用寄存器 EAX 累加 Accumulator 寄存器 AX AH AL 常用于乘 除法和函数返回值 EBX 基址 Base 寄存器 BX BH BL 常做内存数据的指针 或者说常以它为基址来访问内存 ECX 计数器 Counter 寄存
  • win32汇编寄存器汇总

    32位CPU所含有的寄存器有 xff1a 4个数据寄存器 EAX EBX ECX和EDX 2个变址和指针寄存器 ESI和EDI 2个指针寄存器 ESP和EBP 6个段寄存器 ES CS SS DS FS和GS 1个指令指针寄存器 EIP 1
  • 汇编指令ebp与esp的关系与作用

    可以看到 xff0c 初始情况下 xff0c ebp此时值为0012FEDC xff0c 也就是栈帧的地址 xff0c 而栈顶地址esp值为0012FDFC 可以看到两个值有一定的关系 而 帧指针 的地址较高 然后我们让它执行前两句 xff
  • win32 汇编基础概念整理

    一 关于寄存器 寄存器有EAX EBX ECX EDX EDI ESI ESP EBP等 xff0c 似乎IP也是寄存器 xff0c 但只有在CALL RET在中会默认使用它 xff0c 其它情况很少使用到 xff0c 暂时可以不用理会 E
  • 汇编中的寻址方式

    存储器 存储器 xff08 Memory xff09 是现代信息技术中用于保存信息的记忆设备 其概念很广 xff0c 有很多层次 xff0c 在数字系统中 xff0c 只要能保存二进制数据的都可以是存储器 xff1b 在集成电路中 xff0
  • x86的32位汇编快速入门

    本文描述基本的32位X86汇编语言的一个子集 xff0c 其中涉及汇编语言的最核心部分 xff0c 包括寄存器结构 xff0c 数据表示 xff0c 基本的操作指令 xff08 包括数据传送指令 逻辑计算指令 算数运算指令 xff09 xf
  • 80x86汇编指令详解

    80x86指令系统 xff0c 指令按功能可分为以下七个部分 1 数据传送指令 2 算术运算指令 3 逻辑运算指令 4 串操作指令 5 控制转移指令 6 处理器控制指令 7 保护方式指令 3 3 1数据传送指令 数据传送指令包括 xff1a
  • 汇编中addr和offset

    汇编中addr和offset的异同点 xff01 xff01 xff01 一 相同点 1 addr 和 offset 操作符都是获得操作数的偏移地址 xff1b 2 addr 和 offset 的处理都是先检查处理的是全局还是局部变量 xf
  • 汇编语言,数据段中,标号前面加不加offset有什么区别?

    data segment string db 40h dup 0 string 1 db 39 Input characters 39 0dh 39 39 data ends 那么 xff0c mov bx string 和 mov bx
  • SD-WAN如何推动企业上云

    企业上云是指企业将其业务系统 应用程序 数据等资源迁移到云端 xff08 云服务提供商的数据中心 xff09 xff0c 以实现更高效 灵活 安全 可靠的信息化运营和服务 麦肯锡公司发布了名为 企业上云2 0 xff1a 加速数字化转型 x
  • nvm常用命令,配置镜像

    1 配置镜像 阿里云 nvm npm mirror https npmmirror com mirrors npm nvm node mirror https npmmirror com mirrors node 腾讯云 nvm npm m

随机推荐

  • 汇编语言中MOV和OFFSET指令的两个问题?

    xff08 1 xff09 往段寄存器送段地址时要写成 MOV AX DATA MOV DS AX 不能写成 MOV DS DATA 这是为什么 xff1f 有人说由于段寄存只能进行16位的读写 xff0c 因此需要用ax来倒一下 xff0
  • C++动态链接库的制作

    输入函式 declspec dllimport 与输出函式 declspec dllexport 有什么区别呢 xff1f 我知道他们不同 xff0c 但差别在哪呢 我用的全是 declspec dllexport xff0c declsp
  • C#调用C++函数来与串口通信

    前些日子帮朋友写个小软件 xff0c 要求用C 来实现主程序 xff0c 主要的功能是与一些通信设备打交道 xff0c 当然就是通过串口了 xff0c 以十进制发送和读取串口 的数据 xff0c 考虑到C 调用API并没有C 43 43 来
  • c++获取系统错误提示!getLastError()

    void showError LPVOID lpMsgBuf FormatMessage FORMAT MESSAGE ALLOCATE BUFFER FORMAT MESSAGE FROM SYSTEM FORMAT MESSAGE IG
  • c++串口操作

    0 前言 做串口方面的程序 xff0c 使用CreateFile打开串口通信端口 在对串口操作之前 xff0c 需要首先打开串口 使用C 43 43 进行串口编程 xff0c 如果采用VS开发 xff0c 则可以直接借助于串口通信控件来操作
  • vs环境下C++dll生成和使用(基础篇)

    动态库和静态库 xff1a 动态库 xff1a 全名动态链接库 xff0c 用于将你的函数封装 xff0c 让别人只能调用 xff0c 不能看你的实现代码 由引入库和dll组成 xff1a 引入库包含导出的函数和变量名 xff0c dll包
  • #ifndef.#define, #endif 的用法

    文件中的 ifndef define endif 很关键 xff0c 是为了避免多重包含 xff0c 比如如果两个C文件同时包含同一头文件 xff0c 那么就会出现问题 xff0c 所以使用这种方法可以有效避免这种情况 一般用法 xff1a
  • 关于.NET编译的目标平台(AnyCPU,x86,x64)

    在VisualStudio中项目平台属性包含x86 x64 AnyCPU三个选项 xff0c 之前的项目中并没有特别去关注这一点 xff0c 最近的项目中涉及到了在不同平台运行的问题 xff0c 所以专门了解并整理了这方面的知识 x86 x
  • IP地址不是唯一的吗?为什么路由器的IP地址都是这样的呢?

    路由器同时连接外部网络和内部网络 xff0c 外部网络的IP是都不一样 xff0c 但内部网络的IP xff0c 就没有问题 xff0c 但内部网络所有设备的IP也不能相同 域名是对你的网站存放主机的ip的解析 xff0c 可以理解为你的别
  • HTTP简介

    HTTP协议是Hyper Text Transfer Protocol xff08 超文本传输协议 xff09 的缩写 是用于从万维网 xff08 WWW World Wide Web xff09 服务器传输超文本到本地浏览器的传送协议 H
  • OMF和flash_recovery_area的关系!

    在OMF出现之前 9i R1 oracle db的文件 xff0c 主要指dbf xff0c redo xff0c ctl是通过os管理的 xff0c 为了简化对数据库文件的管理 xff0c oracle引入了OMF 通过omf创建的dbf
  • asp.net发布网站的详细步骤

    1 用VS2013打开解决方案 2 选中解决方案 xff0c 点击鼠标 右键 gt 从弹出对话框中 xff0c 选择 清理解决方案 3 待第2步 清理解决方案 结束后 xff0c 选中 解决方案 gt 点击鼠标 右键 gt 在弹出对话框中
  • 域名和IP地址是一回事吗?建网站要买域名还要买IP地址吗?

    去年我在网通花了150元买了一个域名 xff0c 他们在登记单上的域名费一栏填了150元 xff0c 登记单上还有IP使用费一栏他们什么也没有填写 xff0c 如果域名与IP地址是同一个项目 xff0c 是一回事 xff0c 他们不是在重复
  • IIS服务器绑定域名问题

    不能将内网的IP地址和互联网的域名绑定 xff0c 如果这样做 xff0c 那么只有内网可以通过域名访问网站 xff0c 外网无法通过域名访问网站 域名ip地址绑定 xff0c 必须是固定ip地址 xff0c 还必须是公网ip地址 需要公网
  • asp网站配置错误解决汇总_1

    由于扩展配置问题而无法提供您请求的页面 如果该页面是脚本 请添加处理程序 错误 xff1a HTTP 错误 404 3 Not Found 由于扩展配置问题而无法提供您请求的页面 如果该页面是脚本 xff0c 请添加处理程序 如果应下载文件
  • 如何在本地服务器绑定域名及host文件的使用说明

    在本地服务器绑定域名 xff1a 打开C WINDOWS system32 drivers etc 目录下面的hosts文件 xff0c 把127 0 0 1 localhost复制 xff0c 粘贴到文件的最后 xff0c 然后把loca
  • 内网访问不到内网网站问题和不用端口号访问网站问题

    windows防火墙 xff0d 高级 xff0d 网络连接设置 xff0d 设置 xff0d 服务 xff0d web服务器 xff0c 在这个位置可以打开80端口 怎样让自建网站在内外网访问时不用加端口名 怎样让自建网站在内外网访问时不
  • vs2010本地调试打不开网页

    在C WINDOWS system32 drivers etc这个文件夹下 找到Hosts文件 用记事本打开 localhost设为127 0 0 1
  • asp文件上传和下载

    ASP NET实现上传文件 前端 界面十分简单 xff0c 只是放一个file类型的 lt input gt 和一个按钮 xff0c 并且为这个按钮添加点击事件 xff08 btnUpLoad Click xff09 xff0c 如下图 x
  • 安装包,创建快捷方式,开机启动项,配置文件参数覆盖窗体类库

    using IWshRuntimeLibrary using System using System Collections Generic using System ComponentModel using System Data usi