Jump to content

cmd to exe


atomic
 Share

Recommended Posts

Hey,

I've made my own . cmd for the switchblade thingy.  I want to compile it to an . exe so it will run silenced.  I tried to compile my . cmd with the trial version of exescript, but that doesn't work.  The cmd screen is still being popupped and it doesnt even work.  What could I've done wrong? Is there another free compiler which might work? And if possible, would someone else, who knows how to do it, compile my cmd to a silenced exe file?

Cheers

Link to comment
Share on other sites

Hi!

I think that it isn't possible to convert a .cmd to a .exe, maybe to a .com.

But you can use CMDOW

Info:

CMDOW is known by some virus scanners as a virus because it can hide windows, but I'm using it since I create Unattended Cd's and I haven't any problems til yet.

Regards

Obi-Wahn

Link to comment
Share on other sites

Ah I see. Well I don't really understand how you use CMDOW. Also I don't know much about how to make this kind of stuff. Would it take long to write something like it (the exe)? and could someone help me with it then?

Link to comment
Share on other sites

I've found two solutions to this problem, first using CMDOW second using a .vbs each have their own drawbacks so ill show you both ways.

Using CMDOW: Instead of changing the autorun file make the first line of the .cmd...

CMDOW @ /HID

The '@' symbol refers to the current window, which would be your .cmd the major draw back with this is that AV detect CMDOW as a virus and restrict access.

Using .vbs: This is the option i use because AV don't stop it, Change the autorun to...

shellexecute=wscript go2.vbs

And then create a .vbs and save as go2.vbs

CreateObject("Wscript.Shell").Run """" & "DIRECTORYgo.cmd" & """", 0, False

I have had a few problems with this, on some computers the.vbs wont run properly but for the most part it works well.

EDIT - Just searching through the old topics i found this,

hmm okay, so i still dont see y u want to make it but http://www.abyssmedia.com/quickbfc/ is a link to a .bat compiler, it will make ur .bat/.cmd and make it an .exe though u will need to keep a copy of the original .bat as it is hard to decompile the .exe made.

I havent taken a look at this but it sounds like what you were originally looking for.

Link to comment
Share on other sites

Good Morning.

@GonZor:

I've tried with a simple batch. U can choose 2 options. Shell and Silent batch. However if you make a Silent .exe, a Messagebox appears, and if u use Shell style, u have to hit any key.

BTW: If you use the regular download (Download-Section, Ver 2.1.5.0) there are a Trojan horse detected (it's a wrong warning). But in their forums they have discussed this issue, and they've fixed it (SEE HERE)

to cmdow: I think you should use the /RUN command, because (on my machine) a console window appears for less than a sec, but you'll recognize it.

Link to comment
Share on other sites

Ah ye, the CMDOW @ /HID thing on the first line of the .cmd works. But it will show the console window for like a half of a second. If I add 'RUN' in it, the window will stay.

The compiler works fine, but it will show a popup saying it's a demo =/..

Link to comment
Share on other sites

Yeah as i said i just found the compiler when looking through old topics, so i wasn't sure how well it would work (but deveant usually has good ideas so i thought id post it) and as for the CMDOW option i prefer the .vbs simply because it works on my target machines just not on my home machines... Which i guess is a good thing it just makes testing hard.

Link to comment
Share on other sites

you don't use this batch in a .u3p Package, right?

cause if it is so, you can use in the manifest file.

the string would be:

<appStart cmd="%U3_APP_DATA_PATH%cmdow.exe /RUN /HID yourbatch.bat"></appStart>

else if you use shellexecute:

shellexecute=cmdow.exe /RUN /HID go.cmd

but this codes need to have the batch into the same folder as the cmdow.exe

Link to comment
Share on other sites

That's really odd because it doesnt work. I got both cmdow.exe and go.exe files in the same folder:

systemCMD

and when I do

shellexecute=systemCMDcmdow /RUN /HID go.cmd

it doesnt work, it doesnt make a log

but it does work with:

shellexecute=systemCMDgo.cmd

Don't know how to make a .u3p package  :-P, I neither don't know how to make a  .vbs

Link to comment
Share on other sites

I've done a google search and ms support says that shellexecute searches in HKEY_LOCAL_ROOT for the extention of the program, that is associated to a method of execution.

So try:

shellexecute=systemCMDcmdow.exe /RUN /HID go.cmd

PS.: There are several ways to create a u3p package. On the U3 Homepage is a developer package downloadable (after a registration) or you can download a small program called PackageFactory from http://www.eure.ca/ to build simple u3p packages.

Link to comment
Share on other sites

Don't know how to make a .u3p package  :-P, I neither don't know how to make a  .vbs

I don't know about the U3 package since i dont actually own one but you make a .vbs the same way you would make a batch file, open up notepad write your code (or in this case copy the code from above) and save as *.vbs

Link to comment
Share on other sites

Okay thanks =). Just one little question. I got everything in system/cmd/ so what should I change with these lines?

shellexecute=wscript go2.vbs

CreateObject("Wscript.Shell").Run """" & "DIRECTORYgo.cmd" & """", 0, False

Do I still need the go.cmd?

Link to comment
Share on other sites

Okay thanks =). Just one little question. I got everything in system/cmd/ so what should I change with these lines?

shellexecute=wscript go2.vbs

CreateObject("Wscript.Shell").Run """" & "DIRECTORYgo.cmd" & """", 0, False

Do I still need the go.cmd?

Yep change them to...

shellexecute=wscript go2.vbs

CreateObject("Wscript.Shell").Run """" & "systemcmdgo.cmd" & """", 0, False

where it said DIRECTORY just had to change it to your directory...

Link to comment
Share on other sites

I'm back again. got the batch compile working so I can make silenced exe files now. Now I got a new question.

I got this in my autorun.inf:

[autorun] 
icon=folder.ico
action=Open folder to view files
shellexecute=system/cmd/go.exe

When I plug the stick in, and I click on 'open folder to view files' or click on the station, it will run the go.exe. But I also want that it will open the window so I can get in the drive at the same time. What should I change in the autorun?

Link to comment
Share on other sites

I think the easies way is, to write a line into batchfile.

On first line write:

explorer .....

and -if the code starts- it should open a window with the root of your usb device

maybe it works also when you write (instead):

shellexecute=system/cmd/go.exe && %WinDir%explorer.exe .

Could work, if it works like a command prompt...

Link to comment
Share on other sites

When I plug the usbstick in, it will show 2 drives, one 'U3 system' and the other is the normal one where i can put my files on. Anyway, when I stick it in a window of the U3 system drive will show up, which is quite useless. How can I disable it, so it won't show the window of the U3 system anymore. The autorun of this drive is:

[AutoRun] 
open=LaunchU3.exe -a
icon=LaunchU3.exe,0 

[Definitions]
Launchpad=LaunchPad.exe
Vtype=2

[CopyFiles]
FileNumber=1
File1=LaunchPad.zip

[Update]
URL=http://u3.sandisk.com/download/lp_installer.asp?custom=1.4.0.3&brand=cruzer


[Comment]
brand=cruzer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...