Install program
My question pertains to deleting the installation file of a game. I wrote my own install program, but I would like to know how, in Windows 9x/NT, to delete the install program (Install.exe) once it has completed running?
In all the games I have ever installed........it was left up to me to delete the Install.exe
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
I guess I didn''t quite explain myself properly. I wrote a game and my own custom install program (called Install.exe). After it finishes installing the files to their new location, I would like the Install.exe program to close and somehow delete itself. (The install program is located on the user''s local drive and should be deleted once it is done running, it''s not on a CD or anything, where this question wouldn''t even be pertinent.)
If you could get to ring 0 of the Windows OS, you got it. First use VxdBootRingLevel() to go to OS_RING0 and then use the UseDebugEventEx() to wait for the code EXIT_PROCESS and check that the process id is the same as your install program''s process id. Then if it is, use GetModuleFileName() to get the file path and name, then its simply deleting the file.
THEN, you have to use ResetOSSystemTables() to remove any changes you''ve done, then use VxdBootRingLevel() to OS_RING3 (where programs run) and then use ExitProcess() to exit out... your file is deleted before your program ended, in a sense.
Enjoy!
- OldManDave.
THEN, you have to use ResetOSSystemTables() to remove any changes you''ve done, then use VxdBootRingLevel() to OS_RING3 (where programs run) and then use ExitProcess() to exit out... your file is deleted before your program ended, in a sense.
Enjoy!
- OldManDave.
Where are all those functions declared? I can''t find them, or how to use them anywhere? Do you have a short example of how to use them?
I don''t think you want to get into ring zero, for one thing that''s internal stuff and programs normally shouldn''t do that. Also, it would only work for Win9x, not NT, and it''s really complicated (or it seems).
Anyway, here''s a pretty informative article:
click here
If you want to know how I do it, I just use Windows Installer. That way I don''t even have to write my own installation programs, but it is hard and complicated to use.
Anyway, here''s a pretty informative article:
click here
If you want to know how I do it, I just use Windows Installer. That way I don''t even have to write my own installation programs, but it is hard and complicated to use.
Why not to create yet another exe that is started when install is about to close itself and which will ONLY wait for ten seconds or so and delete the install files...
Or simply, have your main program to delete unnecessary install files.
Or simply, have your main program to delete unnecessary install files.
Why would you want to delete the install executable. Perhaps the user wants to keep it.
-Andreas
-Andreas
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement