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-10 01:44
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Adding “Send File to Desktop” (my first attempt) — experts, please help me improve it View 988 Replies 6
Original Poster Posted 2008-10-13 21:53 ·  中国 福建 厦门 电信
初级用户
Credits 33
Posts 20
Joined 2008-10-12 19:14
17-year member
UID 128185
Gender Male
Status Offline
Floor 2 Posted 2008-10-13 22:04 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Where did the program winrar.exe come from?
Floor 3 Posted 2008-10-13 22:08 ·  中国 福建 厦门 电信
初级用户
Credits 33
Posts 20
Joined 2008-10-12 19:14
17-year member
UID 128185
Gender Male
Status Offline
That's true too~
But if I want to use a desktop shortcut, then I have no choice but to do it this way~~
The URL method doesn't seem to work~ I don't know VB either~~
And besides, almost nobody nowadays doesn't know how to use WINRAR, so I don't think it's much of a problem.
Floor 4 Posted 2008-10-13 22:18 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Even if WinRAR is installed, is there actually an executable file called winrar.exe? What is its absolute path? If you directly use start winrar.exe, it may not be called correctly, right?
Floor 5 Posted 2008-10-13 22:27 ·  中国 江西 赣州 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
If WinRAR is the installed edition, there is generally this registry entry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe

This lets you run winrar.exe from the “Run” dialog box, but it can't be run from a batch file.

[ Last edited by tireless on 2008-10-13 at 22:35 ]
Floor 6 Posted 2008-10-13 22:46 ·  中国 云南 昆明 电信
中级用户
★★
Credits 220
Posts 99
Joined 2008-06-26 15:12
18-year member
UID 120818
Gender Male
Status Offline
You can just copy winrar.exe directly into the system32 directory.
Floor 7 Posted 2008-10-13 22:52 ·  中国 江西 赣州 电信
银牌会员
★★★★
Credits 2,025
Posts 1,122
Joined 2007-09-05 20:15
18-year member
UID 96653
Gender Male
Status Offline
%deskpath%面 can also easily cause problems. For example, my desktop path was redirected to g:\我的文档\桌面, so the deskpath variable obtained by your first command becomes g:\我的文?. It would be better to export the registry first and then operate on it.
Forum Jump: