About the "Include" feature! - How to use the "Include" feature? :S
Hi,
I wanna now how to use the include feature! I understand it give you the possibility to add external files to the exe, but I don't know what's that for? :S ... I think, may be wrong, that feature let you add external files, and work with them (open, etc) while they are in the same exe, but I don't know how to call them in the batch! :S
I will appreciate all the information you provide about this topic! :laugh:
Thank you!
Carlos
I wanna now how to use the include feature! I understand it give you the possibility to add external files to the exe, but I don't know what's that for? :S ... I think, may be wrong, that feature let you add external files, and work with them (open, etc) while they are in the same exe, but I don't know how to call them in the batch! :S
I will appreciate all the information you provide about this topic! :laugh:
Thank you!
Carlos
-
- Site Admin
- Posts: 307
- Joined: Fri Feb 13, 2004 5:55 pm
- Contact:
I am trying very hard to make the %MYFILES% command work for me. I wish to include a small required dll and a help file with my executable and am using the following syntax. The generated executable runs fine using the included dll, but then the batch file wants to run the dll separately. What syntax should I use so that the dll (and help file) is not run, but only put in the %MYFILES% folder? Thank you
@echo off
START /MAX %MYFILES%\program.exe
%MYFILES%\program.dll
%MYFILES%\program.chm
@echo off
START /MAX %MYFILES%\program.exe
%MYFILES%\program.dll
%MYFILES%\program.chm
Michael Lee -
Your problem has a very simple explanation and an equally simple solution. Just like you cannot just "open" a "bat" file or "cmd" file in Windows Explorer (you have to choose the "Edit" option instead) without the script executing; you cannot just reference them in a parent "bat" file without them executing. Just rename your included DLL to something like "program.dlx"; this will mean nothing to the Windows shell and will be ignored; hence it will extract into the %MYFILES% directory without incident. Then just reference the same file with a rename. So your code will look like this:
@echo off
%MYFILES%\program.dlx
%MYFILES%\program.chm
rename %MYFILES%\program.dlx %MYFILES%\program.dll
START /MAX %MYFILES%\program.exe
Also, you will want to invoke your executable after the extraction and rename, not before.
I hope this helps,
Wayne
Your problem has a very simple explanation and an equally simple solution. Just like you cannot just "open" a "bat" file or "cmd" file in Windows Explorer (you have to choose the "Edit" option instead) without the script executing; you cannot just reference them in a parent "bat" file without them executing. Just rename your included DLL to something like "program.dlx"; this will mean nothing to the Windows shell and will be ignored; hence it will extract into the %MYFILES% directory without incident. Then just reference the same file with a rename. So your code will look like this:
@echo off
%MYFILES%\program.dlx
%MYFILES%\program.chm
rename %MYFILES%\program.dlx %MYFILES%\program.dll
START /MAX %MYFILES%\program.exe
Also, you will want to invoke your executable after the extraction and rename, not before.
I hope this helps,
Wayne
Wayne:
Thank you very much for your good suggestion. It seems very logical and reasonable. I did exactly as you suggested. The situation is if one does this then Windows gives back a box stating "Windows cannot open this file: File: Program.dlx ...Windows needs to know what program created it... ...What do you want to do?...Use the Web service..."
You know -- the same box that Windows generates whenever it doesn't recognize an extension.
So...I'm sure you are on the right track (not to belittle your suggestion), but maybe there is just one more thing (step) we've overlooked??
Thanks again and I hope you'll help me further.
Michael
Thank you very much for your good suggestion. It seems very logical and reasonable. I did exactly as you suggested. The situation is if one does this then Windows gives back a box stating "Windows cannot open this file: File: Program.dlx ...Windows needs to know what program created it... ...What do you want to do?...Use the Web service..."
You know -- the same box that Windows generates whenever it doesn't recognize an extension.
So...I'm sure you are on the right track (not to belittle your suggestion), but maybe there is just one more thing (step) we've overlooked??
Thanks again and I hope you'll help me further.
Michael
Michael -
This time I created a little script to simulate what you are trying to do and came across exactly what you described. One of the reasons I did not come across your error before is that I run all of my scripts in "blind" mode; that is, they are not interactive like yours and because of that, I have never been prompted for an associated program for any included file no matter what the extension. However, I think the following may do just the trick for you:
@echo off
del /Q %MYFILES%\program.* >NUL
%MYFILES%\program1.dlx >NUL
%MYFILES%\program2.dlx >NUL
rename %MYFILES%\program1.dlx program.dll >NUL
rename %MYFILES%\program2.dlx program.chm >NUL
START /MAX %MYFILES%\program.exe
But first, open up Windows Explorer and create a new file type by selecting TOOLS, then FOLDER OPTIONS and finally select the FILE TYPES tab. Select the NEW button and key in DLX or some other unspecified extension. Then click the OK button. Now, one more step; select the new file extension that you just created and select the CHANGE button next to verbiage "Opens with:". You will get a dialog that stats "windows cannot open this file:" (sound familiar) and will prompt you "What do you want to do?". Then select the radio button next to "Select the program from a list" and click OK. Choose the BROWSE button and type in the "File name:" box "%WINDIR%\system32\attrib.exe" without the quotes. Then just click the OPEN button and finally the OK button. You are done. You have just created a "dummy" file extension that whenever windows encounters it will harmlessly display each file's attributes in a DOS box.
Then rename your "program.dll" and "program.chm" to "program1.dlx" and "program2.dlx" which will be no problem since you are going to rename them anyway. The "del" statement will remove your "program.dll" and "program.chm" since QBFC will only remove their "dlx" counterparts. The "NUL"s will suppress any extraneous output.
Good luck,
Wayne
Edited By Wayne.o on 1166554525
This time I created a little script to simulate what you are trying to do and came across exactly what you described. One of the reasons I did not come across your error before is that I run all of my scripts in "blind" mode; that is, they are not interactive like yours and because of that, I have never been prompted for an associated program for any included file no matter what the extension. However, I think the following may do just the trick for you:
@echo off
del /Q %MYFILES%\program.* >NUL
%MYFILES%\program1.dlx >NUL
%MYFILES%\program2.dlx >NUL
rename %MYFILES%\program1.dlx program.dll >NUL
rename %MYFILES%\program2.dlx program.chm >NUL
START /MAX %MYFILES%\program.exe
But first, open up Windows Explorer and create a new file type by selecting TOOLS, then FOLDER OPTIONS and finally select the FILE TYPES tab. Select the NEW button and key in DLX or some other unspecified extension. Then click the OK button. Now, one more step; select the new file extension that you just created and select the CHANGE button next to verbiage "Opens with:". You will get a dialog that stats "windows cannot open this file:" (sound familiar) and will prompt you "What do you want to do?". Then select the radio button next to "Select the program from a list" and click OK. Choose the BROWSE button and type in the "File name:" box "%WINDIR%\system32\attrib.exe" without the quotes. Then just click the OPEN button and finally the OK button. You are done. You have just created a "dummy" file extension that whenever windows encounters it will harmlessly display each file's attributes in a DOS box.
Then rename your "program.dll" and "program.chm" to "program1.dlx" and "program2.dlx" which will be no problem since you are going to rename them anyway. The "del" statement will remove your "program.dll" and "program.chm" since QBFC will only remove their "dlx" counterparts. The "NUL"s will suppress any extraneous output.
Good luck,
Wayne
Edited By Wayne.o on 1166554525
Wayne:
You are a patient man. Thank you.
I systematically followed your steps and while my first attempt seems to have failed (I'm getting errors like: "The system cannot find the file specified") I will continue to try, retracing my steps to resolve the issue.
Again, thank you. I think I may have to pick up where I left off after the holidays. Best wishes to you and yours!
Michael
You are a patient man. Thank you.
I systematically followed your steps and while my first attempt seems to have failed (I'm getting errors like: "The system cannot find the file specified") I will continue to try, retracing my steps to resolve the issue.
Again, thank you. I think I may have to pick up where I left off after the holidays. Best wishes to you and yours!
Michael
just use:
You dont need any thing else, because everything included gets unpacked to %myfiles% no matter what.
Code: Select all
@echo off
START /MAX %MYFILES%\program.exe
I want to insert a program in my .exe !
Install.exe %MYFILES%\screen.exe
But screen.exe was greated in "C:\Documents and Settings\USER\Local Settings\Application Data" directory !
Can you tell me , is there have other way ... i want to put my screen.exe in the same dir where is install.exe ?
Thanks in advance !
Install.exe %MYFILES%\screen.exe
But screen.exe was greated in "C:\Documents and Settings\USER\Local Settings\Application Data" directory !
Can you tell me , is there have other way ... i want to put my screen.exe in the same dir where is install.exe ?
Thanks in advance !
-
- Site Admin
- Posts: 307
- Joined: Fri Feb 13, 2004 5:55 pm
- Contact:
-
- Site Admin
- Posts: 307
- Joined: Fri Feb 13, 2004 5:55 pm
- Contact:
Im so sorry about the stupid question that i will ask you , but is there have any trojan in the compiled exe files !
One my friend tell me that i have trojan in exe !
Now i scan with AVG and i found trojan in every exe compiled with this program and now i downloaded the program again to be sure but antivirus still show the warnning message in compiled exe files ... please tell me that not true !
One my friend tell me that i have trojan in exe !
Now i scan with AVG and i found trojan in every exe compiled with this program and now i downloaded the program again to be sure but antivirus still show the warnning message in compiled exe files ... please tell me that not true !
-
- Site Admin
- Posts: 307
- Joined: Fri Feb 13, 2004 5:55 pm
- Contact: