Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //compile: mcs test.cs -r:system.configuration.install.dll
- //call: c:\Windows\Microsoft.NET\Framework\v4.0.30319>installutil /logfile= /LogToConsole=false /U "C:\Users\Spock\Desktop\test.exe"
- using System;
- using System.Configuration.Install;
- using System.IO;
- using System.Runtime.InteropServices;
- using System.Security.Principal;
- namespace HackForums {
- [System.ComponentModel.RunInstaller(true)]
- public class Demo : System.Configuration.Install.Installer {
- public static void Main(string[] argv) {
- Console.WriteLine("Hello world. This program can execute normally and through InstallUtil");
- }
- // This gets executed through installutil
- public override void Uninstall(System.Collections.IDictionary savedState)
- {
- Demo.Main(null);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement