Jump to content

Get every file extension in the registry


TehWhale
 Share

Recommended Posts

I am planning on making a Computer Logger, it will log every program, that is ran, every file that is viewed, etc.

So I need it to look through the Registry root, and get every extension in there, and then somehow, not sure, write it to run my compiled .exe, via command line, with the program that needs to be ran, and its parameters, so basically, if I opened a .txt file, it would run my .exe like this:

ProgramLogger.exe "Notepad.exe" "C:\Users\Swift\Desktop\file.txt"

Then, my program will log it, and then use ShellExecute($CmdLine[1], $CmdLine[2])

But, my issue is, how to get every extension, and then write to every extension to run my program.

Link to comment
Share on other sites

You won't be able to get every extension like that. Many file types are handled by weird "handler" objects. They aren't programs and you can't run them via shell execute.

I must say, doing something like sending every file to your application will slow your computer down ridiculously. You'd do better to watch for new processes and just read the command line associated with each.

Link to comment
Share on other sites

Heh, Ok. Yeah it sounded a bit complicated, but thanks for the information.

Ok, so getting started here, I know how to check for new processes, but what cmd, or UDF is there to get the command line from a process?

Edited by Alienware
Link to comment
Share on other sites

you can log exe file, check this #569707

and by this you can get more ideas on how to add other exts.

Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel
Link to comment
Share on other sites

Heh, Ok. Yeah it sounded a bit complicated, but thanks for the information.

Ok, so getting started here, I know how to check for new processes, but what cmd, or UDF is there to get the command line from a process?

I'd take a look at the ProcessList() command in the help file.

You can then just list them all to an array, recheck ever 5 or 10 seconds, and add new processes, etc, that are not there previously. Seems easiest approach to me.

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

I'd take a look at the ProcessList() command in the help file.

You can then just list them all to an array, recheck ever 5 or 10 seconds, and add new processes, etc, that are not there previously. Seems easiest approach to me.

Sorry for, like, being a ***** but I said, that I already know how to do this. The only issue i'm having is how to get the command line of a running program.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...