Login Register


need some help with icon injection... filter_list
Author
Message
need some help with icon injection... #1
well, in my program it will download a .ico file from a source then save it to the temp path. next i used sage's iconinjector class which i did:
Iconinjector.inject(application.executablepath, environ("temp") & "/1.ico"

but every time i tried it wont inject itself but will inject other executable's.

is there any solution?
Pierce the life fibers with your drill.

Reply

RE: need some help with icon injection... #2
You cannot edit any file which is running.
Just make a copy of the executable, and change its icon.
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: need some help with icon injection... #3
well... the real code is:
if my.computer.info.osfullname.contains("Windows XP") = true then
iconinjector.inject(application.executablepath, environ("temp") & "\1.ico")
else
iconinjector.inject(application.executablepath, environ("temp") & "\2.ico")
end if


well, sorry im a bit dumb but if you copy the file and inject it i want it renamed the same as the file and in the same directory also don't want 2 processes... what to do? :rip:
Pierce the life fibers with your drill.

Reply

RE: need some help with icon injection... #4
So you want to save the icon or change some exe's icon? Oo
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: need some help with icon injection... #5
in the end i want the file to run the code normally but have its icon changed depending on the OS Biggrin
Pierce the life fibers with your drill.

Reply

RE: need some help with icon injection... #6
You can only change the small icon in the Form at runtime, otherwise copy the program, change icon and start it instead of original app.

Code:
IO.File.Copy(Application.ExecutablePath, CurDir() & "\" & ProductName & "2.exe") Dim iconPath As String = String.Empty if my.computer.info.osfullname.contains("Windows XP") = true then iconPath = environ("temp") & "\1.ico" else iconPath = environ("temp") & "\2.ico" end if iconinjector.inject(CurDir() & "\" & ProductName & "2.exe", iconPath) Process.Start(CurDir() & "\" & ProductName & "2.exe") Me.Close()

This is pretty much noticeable though.
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: need some help with icon injection... #7
tnx man for taking your time it works :Thumbs:
Pierce the life fibers with your drill.

Reply







Users browsing this thread: 1 Guest(s)