How to create an . exe that you don’t need to run as an administrator?

Asked

Viewed 68 times

2

I made a script for a trainer for FIFA15, it’s more something to help the community, now I’m generating a version for everyone to be able to run. Follows the code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;

namespace cheat_birthyear
{
class Program
{
    public static string path;
    public static IntPtr BaseAddress = IntPtr.Zero;
    static void Main(string[] args)
    {
        Process[] processes = Process.GetProcessesByName("fifa15");
        if(processes.Length > 0)
        {
            IntPtr BaseAddress = IntPtr.Zero;
            Process MyProc = processes[0];
            foreach(ProcessModule module in MyProc.Modules)
            {
                if (module.ModuleName.Contains("fifa15"))
                {
                    BaseAddress = module.BaseAddress;
                    path = module.FileName;
                    Console.WriteLine(path);

                }
            }

            if (BaseAddress != IntPtr.Zero)
            {


                VAMemory memory = new VAMemory("fifa15");
                long finalAddress = memory.ReadInt64((IntPtr)BaseAddress + 0x01F441E8);
                int newaddr = memory.ReadInt32( (IntPtr)finalAddress + 0x390);

                string yearPath = path.Replace("fifa15.exe", "cheat_birthyear\\birthyear.txt");
                string[] lines = System.IO.File.ReadAllLines(@yearPath);
                string yearVal = lines[0];

                memory.WriteInt32( (IntPtr)finalAddress + 0x390, Int32.Parse(yearVal) );

            }
            else
            {
                Console.WriteLine("baseaddress não encontrado");
                Console.ReadLine();
            }
        }
        else
        {
            Console.WriteLine("jogo não encontrado");
            Console.ReadLine();
        }
    }
}
}

And these are the settings to generate the publish version: print

I am only having a problem now, when someone opens . exe without giving administrator permissions, the following error happens: print2

But when one executes the . exe by right clicking and run as administrator, everything works perfectly, so my question is: How can I create this executable so that it runs without these permissions?

  • Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful to you. You can also vote on any question or answer you find useful on the entire site

1 answer

3

In the manifest file of the application should put:

<requestedExecutionLevel level="asInvoker" uiAccess="false" />

There is no guarantee that you will not ask for administrator privilege because it depends on who will call your executable.

However, it may be that your application does not run correctly, or even runs. Here the only solution is not to use resources that require administrator privilege to function. You do not expect to access the machine processes and modify an executable in the memory without administrator privilege, right?

  • You’re right kkk, I did it, but I still have a "problem", because my Cheat needs to run only dps q the game is already open, what I did was one . bat that starts the game and 5s dps starts Cheat, then it opens the confirmation window, but in this case the game has already been opened and the window is not visible to the user.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.