AutoIt Forums: covert jpg , avi , mp3 , amr and bat files to exe - AutoIt Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

covert jpg , avi , mp3 , amr and bat files to exe Rate Topic: -----

#1 User is offline   vengat 

  • Member
  • Icon
  • Group: Banned
  • Posts: 12
  • Joined: 04-June 08

Post icon  Posted 23 April 2009 - 01:28 PM

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


[ code='text' ]    ( ExpandCollapse - Popup )
#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 .

This post has been edited by vengat: 23 April 2009 - 02:40 PM


#2 User is offline   WideBoyDixon 

  • Code Monkey
  • PipPipPipPip
  • Group: Full Members
  • Posts: 381
  • Joined: 09-February 09
  • Gender:Male
  • Location:Sheffield, UK

Posted 23 April 2009 - 01:59 PM

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

#3 User is offline   torels 

  • I Hacked 127.0.0.1! :D
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 666
  • Joined: 17-January 08
  • Location:Rome

Posted 23 April 2009 - 02:19 PM

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 :)

#4 User is offline   vengat 

  • Member
  • Icon
  • Group: Banned
  • Posts: 12
  • Joined: 04-June 08

Posted 23 April 2009 - 02:36 PM

for main program the source is

main.au3


[ code='text' ]    ( ExpandCollapse - Popup )
#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 .

This post has been edited by vengat: 23 April 2009 - 02:38 PM


#5 User is offline   BigDod 

  • Do You Wanna Laugh With My Avatar?"
  • PipPipPipPipPipPipPipPip
  • Group: Full Members
  • Posts: 7,246
  • Joined: 02-August 05
  • Gender:Male
  • Location:Aberdeenshire, Scotland

Posted 23 April 2009 - 05:51 PM

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

#6 User is offline   torels 

  • I Hacked 127.0.0.1! :D
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 666
  • Joined: 17-January 08
  • Location:Rome

Posted 23 April 2009 - 06:10 PM

Interesting :)
I keep thinking that Running Iexpress is better but your example is not bad :P

cheers

#7 User is offline   youknowwho4eva 

  • Giggity Giggity Goo
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 710
  • Joined: 02-July 08
  • Location:Maryland

Posted 23 April 2009 - 06:14 PM

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.

#8 User is offline   torels 

  • I Hacked 127.0.0.1! :D
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 666
  • Joined: 17-January 08
  • Location:Rome

Posted 23 April 2009 - 06:45 PM

View Postyouknowwho4eva, on Apr 23 2009, 07:14 PM, said:

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 :P

#9 User is offline   snowman533 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 90
  • Joined: 01-April 09

Posted 23 April 2009 - 10:54 PM

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

#10 User is offline   Creator 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 129
  • Joined: 06-September 06
  • Location:The Netherlands

Posted 24 April 2009 - 11:48 AM

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

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users