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-01 21:15
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Protecting a CMD file View 1,055 Replies 8
Original Poster Posted 2006-07-18 06:04 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
@start \\game\\data$


Save the above as a CMD file, but if you right-click it and choose Edit, you can still see what's inside. Does anyone have any way to make it no longer show up under Edit when right-clicking? I just don't want other people to see it, hehe. I work at an internet cafe. It's also a way to leave myself a backup plan. Right?~
Floor 2 Posted 2006-07-18 08:43 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Write it in C, then don't use bat, that will do~~~

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 3 Posted 2006-07-18 13:42 ·  中国 四川 成都 鹏博士宽带
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
  Use QuickBFC to convert the bat file into an exe file.
Floor 4 Posted 2006-07-19 05:06 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
No, ~~!
Same thing, it can't be converted, or after converting it won't work!~
Floor 5 Posted 2006-07-19 13:38 ·  中国 四川 成都 鹏博士宽带
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
  So is it that it can't be converted, or that after converting it won't work?
Floor 6 Posted 2006-07-19 19:42 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
Yeah, you got it right, after converting it won't work. It says it's code the CPU can't recognize!
Floor 7 Posted 2006-07-19 19:49 ·  中国 四川 成都 鹏博士宽带
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
  Maybe the \\ and $ symbols are a bit strange, so QuickBFC can't convert them correctly.
Floor 8 Posted 2006-07-19 19:59 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
Then is there any better way??
Please, everybody, show what you can do~
Floor 9 Posted 2006-07-19 23:09 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
Without converting the .bat, how can I prevent others from viewing or modifying its contents?
But the question you're asking is
make it no longer show up under Edit when right-clicking

which doesn't seem very consistent with the title. If you want the "Edit" menu not to appear on the right-click menu, you can delete "Edit" for bat files under "File Types" in "Folder Options"; or directly modify the registry. The two methods lead to the same result, but editing the registry is a bit more complicated.
Forum Jump: