using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace consolex86
{
    class Program
    {
        [DllImport("kernel32.dll", SetLastError = true)]
        private static extern bool Wow64DisableWow64FsRedirection(ref IntPtr ptr);

        [DllImport("kernel32.dll", SetLastError = true)]
        private static extern bool Wow64RevertWow64FsRedirection(IntPtr ptr);

        static void Main(string[] args)
        {
            var windir = Environment.GetEnvironmentVariable("windir");
            string sysdir = "System32";
            if (!Environment.Is64BitProcess)
                sysdir = "SysNative";

            var path =  System.IO.Path.Combine(windir, sysdir,"notepad.exe");
            Process.Start(path);

            return;
        }
    }
}

 

相关文章:

  • 2021-09-04
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
猜你喜欢
  • 2021-10-09
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
相关资源
相似解决方案