0

別のアプリケーションからアプリケーションを起動したい。コード

`public static void RunProcess(string AppProcessName)
        {
            string[] Files = Directory.GetFiles(AppProcessName);
            foreach (string file in Files)
            {
                if (System.IO.Path.GetExtension(file).Equals(".exe"))
                {
                    System.Diagnostics.Process AppProcess = new System.Diagnostics.Process();
                    System.Diagnostics.ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo();
                    Info.FileName = file.Replace('/', '\\');
                    AppProcess.StartInfo = Info;
                    AppProcess.Start();
                    break;
                }
            }
        }`

しかし、例外win32Exceptionが発生します

4

1 に答える 1

0

.exe実行しようとしているファイルは、Windows Mobile アプリケーションではありません。Windows Mobile デバイスにコピーできるからといって、Windows Mobile で実行できるわけではありません。

于 2012-05-05T01:39:52.293 に答える