アプリ版:「スタンプのみでお礼する」機能のリリースについて

C#でexeに埋め込みの画像を表示することはできますが、
exeに埋め込みのexeを実行することはできるのでしょうか。お願いします。

A 回答 (2件)

テンポラリファイルに保存してキックするとか。



string file = Path.GetTempFileName().Replace(".tmp", ".exe");
byte[] bin = Properties.Resources.埋め込みのexe;
using (FileStream fs = new FileStream(file, FileMode.Create))
fs.Write(bin, 0, bin.Length);
Process p = Process.Start(file);
p.WaitForExit();
File.Delete(file);
    • good
    • 3

VB.NET↓



Dim proc As Process = Process.Start("EXEパス", "引数")

参考URL:http://ap.atmarkit.co.jp/bbs/core/vblab/28249
    • good
    • 1

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!

このQ&Aを見た人はこんなQ&Aも見ています