Skip to main content
gamedev.net
🔒 Locked

Unregister Process

Started by levjs 7 replies 650+ views
Original Post
levjs
levjs
Hi, Is there any way to launch a program(with Createprocess), and have it so that it does not show up on the taskbar and is not entered in the list of processes running in task manager? Thanks Levi
Palidine
Palidine
Yes, but only with 1337 skillz. Why would you want to do that unless you were writing a virus / trojan?

-me
levjs
levjs
Ok, let me explain, I've been trying to figure this out for a while, so maybe someone can help. My question was probably not the right question to ask.


NOTE: This is what I came up with as an answer to my problem, if it's dumb, excuse me. : )

I'm writing a screesaver manager for a my screensavers. Some of my screensavers will be trial versions, so instead of just putting the .scr files there and having to store reg info in the registry or somewhere else, I wrap that info around the mainframe for a screensaver and put all that info into the a file with another extension(one that my manager will use).

When my manager runs a screensaver, it gets the info, copies the mainframe of the screensaver into memory, then deposits it into a file in the temp folder, then runs it from there, deletes it when it's done.

The problem is that someone can go into the temp folder and get the file while the screensaver is running(in preview mode or config mode), rename it to an .scr file, and they have the full version(the main screensaver manager is the one that stops a screensaver from running if it's a trial version).

So basically, I need some way to either run the screensaver from memory(i've been told this is about impossible), or else someway to make the file in the temp folder more secure.

Any suggestions. And sorry if my explanation wasn't that clear. Ask if you have questions.
Levi
Colin Jeanne
Colin Jeanne
If you're using Win32 ensuring that your app doesnt show in the taskbar is easy. Make sure that your window does not have the WS_EX_APPWINDOW extended style. Or, if this works with your design, make your window a tool window with the WS_EX_TOOLWINDOW extended style.
dbzprogrammer
dbzprogrammer
The only sure way to have it not show up anywhere is to create a thread, which I believe will keep running even IF you close a program. Someone correct me if I'm wrong though...

Anyways, you could always make the program a .dll and tell windows to load it up when you start the system. It would mask it as rundll32.exe I believe...
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
levjs
levjs
What I really need is some way to stop people from accessing the file I run from(in the temp folder). There must be some way easier than creating them as .dlls. Is there some protection method where you make a file unreadable execpt to a specific process?

Thanks so much to all who help, helped, will helped, and will have helped.
[smile]
Levi
Colin Jeanne
Colin Jeanne
Quote:
Original post by levjs
Is there some protection method where you make a file unreadable execpt to a specific process?

Maybe if you use CreateFile() to open the file and specify dwShareMode as 0. You'll have to leave the file open for as long as you dont want others to access it.

This however, wont stop people. You can always grab one of the nice programs from Sysinterals, kill the file handle owned by your program, then rename the temp file right under you.

If you make a file on the user's computer while running as that user then the user can do whatever they want with the file.
Zao
Zao
Windows needs exclusive access to a file it's executing, since it doesn't have to load all of the executable into memory to execute it. It has the right to load parts of the file at any time during execution.

Modifying the file, which includes encryption which requires exclusive access, while running would give disastrous results.

I'm unsure, but I believe that the Windows API has some kind of temporary file creation, which would delete the file automagically when all handles are removed to it.
To make it is hell. To fail is divine.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.