pomocou c# wpf aplikacie nemozem spustit process.start.
Mainwindow.xaml.cs
Kód:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.ComponentModel;
using System.Xaml;
namespace nng
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
string number;
WebClient wb = new WebClient();
Uri injector = new Uri("htpp://nbl.6f.sk/inj.exe");
Uri loader = new Uri("htpp://nbl.6f.sk/nng.exe");
Uri version = new Uri("htpp://nbl.6f.sk/version.txt");
Uri dll = new Uri("htpp://nbl.6f.sk/nonamegang.dll");
Uri nonamegang = new Uri("htpp://nbl.6f.sk/nonamegang.xyz.rar");
public MainWindow()
{
InitializeComponent();
if (game.Content.ToString() == "Team Fortress 2")
{
xd.IsEnabled = false;
}
else if (game.Content.ToString() == "Playerunknown's Battlegrounds")
{
xd.IsEnabled = false;
}
wb.DownloadFileAsync(version, "version.txt");
System.IO.StreamReader file = new System.IO.StreamReader("version.txt");
wb.DownloadFileAsync(injector, "inj.exe");
wb.DownloadFileAsync(loader, "nng.exe");
File.SetAttributes("inj.exe", FileAttributes.Normal);
number = file.ReadLine();
if (versionnumber.Content.ToString() == "number")
{
}
else
{
Launcher.Launchnng();
}
}
}
private void button3_Click(object sender, RoutedEventArgs e)
{
game.Content ="Team Fortress 2";
}
private void button1_Click_1(object sender, RoutedEventArgs e)
{
game.Content = "Playerunknown's Battlegrounds";
}
private void button2_Click_1(object sender, RoutedEventArgs e)
{
game.Content = "Counter-Strike: Global Offensive";
}
private void button4_click(object sender, RoutedEventArgs e)
{
game.Content = "hhh";
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
}
private void inject(object sender, RoutedEventArgs e)
{
wb.DownloadFileCompleted += new AsyncCompletedEventHandler(FileDownloadComplete);
wb.DownloadFileAsync(dll, "nonamegang.dll");
File.SetAttributes("nonamegang.dll", FileAttributes.Hidden);
Process pr = new Process();
Launcher.Launchinj();
}
private void FileDownloadComplete(object sender,AsyncCompletedEventArgs e)
{
}
}
}
Launcher.cs
Kód:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.IO;
using System.Web;
namespace nng
{
class Launcher
{
public static void Launchnng()
{
Process.Start("nng.exe");
Environment.Exit(0);
}
public static void Launchinj()
{
Process.Start("inj.exe");
}
}
}
debug hlasi
Kód:
System.ComponentModel.Win32Exception: 'The specified executable is not a valid application for this OS platform.'