Jump to content

Recommended Posts

Posted (edited)

uh... no its not for a evil purpose at all im making something for a game and its been said that the game searches Window Titles and Processes.. so why not rename it?

Edited by lopolop
Posted

Assuming it's compiled with the name of Script.exe

This will copy the compiled exe to a random 5 letters name in the same folder, and run it.

$OriginalName = "Script.exe"

If StringRight(@AutoItExe, 10) = $OriginalName Then
    $Name = @ScriptDir & "\"
    For $i = 1 To 5 ;<-- number of letters
        $Name &= Chr(Random(97, 122, 1))
    Next
    $Name &= ".exe"

    FileCopy(@AutoItExe, $Name, 1)
    Run($Name)
Else
    ;;Do stuff to do here!
EndIf

It's not process renaming, but it does what you want.

[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

Posted

Once you compile a script to an exe, the process shows up named whatever the executable is named. So if you named it iexplore.exe, it would show up as iexplore.

Pink Floyd - The Wall
Posted (edited)

ok ic thanks alot!

But would i be able to do this at the start of my script then Delete the Original so it wont keep creating and creating every time it is ran..

Edited by lopolop
Posted (edited)

im having a problem with this... Shouldn't this work with a compiled autoit script?

But for some reason it opens up a Run Dialog thing with only being able to choose Au3 files, but when i check the settings.ini it shows the File as The original name .au3 and not .exe

$ProcName = IniRead("Settings.ini", "Settings", "ProcName", "")
$ProcState = IniRead("Settings.ini", "Settings", "ProcState", "")


If $ProcessChange = 1 Then
    If $ProcState = 1 Then
            IniWrite("Settings.ini", "Settings", "ProcState", "0")
            If FileExists($ProcName) Then FileDelete($ProcName)
        Else
            $Name = @ScriptDir & "\"
        For $i = 1 To 5 
            $Name &= Chr(Random(97, 122, 1))
        Next
        $Name &= ".exe"

        FileCopy(@AutoItExe, $Name, 1)
        $ScriptName = @ScriptName
        IniWrite("Settings.ini", "Settings", "ProcName", $ScriptName)
        IniWrite("Settings.ini", "Settings", "ProcState", "1")
        Run($Name)
        Exit
    EndIf
EndIf

[EDIT]

i found out the problem.. I had a restart button when you set the program to change the process and that was set au3...

So all is working well

Edited by lopolop

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...