|
-
May 22nd, 2000, 02:16 PM
#1
Thread Starter
Lively Member
I know there is a way to do this, this i what i want to do:
1) Determine when an EXE, COM, or BAT file is loaded.
2) Tell windows to cancel running it.
3) Allow my program to scan it.
4) Then make my program run it.
(i bet it's all API! hehe)
Any help is worth thanking... :)
-da404LewZer
Kid A
18 Year Old Programmer
Visual Basic 6 & .NET Enterprise, ASP, WinXP (Advanced Server) Administration, HTML, Graphic Arts, Winsock, Learning VC++ and now maybe C#.. heh
[vbcode]
'back in the day vb6 code
Private Sub My_Life()
If Hour(Now) > 3 And Hour(Now) < 13 Then
Status = "Sleeping"
Else
Status = "Computing"
End If
End Sub
[/vbcode]
-
May 22nd, 2000, 03:01 PM
#2
transcendental analytic
Do you want to get an event or is timer ok?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 25th, 2000, 01:34 PM
#3
Thread Starter
Lively Member
Anyone??
C'mon i need to know how... and yes i will most likely be using a timer, unless it's not needed. I got the exe scanning thing already werking.. i just wanna know how 2 do 1,2,and 4.
Please help.
Kid A
18 Year Old Programmer
Visual Basic 6 & .NET Enterprise, ASP, WinXP (Advanced Server) Administration, HTML, Graphic Arts, Winsock, Learning VC++ and now maybe C#.. heh
[vbcode]
'back in the day vb6 code
Private Sub My_Life()
If Hour(Now) > 3 And Hour(Now) < 13 Then
Status = "Sleeping"
Else
Status = "Computing"
End If
End Sub
[/vbcode]
-
May 25th, 2000, 03:31 PM
#4
You can do this by editing the registry. If you have a look under the HKEY_CLASSES_ROOT you will find all registred file types including BAT, COM and EXE. Take a look at the key .bat and you will see a value in the right pane (probably batfile). Then scroll down to that key (batfile) and change the value under shell\open\command from "%1" %* to YourProgramPathAndName "%1" %*. Now every time you try to start a .BAT file you program starts and you will get the path and filename of the .BAT file as a command argument.
Use the Command$() function to read the command line. Run your scan of the file and then use the Shell function to launch the .BAT file.
Now do the same for .COM and .EXE files in the registry.
Good luck!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|