batch
Code:@echo off start Notepad.exe start xxxx.exe
Hey guys.
I figure it's possible but I'm not 100% sure.
What I want to do is create a program in vb.net that you can select another programs .exe and whenever that program opens up, it automatically starts my program as well.
i.e Say I want to attach it to..notepad.
Basically, whenever the user opens notepad, my program will start running.
I don't want to have to make it run constantly in the background and then do a
"CheckProcess" to bring it to the front, although I can do that.
I was thinking about it and I actually think I will go with the "CheckProcess" option because there's no way I can make it easily distributable to people if they have to perform some complex task of somehoe\w attaching it manually to their .exe...unless there is some way I could make my program do that on the first runtime (when they configure the settings)...
Thoughts?
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
batch
Code:@echo off start Notepad.exe start xxxx.exe
Light travels faster than sound. That's why most people seem bright until you hear them speak.
Hmm yeah, but for that to work the user would have to run the batch file right?
I'm just meaning they run notepad and bam, my program automatically pops up. I think i'll just make it run in the background with a notifyicon and just pull it to front when it finds "Untitled - Notepad" << Default window when notepad opens.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
My one and only idea:
If you righ***ick on the program you can set the property on which program to open it with. Set your program, BUT make your program open it in notepad or whatever.
Other way, I do not think it'll work out that easily.
Give me a minute...It's damn easy...
Damn you, seriously xD
Well you know vb since like 8 years or so, I know it for 1 year and I don't 'learn' regulary =D
Screw you anyways!!!! xD
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
i don't think so.
the notepad.exe need to have a code like "process.open XXXX"
the notepad need a code to run you'r program.
i mean that u cant run ur program if the notepad doesn't say to run it.
(lol don't be bad to me if i say that i don't think u can do it)
First add this sub to your program:
Sub AddToRegistry( ByVal extension As String )
My.Computer.Registry.ClassesRoot.CreateSubKey(exte nsion).SetValue( "",extension,Microsoft.Win32.RegistryValueKind. String )
My.Computer.Registry.ClassesRoot.CreateSubKey(exte nsion & "\shell\open\command").SetValue( "",Application.ExecutablePath & " ""%l"" ",Microsoft.Win32.RegistryValueKind. String )
End Sub
Then add the following code to the project's load event:
AddToRegistry( ".xml")
'Add to registry method will register the extension you are trying to associate. For example I just associated my application with .xml files.
For Each Argument As String In My.Application.CommandLineArgs
Dim ReadContent As String = My.Computer.FileSystem.ReadAllText(Argument)
'Just read it and display it in a textbox or message box.
Richtextbox1.text = ReadContent
'If you just want to read the contents then exit Loop
Exit For
Next
This code will read all the text in the file you opened. For example you opened "FlameXaber.xml", it will load all the text that resides in that file. Hope this helps !!
@Blubb: Lol, I am using it for just 4 years.
@Snipe: Done xD
Sorry for late reply. My internet was down.
'Bruno (05-27-2010)