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 


Is it possible to retrieve opened-process argc argv

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
anh7codon
How do I cheat?
Reputation: 0

Joined: 23 Apr 2018
Posts: 9

PostPosted: Mon May 06, 2019 11:25 am    Post subject: Is it possible to retrieve opened-process argc argv Reply with quote

I want to retrieve opened-process’s information include argc, argv (command lines), image-type (32 or 64bit), list of process’s loaded modules.
Is that posible with CE’s lua?
Back to top
View user's profile Send private message
anh7codon
How do I cheat?
Reputation: 0

Joined: 23 Apr 2018
Posts: 9

PostPosted: Sat May 18, 2019 4:48 am    Post subject: Reply with quote

Answer my own question, It's not the best but it works

Code:

local txtCmd= 'WMIC PROCESS WHERE Name="ProcessABC.exe" get Commandline'
local handle = io.popen(txtCmd)
local result = handle:read("*a")
handle:close()
lines = {}
for line in result:gmatch("[^\r\n]+") do
    table.insert(lines, line)
end
print(line[2])
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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