forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


GetWindowThreadProcessId / GetWindowModuleFileNameA

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1727
Location: Space and Time

PostPosted: Tue Dec 04, 2018 4:00 pm    Post subject: GetWindowThreadProcessId / GetWindowModuleFileNameA Reply with quote

I am trying to get the EXE name from a Class/ID, but I am having issues. Anyone around that can help? I am on Windows 10 64bit. I need something that works on both 32 and 64.

I have tried this but it's not working properly:

Code:

    loadlib user32.dll
    %H = @strdel(@winexists(#Progman),1,1)
    %T = @fill(256)
    %Z = @lib(USER32,GetWindowModuleFileNameA,INT:,%h,@addr("%T"),255)
    info %T
    freelib user32.dll


Thanks!!

_________________
Chris
Http://vdsfreak.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
GregLand
Contributor
Contributor


Joined: 15 Jun 2004
Posts: 172
Location: FRANCE

PostPosted: Wed Dec 05, 2018 7:23 am    Post subject: Reply with quote

Very interested too!

I have tried with an other method (Batch file)

notepad windows name is .txt file

Code:
CHCP 1252
tasklist /FO CSV /NH /FI "WINDOWTITLE eq temp*" > "a.txt"
type "a.txt" > temp.txt
del "a.txt"
ren temp.txt a.txt
del batch.bat


give this in a a.txt

Code:
"notepad.exe","17320","Console","1","19 012 Ko"


hope it can help
Back to top
View user's profile Send private message Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1727
Location: Space and Time

PostPosted: Wed Dec 05, 2018 3:30 pm    Post subject: Reply with quote

I have tried that also, but it doesn't work very well and doesn't like window titles that have spaces. I would like to be able to use the class of the window.
_________________
Chris
Http://vdsfreak.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
GregLand
Contributor
Contributor


Joined: 15 Jun 2004
Posts: 172
Location: FRANCE

PostPosted: Wed Dec 05, 2018 4:23 pm    Post subject: Reply with quote

Rolling Eyes
Yes, I know.... Crying
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
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 can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group