Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Net.Sockets;
- using System.Diagnostics;
- using System.Net;
- using System.Threading;
- using System.IO;
- using System.Runtime.InteropServices;
- namespace NexusClient
- {
- public struct PROCESS_INFORMATION
- {
- public IntPtr hProcess;
- public IntPtr hThread;
- public uint dwProcessId;
- public uint dwThreadId;
- }
- public struct STARTUPINFO
- {
- public uint cb;
- public string lpReserved;
- public string lpDesktop;
- public string lpTitle;
- public uint dwX;
- public uint dwY;
- public uint dwXSize;
- public uint dwYSize;
- public uint dwXCountChars;
- public uint dwYCountChars;
- public uint dwFillAttribute;
- public uint dwFlags;
- public short wShowWindow;
- public short cbReserved2;
- public IntPtr lpReserved2;
- public IntPtr hStdInput;
- public IntPtr hStdOutput;
- public IntPtr hStdError;
- }
- public struct SECURITY_ATTRIBUTES
- {
- public int length;
- public IntPtr lpSecurityDescriptor;
- public bool bInheritHandle;
- }
- class Program
- {
- [DllImport("kernel32.dll")]
- static extern bool CreateProcess(
- string lpApplicationName,
- string lpCommandLine,
- IntPtr lpProcessAttributes,
- IntPtr lpThreadAttributes,
- bool bInheritHandles,
- uint dwCreationFlags,
- IntPtr lpEnvironment,
- string lpCurrentDirectory,
- ref STARTUPINFO lpStartupInfo,
- out PROCESS_INFORMATION lpProcessInformation
- );
- static void Main(string[] args)
- {
- Console.WriteLine("Type in your host name : ");
- string auth = Console.ReadLine();
- STARTUPINFO si = new STARTUPINFO();
- PROCESS_INFORMATION pi = new PROCESS_INFORMATION();
- CreateProcess(
- "WildStar64.exe",
- "/auth " + auth + " /authNc " + auth + " /lang en /patcher " + auth + " /SettingsKey WildStar /realmDataCenterId 9",
- IntPtr.Zero, IntPtr.Zero, false, 0, IntPtr.Zero, null, ref si, out pi);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment