Changing File Path On Runtime

Posts 1–5 of 5 · Page 1 of 1
Changing File Path On Runtime
Is is possible to change running file file path on runtime?

Let say i have file a.exe and when i run it and use GetModuleFileName it return c:\a.exe.

So i want to change the return value of running file a.exe GetModuleFileName to a custome one like c:\b.exe.

Possible or not possible?
Hook it or just make your own function..
Why would you want to do this? o-o
Quote Originally Posted by Hell_Demon View Post
Why would you want to do this? o-o
Well basically, i had an app which i want to inject to another process, the app has settings which are stored on the loader as EOF data. If i inject to loader as a host, the app can read the EOF data but if i inject to another process the app cant read the EOF data which are stored on the loader. Hope you guys got what i mean. I don't know how to solve this issues =\

What i was thinking is like, inject app to other process, change file path of injected app to loader file path(this one i dont know how to do), injected app use GetModuleFileName -> return path to loader (if i dont change the file path, GetModuleFileName will return the file path of the process whose being injected), injected app open file (loader) -> read pe info -> find EOF = Settings data retrieved.

That is what i wanna do...



*Yea, my English sucks XD
wait, what?
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us