Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


how to execute a file in .ct directory

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
reverser69
Expert Cheater
Reputation: 0

Joined: 03 Sep 2014
Posts: 112

PostPosted: Fri Feb 12, 2021 12:54 am    Post subject: how to execute a file in .ct directory Reply with quote

hi all

I'm creating a loader. I have my script it working but I have two questions

how can I execute XXX.exe located in the same directory automatically by lua?

and is there a simpler way other than writebyte to inject code?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Feb 12, 2021 2:42 am    Post subject: Reply with quote

- os.execute(..)
- io.popen(..)
- createProcess(..)
- shellExecute(..)

Take your pick.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
reverser69
Expert Cheater
Reputation: 0

Joined: 03 Sep 2014
Posts: 112

PostPosted: Fri Feb 12, 2021 3:22 am    Post subject: Reply with quote

thx
but i don't want to pass a full path
i just want to execute the exe which is located in the same directory as ct.
so changing directory won't be a problem
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Fri Feb 12, 2021 5:07 am    Post subject: This post has 1 review(s) Reply with quote

add at your ct file, example :

Code:
local path = TrainerOrigin
local game = path..'\\mygame.exe'
shellExecute(game)

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
reverser69
Expert Cheater
Reputation: 0

Joined: 03 Sep 2014
Posts: 112

PostPosted: Fri Feb 12, 2021 6:22 am    Post subject: Reply with quote

Corroder wrote:
add at your ct file, example :

Code:
local path...


+1
thx
Back to top
View user's profile Send private message
reverser69
Expert Cheater
Reputation: 0

Joined: 03 Sep 2014
Posts: 112

PostPosted: Fri Aug 06, 2021 1:54 pm    Post subject: problem with opened exe file Reply with quote

so I didn't want to open another topic.

when I open a file by any of these:
Code:

- os.execute(..)
- io.popen(..)
- createProcess(..)
- shellExecute(..)


and then I minimize my target, I cant pop up its window again and stays minimized no matter what.

how can I confirm if it's a CE bug or the target's bug.
I also suspect that the target may detect that it is run by another process. what API is used for this mechanism?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites