Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何用C打开文件(安装程序)#_C#_Windows Installer - Fatal编程技术网

C# 如何用C打开文件(安装程序)#

C# 如何用C打开文件(安装程序)#,c#,windows-installer,C#,Windows Installer,我想创建一个包含许多程序的安装程序,以便更快地重置windows。 我无法打开我选择的文件: using System; using System.Diagnostics; using System.IO; using System.Text; class Test { public static void Main() { Process.Start ("C:\\vlc-2.2.4-win32.msi"); } } 它总是这样:“System.Com

我想创建一个包含许多程序的安装程序,以便更快地重置windows。 我无法打开我选择的文件:

using System;
using System.Diagnostics;
using System.IO;
using System.Text;

class Test
{
    public static void Main()
    {
        Process.Start ("C:\\vlc-2.2.4-win32.msi");
    }
}
它总是这样:“System.ComponentModel.Win32Exception:“指定的可执行文件不是此操作系统平台的有效应用程序。”

怎么了。
很抱歉,我的英语和语法有误

请尝试启动msiexec并将安装文件作为参数提供

msiexec /i {package|ProductCode}

您的Windows操作系统是32位的,安装程序是64位的吗?不,我的Windows是64位的。我刚刚在我的64位机器上用您的代码运行了刚刚下载的
vlc-2.2.6-win32.exe
,运行正常。