Abyssmedia.com Forum Index Abyssmedia.com
Abyssmedia Support Forums
 
  FAQ    Search    Memberlist    Usergroups   Register 
  Profile    Log in to check your private messages    Log in 

About the "Include" feature! - How to use the "Include" feature? :S

 
Post new topic   Reply to topic    Abyssmedia.com Forum Index -> Quick Batch File Compiler
View previous topic :: View next topic  
Author Message
SuperMan



Joined: 06 Dec 2006
Posts: 1

PostPosted: Wed Dec 06, 2006 5:26 pm    Post subject: Reply with quote

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
Back to top
Oleg Tsheglov
Site Admin


Joined: 13 Feb 2004
Posts: 309

PostPosted: Fri Dec 08, 2006 9:57 pm    Post subject: Reply with quote

Yes, you can embedd some files into EXE. For example, you can embedd another script with subroutines,
pictures, HTML files, help files. Before execution this files will be decompressed to %MYFILES% folder
and will be automatically deleted whan script finished.

call %MYFILES%\help.html
Back to top
Michael Lee
Guest





PostPosted: Tue Dec 12, 2006 10:14 pm    Post subject: Reply with quote

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
Back to top
Wayne.o



Joined: 16 Jun 2006
Posts: 5

PostPosted: Mon Dec 18, 2006 4:38 pm    Post subject: Reply with quote

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
Back to top
Michael Lee
Guest





PostPosted: Tue Dec 19, 2006 5:43 am    Post subject: Reply with quote

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
Back to top
Wayne.o



Joined: 16 Jun 2006
Posts: 5

PostPosted: Tue Dec 19, 2006 6:53 pm    Post subject: Reply with quote

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
Back to top
Michael Lee
Guest





PostPosted: Wed Dec 20, 2006 6:02 pm    Post subject: Reply with quote

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
Back to top
HelperGuest
Guest





PostPosted: Thu Dec 28, 2006 9:19 pm    Post subject: Reply with quote

just use:
Code:
@echo off
START /MAX %MYFILES%\program.exe

You dont need any thing else, because everything included gets unpacked to %myfiles% no matter what.
Back to top
LiL_Stenly
Guest





PostPosted: Thu Jan 11, 2007 3:36 am    Post subject: Reply with quote

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 !
Back to top
Oleg Tsheglov
Site Admin


Joined: 13 Feb 2004
Posts: 309

PostPosted: Thu Jan 11, 2007 5:54 am    Post subject: Reply with quote

Guest wrote:
Can you tell me , is there have other way ... i want to put my screen.exe in the same dir where is install.exe ?

This is non-safe way, in some cases you will have no permissions to save files into current folder. For example, if your executable placed on cd-rom.
Back to top
LiL_Stenly
Guest





PostPosted: Sat Jan 27, 2007 9:04 am    Post subject: Reply with quote

Yeah i know thats not safe but could you tell me how to make it !
Back to top
Oleg Tsheglov
Site Admin


Joined: 13 Feb 2004
Posts: 309

PostPosted: Sat Jan 27, 2007 5:52 pm    Post subject: Reply with quote

Just copy extracted files to the current folder:

copy %MYFILES%\some.file %CD%\some.file
Back to top
LiL_Stenly
Guest





PostPosted: Mon Jan 29, 2007 6:41 pm    Post subject: Reply with quote

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 !
Back to top
Oleg Tsheglov
Site Admin


Joined: 13 Feb 2004
Posts: 309

PostPosted: Thu Feb 01, 2007 2:17 am    Post subject: Reply with quote

You can search at this forum, yes this is false positive. Time by time our compiler detected as trojan
and we sent false positive report to antivirus developer. Not all developers removed compiler from
virus definitions database. As I know, AVG and McAfee still detect our compiler as trojan...
Back to top
LiL_Stenly
Guest





PostPosted: Sun Feb 18, 2007 3:33 pm    Post subject: Reply with quote

And there is no any risk for my PC !
Thank you for the answer !
And sorry about offtopic !
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Abyssmedia.com Forum Index -> Quick Batch File Compiler All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2011 phpBB Group