:
This message was edited by Digga at 2005-7-3 11:2:49
: I either don't understand or I'm doing it wrong. Maybe I need to tell you All what I'm doing. I am making a program that farts when the user double clicks on it. I gave the program a microsoft word icon. Now if I was to email this to a friend of mine, they would see that its an executable. I want it that the program say .doc at the end of it. Now also I think it would be neat to change the extensions. now I did the dos prompt thing and programed it. I just don't get it. Here's what I did.
:
:
:
: Microsoft Windows XP [Version 5.1.2600]
: (C) Copyright 1985-2001 Microsoft Corp.
:
: C:\WINDOWS>cd C:\Documents and Settings\Owner\Desktop
:
: C:\Documents and Settings\Owner\Desktop>ren MyProgram.exe MyProgram.doc
:
: C:\Documents and Settings\Owner\Desktop>
:
:
:
: When I do this it changes the extension. But when I click on the program it does not do what's its supposed to and it opens as a word document. Now if I make up a file extension such as .aaa it creates some file that when clicked on asks me that it cannot open it but would I like to open it with something else. Same thing happpens if you use the rename function or system function. Maybe I need to use that create process function. I just do not understand.
:
: Digga
:
:
:
Stober already explained that when you change the file extension, it will not work properly when clicked on in explorer. Explorer obviously uses the file extension to figure out how to open a file, and if you rename it to a .doc file, then explorer will always open it up in wordpad.
You can run the renamed program as usual only if you start it programatically or if you run it from the command prompt (type MyProgram.doc at the command line and it will run properly) but it just wont work like that in explorer.
You cannot just change the file extension and send it to a friend hoping that he sees MyProgram.doc and thinks it's a document, but when he clicks on it, it will run as an executable. That would be a bad thing and if it were that easy then hackers would have an easy time infecting everyone's computer.
Now there are a few other file extensions that you could use which will run as executables when clicked on (try renaming it to a .pif) but there is no way to hide it as a .doc or a .bmp
To understand recursive, first you need to understand recursive