MSFN Forum: cmd to exe possible? - MSFN Forum

Jump to content



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

cmd to exe possible? Rate Topic: -----

#1 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 26 September 2004 - 07:15 AM

hi
i have a cmd and want it to be convert to a exe
the code below is for excuting for a exe
on a cd with out knowing the cd drive letter.and works 100%
because the cmd icon is ugly i want a exe with a nice icon
the cmd is copyt during the install of windows xp to the desktop

is this poseble,can somone help me with this? :}
cmdow @ /HID
@echo off
ECHO.
for /f "tokens=3" %%i IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" ^| findstr "REG_SZ"') do set SOURCE=%%i
SET SOURCE=%SOURCE:~0,2%
%SOURCE%\install\soft.EXE 

EXIT


thanks for reading this


#2 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 26 September 2004 - 07:56 AM

There's any number of tools which can do this! Searching for it on google will give hundreds of good results. Moreover, compiling a batch file into executable will speed up what it does too.

Attached is one such compiler, test it first before deciding that it works properly.

Attached File(s)



#3 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 26 September 2004 - 08:33 AM

thanks prathapml works
but how to insert a icon file?

#4 User is offline   Bâshrat the Sneaky 

  • aka Wim Leers
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,214
  • Joined: 29-October 03
  • OS:none specified
  • Country: Country Flag

Posted 26 September 2004 - 08:51 AM

Hmm, nice! Can be helpful for me too :)

Maybe a dumb question, but is it possible to merge everything together? Like this:

------------------------------
batch.cmd------------------
commands_and_stuff.txt-- >>>> Mini-program.exe
------------------------------

This is not possible with IExpress, as far as I know...

#5 User is offline   RyanVM 

  • Like a big surly teddy bear.
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,661
  • Joined: 31-August 03

Posted 26 September 2004 - 10:20 AM

sixpack, on Sep 26 2004, 10:33 AM, said:

thanks prathapml works
but how to insert a icon file?

Google Resource Hacker

#6 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 26 September 2004 - 10:30 AM

Quote

Google Resource Hacker


nope doesent work
tryed it

#7 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 26 September 2004 - 11:01 AM

huh?
Whatcha mean? Resource Hacker 3.4
Get it, and open up the compiled EXE. Then edit the icon resource, and replace what is already there with another of equal number of bytes.

Does work!

#8 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 26 September 2004 - 11:23 AM

Quote

huh?
Whatcha mean?


there is nothing to edit:

Attached File(s)



#9 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 26 September 2004 - 11:29 AM

Well, then - I dunno! Ideas anyone?

#10 User is offline   Innominandum 

  • Group: Members
  • Posts: 9
  • Joined: 15-October 04

Posted 22 October 2004 - 06:50 AM

It won't work with resource hacker or any resource editing program,
because the executable that bat2exe makes is a DOS program not just a console program. So no luck there.
You can try Batch File Compiler (google it) but I haven't tried it so I can really say for sure.

Any way , good luck and if you find anything post it here so we all learn the trick.

#11 User is offline   radhus 

  • Newbie
  • Group: Members
  • Posts: 41
  • Joined: 06-April 04

Posted 22 October 2004 - 07:03 AM

Did you get any error messages when you opened tha file?
If not:
Use some of the menus and choose insert or something, insert an icon and name it 1 i think. Try that...

#12 User is offline   Innominandum 

  • Group: Members
  • Posts: 9
  • Joined: 15-October 04

Posted 22 October 2004 - 08:32 AM

I don't think that will work because the executable doesn't have any code to handle resources. Doing this you will probably damage the file.

But then again, you won't know until you try.

#13 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 22 October 2004 - 08:49 AM

Innominandum, on Oct 22 2004, 03:32 PM, said:

I don't think that will work because the executable doesn't have any code to handle resources. Doing this you will probably damage the file.

But then again, you won't know until you try.

try it no luck
well i have a workaround
i did pack it up in a sfx rar file and give it a nice icon :)

#14 User is offline   Innominandum 

  • Group: Members
  • Posts: 9
  • Joined: 15-October 04

Posted 22 October 2004 - 10:41 AM

sixpack, on Oct 22 2004, 08:49 AM, said:

try it no luck
well i have a workaround
i did pack it up in a sfx rar file and give it a nice icon :)

Clever :)

#15 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 27 November 2004 - 05:46 AM

i have now Quick Batch File Compiler
this one hase resources
but i dunno how to ad the icon resource, if i at one and save it it does not diplay the icon
btw the icon resoursrce is in the exe file but the name is 0
and i can not change it :(

Ideas anyone?

Attached File(s)



#16 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 27 November 2004 - 07:15 AM

The icon resource that you want to replace it with has to be of the same file-size and color-depth.

#17 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 27 November 2004 - 07:25 AM

prathapml, on Nov 27 2004, 02:15 PM, said:

The icon resource that you want to replace it with has to be of the same file-size and color-depth.

i know but there is no icon resource
i must ad it that's my problem
and when i'm done it doesend show the icon
the file 0, i guess i must ad a string or something like that

Share this topic:


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



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy