China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-08 11:23
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 【Share】rar "compile" bat file to exe file View 3,997 Replies 26
Original Poster Posted 2008-04-28 19:18 ·  中国 陕西 西安 电信
银牌会员
★★★★
钻石会员
Credits 2,278
Posts 1,020
Joined 2007-11-19 13:34
18-year member
UID 103127
Gender Male
Status Offline
In fact, I have used this method for a long time. (This is much better than the quickbfc.exe software) I think some people are the same, just didn't share it with everyone.

Recently, I have given all the good things I can know until "nothing is left". (In fact, these can all be found in the cmd learning in my signature)

1. Right-click to add to the compressed file,
2. Create a self-extracting compressed file format,
3. Advanced,
4. Self-extracting options,
5. %tmp%, (can also fill in other absolute paths)
6. ,
7. ,
8. Mode, check the boxes at all hidden, overwrite all files,
(If you don't care about the one below the icon, it can be omitted)
9. Text and icon, add the absolute path of the icon to be loaded from the file to load the self-extracting file and icon.



10. If you want to encrypt, click set password in the advanced options. After this is encrypted, the first time it can only be brute-forced. No one can find the source code in the temporary path...

------------------------------------------------------------------------------------------------------------
Here is another small tool (written in assembly) bat2exec, which compiles bat into a com executable file. This tool is okay for simple code.

Download:http://upload.cn-dos.net/img/342.rar

[ Last edited by plp626 on 2008-4-29 at 11:01 PM ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
jonsonqf +2 2008-04-29 18:17
山外有山,人外有人;低调做人,努力做事。

进入网盘(各种工具)~~ 空间~~cmd学习
Floor 2 Posted 2008-04-28 19:20 ·  中国 北京 鹏博士BGP
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
Known a hundred years ago
Floor 3 Posted 2008-04-28 19:40 ·  中国 北京 华为云
银牌会员
★★★
Credits 1,436
Posts 739
Joined 2007-10-11 17:44
18-year member
UID 99469
Gender Male
Status Offline
Recently, I've given away all the good things I know until "nothing is left"


Can you release your bank password?

Hehe, just kidding.
Floor 4 Posted 2008-04-28 20:38 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Originally posted by plp626 at 2008-4-28 07:45 PM:
Almost graduated, the work has nothing to do with computers, and I have even less time to surf the Internet. I need to get something in return for what I've learned, otherwise I'll feel unworthy...


Respectable ideas and practices...
Floor 5 Posted 2008-04-28 20:47 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
Right-click and open with WINRAR...

Then why bother making it into an EXE?
Floor 6 Posted 2008-04-28 22:07 ·  中国 辽宁 锦州 联通
中级用户
★★
Credits 228
Posts 106
Joined 2008-04-26 12:34
18-year member
UID 117003
Gender Male
Status Offline
Originally posted by cad55 at 2008-4-28 08:38 PM:

Respected ideas and practices ...........



I share the same feeling!
Floor 7 Posted 2008-04-28 22:34 ·  中国 江苏 苏州 电信
初级用户
★★
Credits 195
Posts 93
Joined 2006-10-28 08:20
19-year member
UID 68626
Gender Male
Status Offline
I knew it before I learned p... And there's a last step the original poster didn't mention... Then change that exe suffix to bat.
Floor 8 Posted 2008-04-28 23:13 ·  中国 江西 赣州 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
Originally posted by slore at 2008-4-28 12:47 AM:
Right-click and open with WINRAR...

Then why make it an EXE?


Because you can put a beautiful icon on the EXE

You can take a look at this, you can directly add comments, no need to right-click step by step:
WinRAR Self-Extracting Command
Floor 9 Posted 2008-04-28 23:22 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
The icon of bat has been changed. The main thought is that there is no need for BAT to make EXE. The WINRAR command is still known.
Floor 10 Posted 2008-04-29 00:24 ·  中国 河南 郑州 联通
初级用户
★★
Credits 161
Posts 56
Joined 2007-10-01 00:42
18-year member
UID 98672
Gender Male
Status Offline
What you call EXE is a compressed file, right? Although running it directly and then running the BAT still leaves the unzipped BAT file! It would be nice not to have unzipped files! Or specify a place that can't be seen is also okay!
Floor 11 Posted 2008-04-29 09:11 ·  中国 江苏 扬州 江都区 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Originally posted by metoo at 2008-4-28 10:34 PM:
I knew it before I learned p... Also, the LZ didn't mention the last step... Then change that exe suffix to bat again.




That's right... You need to change EXE to BAT
Otherwise.. it would be interesting.
Floor 12 Posted 2008-04-29 11:56 ·  中国 湖南 娄底 电信
银牌会员
★★★
Credits 2,268
Posts 879
Joined 2006-12-19 16:23
19-year member
UID 73968
Gender Male
Status Offline
I am extremely, extremely, and incredibly grateful to the LZ for sharing!!!
Although some people knew about it 100 years ago, there are still people today after 100 years who don't know, and they are all grateful to you.
Maybe there will still be people who don't know after another 100 years, and there will still be a person like you then.
Not everyone understands these things from birth.
What does the LZ mean by saying he's leaving soon? Not coming anymore?
CN-DOS is a respected forum, but the current situation is not very satisfactory.
There were many members here who were worthy of everyone's respect before, and there are still many members who are worthy of respect now.

[ Last edited by 26933062 on 2008-4-29 at 12:39 PM ]
致精致简!
Floor 13 Posted 2008-04-29 15:51 ·  中国 上海 上海电信科技发展有限公司(中山南路111号)
中级用户
★★
我是DOS学者
Credits 367
Posts 180
Joined 2006-05-14 10:53
20-year member
UID 55507
Gender Male
From 重庆
Status Offline
Studying hard. I also found out for the first time that BAT can be encrypted like this~~ Thanks a lot for sharing your knowledge..
Floor 14 Posted 2008-04-29 21:24 ·  中国 四川 泸州 联通
高级用户
★★★
Credits 609
Posts 374
Joined 2006-08-02 22:38
20-year member
UID 59720
Status Offline
There is a problem that I don't understand. Although this has become an exe, the release path can also be specified, and what is released is the source code. The exe has been encrypted, but when viewed by RAR packing again, the original form is still exposed.
Using QuickBFC.EXE and then viewing by RAR packing, the original form will not be exposed. But the release path cannot be specified. In fact, as long as the source code is released, there will be no confidentiality.
Floor 15 Posted 2008-04-29 21:39 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Originally posted by ZJHJ at 2008-4-29 09:24 PM:
There is a problem that I don't understand. Although this way it becomes an exe, and the release path can be specified, and what is released is the source code. The exe is already encrypted, but when you use RAR to pack and view it, the original form is still exposed.
Use QuickBFC.EXE to RAR pack...



Yes..
It is not possible to encrypt BAT with RAR.

But changing EXE to BAT will have a certain encryption effect.................
Forum Jump: