Jump to content
Sign in to follow this  
vengat

covert jpg , avi , mp3 , amr and bat files to exe

Recommended Posts

vengat

hi guys , i have created this exe creator , using this one can convert jpg , avi ,mp3 ,amr and bat files into executables . I use Aut2Exe.exe which comes with auto it setup used for creating executables from auto it source code .

Steps for using :

Select the file to be converter to exe

give the name of the exe file to which it must be converted .

press ok then give the name of the exe file to be saved , then press ok to create the executables .

Download location is

http://rapidshare.com/files/215974936/Exe_converter.exe

please try and post up your feedback

for main program the source is

main.au3

#Include <File.au3>
#include <Process.au3>
#Region ### START Koda GUI section ### Form=
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#NoTrayIcon

#Region ### START Koda GUI section ### Form=d:\setup\koda_2008-03-20\forms\execreator.kxf
$Form1_1 = GUICreate("Exe creator", 438, 259, 193, 125)
$Label1 = GUICtrlCreateLabel("--------Portable EXE Creator--------", 96, 8, 237, 24)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
$Edit1 = GUICtrlCreateEdit("", 8, 48, 393, 105)
GUICtrlSetData(-1, StringFormat("Exe creator ...\r\n\r\nThis software can covert jpg , avi , mp3 , amr and bat  files to exe    .\r\nThis software is provided without any warrenty , the authour \r\nis not responsible for any damage or misuse caused ..."))
$Button1 = GUICtrlCreateButton("Start", 16, 176, 161, 41, 0)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("About", 216, 176, 169, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Button1
    start()
Case $Button2
    MsgBox(0,"About",StringFormat("Program version 1.01\r\nDesign and created by vengadanathan\r\nfor more info pls contact\r\nfantastic.next@gmail.com"))
EndSwitch
WEnd

Func start()
    $a = FileOpenDialog("Select the files to be converted into exe ","", "Supported Files (*.jpg;*.avi;*.bat;*.mp3) ",1)
;ConsoleWrite("hai"&$a)
    If $a <> "" Then
    $k = InputBox("Enter the name ","enter the name of the file say hai.jpg , hello.mp3 which will be name of the file packed within the exe file ")
    EndIf
    if @error <> 1  Then
        
        operate($a,$k)
    EndIf
    
EndFunc

func  operate($a,$k)
$o = _FileWriteToLine(@ScriptDir&"\data.au3", 1,"FileInstall("""&$a&""""&","&""""&@TempDir&"/"&$k&" "")",1)
$o = _FileWriteToLine(@ScriptDir&"\data.au3",2 ,"ShellExecute("""&@TempDir&"/"&$k&""")",1)
;MsgBox(0,@ScriptFullPath&"hai.txt",@error)
If $o <> 0 Then
    excecute()
Else
    MsgBox(0,"Error","Reinstalling this application may fix this problem")
    EndIf
EndFunc


Func excecute()
    $t = FileGetShortName(@ScriptDir&"\data.au3")
    $out = FileSaveDialog("Enter the executable file name ","","Exe files (*.exe)",16)
    $out = $out&".exe"
    $r = FileOpen($out,1)
    FileClose($r)
    $out = FileGetShortName($out)
;$g = Run(@ScriptDir&"\Aut2Exe.exe /in "&@ScriptDir&"\data.au3 /out "&$out,"")
    $g = Run(@ScriptDir&"\Aut2Exe.exe /in "&$t&" /out "&FileGetShortName($out),"")
    ConsoleWrite(@ScriptDir&"\Aut2Exe.exe /in "&$t&" /out "&FileGetShortName($out))
    If $g == 0  Then
        MsgBox(0,"Error","Reinstalling this application may fix this problem")
    
Else
    MsgBox(0,"Success","Exe created ")
    EndIf
    EndFunc

before executing this script , please place an empty file data.au3 on same folder and also place Aut2exe.exe and icons folder(from auto it installation folder) on the same folder .

Edited by vengat

vengat , cool of all

Share this post


Link to post
Share on other sites
WideBoyDixon

Blah blah ... not going to run an EXE ... blah blah ... virtual machine ... etc.

Before I delve in to this a little more, why would I want to create an EXE from a JPG?

WBD

Share this post


Link to post
Share on other sites
torels

1) Always Post your code or very few people will be running the EXE

2) It's quite pointless

3) Your'e reinventing the wheel. Win+R>Iexpress.exe compressed with the file you want to compress + a VERY simple bat file does the work!

I wrote this because I didn't see your code and I'm definetly NOT running the exe...

I could change idea by seeing the code... maybe it actually is something very good ^_^


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites
vengat

for main program the source is

main.au3

#Include <File.au3>
#include <Process.au3>
#Region ### START Koda GUI section ### Form=
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#NoTrayIcon

#Region ### START Koda GUI section ### Form=d:\setup\koda_2008-03-20\forms\execreator.kxf
$Form1_1 = GUICreate("Exe creator", 438, 259, 193, 125)
$Label1 = GUICtrlCreateLabel("--------Portable EXE Creator--------", 96, 8, 237, 24)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
$Edit1 = GUICtrlCreateEdit("", 8, 48, 393, 105)
GUICtrlSetData(-1, StringFormat("Exe creator ...\r\n\r\nThis software can covert jpg , avi , mp3 , amr and bat  files to exe    .\r\nThis software is provided without any warrenty , the authour \r\nis not responsible for any damage or misuse caused ..."))
$Button1 = GUICtrlCreateButton("Start", 16, 176, 161, 41, 0)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("About", 216, 176, 169, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Button1
    start()
Case $Button2
    MsgBox(0,"About",StringFormat("Program version 1.01\r\nDesign and created by vengadanathan\r\nfor more info pls contact\r\nfantastic.next@gmail.com"))
EndSwitch
WEnd

Func start()
    $a = FileOpenDialog("Select the files to be converted into exe ","", "Supported Files (*.jpg;*.avi;*.bat;*.mp3) ",1)
;ConsoleWrite("hai"&$a)
    If $a <> "" Then
    $k = InputBox("Enter the name ","enter the name of the file say hai.jpg , hello.mp3 which will be name of the file packed within the exe file ")
    EndIf
    if @error <> 1  Then
        
        operate($a,$k)
    EndIf
    
EndFunc

func  operate($a,$k)
$o = _FileWriteToLine(@ScriptDir&"\data.au3", 1,"FileInstall("""&$a&""""&","&""""&@TempDir&"/"&$k&" "")",1)
$o = _FileWriteToLine(@ScriptDir&"\data.au3",2 ,"ShellExecute("""&@TempDir&"/"&$k&""")",1)
;MsgBox(0,@ScriptFullPath&"hai.txt",@error)
If $o <> 0 Then
    excecute()
Else
    MsgBox(0,"Error","Reinstalling this application may fix this problem")
    EndIf
EndFunc


Func excecute()
    $t = FileGetShortName(@ScriptDir&"\data.au3")
    $out = FileSaveDialog("Enter the executable file name ","","Exe files (*.exe)",16)
    $out = $out&".exe"
    $r = FileOpen($out,1)
    FileClose($r)
    $out = FileGetShortName($out)
;$g = Run(@ScriptDir&"\Aut2Exe.exe /in "&@ScriptDir&"\data.au3 /out "&$out,"")
    $g = Run(@ScriptDir&"\Aut2Exe.exe /in "&$t&" /out "&FileGetShortName($out),"")
    ConsoleWrite(@ScriptDir&"\Aut2Exe.exe /in "&$t&" /out "&FileGetShortName($out))
    If $g == 0  Then
        MsgBox(0,"Error","Reinstalling this application may fix this problem")
    
Else
    MsgBox(0,"Success","Exe created ")
    EndIf
    EndFunc

before executing this script , please place an empty file data.au3 on same folder and also place Aut2exe.exe and icons folder(from auto it installation folder) on the same folder .

Edited by vengat

vengat , cool of all

Share this post


Link to post
Share on other sites
BigDod

Before anyone else chimes in about not running an exe without seeing source please read This Topic



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites
torels

Interesting ^_^

I keep thinking that Running Iexpress is better but your example is not bad ;)

cheers


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites
youknowwho4eva

Well technically they weren't asking for the source. They were stating that they wouldn't run a program from someone with 9 posts that has no status on the forum. Personally I would have passed this one by, but if it sounded like a program I'd be interested in, I would have stated that it sounds like a good idea, but I wouldn't try it without a source code. They were just showing interest, but stating how to catch more of their attention and most others on this forum.


Giggity

Share this post


Link to post
Share on other sites
torels

Well technically they weren't asking for the source. They were stating that they wouldn't run a program from someone with 9 posts that has no status on the forum. Personally I would have passed this one by, but if it sounded like a program I'd be interested in, I would have stated that it sounds like a good idea, but I wouldn't try it without a source code. They were just showing interest, but stating how to catch more of their attention and most others on this forum.

exactly ^_^

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites
snowman533

what do u guys mean by no source code its right there, lol


Intermediate AutoIt/Autohotkey User

Share this post


Link to post
Share on other sites
Creator

For all the hyper-frightened ppl in here. I always use sandboxie(www.sandboxie.com) to run/install stuff i don't really trust (yet).

Cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×