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 get a process's folder or full filename?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
cancandodo
Advanced Cheater
Reputation: 0

Joined: 09 Mar 2012
Posts: 75

PostPosted: Tue Feb 15, 2022 6:57 am    Post subject: how to get a process's folder or full filename? Reply with quote

running a process
d:\test\mygame.exe

how to
print "d:\test\mygame.exe" or print "d:\test\"

by get process "mygame.exe"
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25859
Location: The netherlands

PostPosted: Tue Feb 15, 2022 7:07 am    Post subject: Reply with quote

Code:

print(enumModules()[1].PathToFile)


for the path you can do:
Code:

print(extractFilePath(enumModules()[1].PathToFile))

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
cancandodo
Advanced Cheater
Reputation: 0

Joined: 09 Mar 2012
Posts: 75

PostPosted: Tue Feb 15, 2022 7:32 am    Post subject: Reply with quote

Dark Byte wrote:
Code:

print(enumModules()[1].PathToFile)


for the path you can do:
Code:

print(extractFilePath(enumModules()[1].PathToFile))


run this lua

print

C:\Program Files\Cheat Engine 7.3\cheatengine-x86_64-SSE4-AVX2.exe

not print d:\test\mygame.exe
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25859
Location: The netherlands

PostPosted: Tue Feb 15, 2022 7:43 am    Post subject: Reply with quote

are you attached to mygame.exe ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
cancandodo
Advanced Cheater
Reputation: 0

Joined: 09 Mar 2012
Posts: 75

PostPosted: Tue Feb 15, 2022 7:53 am    Post subject: Reply with quote

Dark Byte wrote:
are you attached to mygame.exe ?


mygame.exe is a another process, not the running game process.

i want to get any process's patch,it can be "explorer.exe" or "Chrome.exe" or any other process
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: Tue Feb 15, 2022 8:35 pm    Post subject: Reply with quote

Code:

getProcesslist(Strings): Fills a Strings inherited object with the processlist of the system. Format: %x-pidname
getProcesslist(): Returns a table with the processlist  (pid - name )


You can use these to get the process list, then use
Code:
enumModules
with each processes id to get its individual module list, then do what Dark Byte showed with the first module in the list to get the path.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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