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-02 03:36
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Path expression! Consulted! View 3,356 Replies 24
Original Poster Posted 2006-09-20 08:08 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
In the following registry file:

1. C:\Program Files\Internet Explorer\iexplore.exe is the default opening method for BMP files! Suppose iexplore.exe is not on the C drive, can there be a general path expression for import?

2. C:\WINNT\NOTEPAD.EXE is the default opening method for ASP files. The current system is 2000, and for XP it is C:\WINDOWS. Can there also be a general path expression for import? Why doesn't %WINDIR% work?

Asked!

Thanks to pengfei for the help, reward points!

[ Last edited by terse on 2006-9-21 at 10:41 ]
Floor 2 Posted 2006-09-20 08:15 ·  中国 湖南 娄底 新化县 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
The owner of the post, try it. It's iexplorer.exe in the system disk program folder
%ProgramFiles%\Internet Explorer\iexplore.exe
业精于勤而荒于嬉,形成于思而毁于随。
Floor 3 Posted 2006-09-20 08:20 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Just type iexplore directly. Try it if you don't believe it. Start / Run iexplore http://www.google.com

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 4 Posted 2006-09-20 08:36 ·  中国 广东 佛山 广东睿江科技有限公司
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
Originally posted by electronixtar at 2006-9-20 08:20:
Just type iexplore directly. Try it if you don't believe it. Start / Run iexplore http://www.google.com

  This only works in the Run line. It doesn't work in a batch file. The correct way is to use the start command to open a certain file. This command will call the default opening method to open your file.
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 5 Posted 2006-09-20 09:22 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Originally posted by pengfei at 2006-9-20 08:15:
The owner tries it, which is iexplorer.exe in the program folder of the system disk
%ProgramFiles%\Internet Explorer\iexplore.exe

It works. Thank you. What about the second question?
Floor 6 Posted 2006-09-20 09:46 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline

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 7 Posted 2006-09-20 09:52 ·  中国 湖南 娄底 新化县 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
Originally posted by terse at 2006-9-20 09:22:

It's okay, thanks.

What about the second question?


Try this %systemroot%\NOTEPAD.EXE

I don't know why the %windir% command doesn't work. Could it be that the owner installed both systems on one disk?

If the above doesn't work, try this line:
set notepad=%ComSpec:~0,-16%
%notepad%NOTEPAD.EXE

[ Last edited by pengfei on 2006-9-20 at 10:01 ]
业精于勤而荒于嬉,形成于思而毁于随。
Floor 8 Posted 2006-09-20 10:06 ·  中国 广东 佛山 广东睿江科技有限公司
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
Because notepad.exe is in the default search path of CMD, so there is no need to add the path, just enter notepad to open the Notepad.
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 9 Posted 2006-09-20 10:10 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Originally posted by electronixtar at 2006-9-20 09:46:
Notepad works.

Still no good! I can open NOTEPAD.EXE in the Run dialog, and the batch file can also open NOTEPAD.EXE, but it doesn't work when importing into the registry!
Floor 10 Posted 2006-09-20 10:14 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Originally posted by pengfei at 2006-9-20 09:52:


Try it %systemroot%\NOTEPAD.EXE

I don't know why the %windir% command doesn't work. Could it be that the楼主 has both systems installed on one disk?

If the above doesn't work, try this line:
set notepad=%Com ...

First, thank you for the reply from the expert. I didn't install two systems. Now I'm using 2K, but I have a GHOST XP system. I just want to have a registry backup so that I can import it later. But now I haven't found a registry entry that can be used for both systems!
Floor 11 Posted 2006-09-20 10:19 ·  中国 湖南 娄底 新化县 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
Originally posted by terse at 2006-9-20 10:14:

Thanks to the great experts for the reply first. I don't have two systems installed. Now I'm using 2K, but I have a GHOST XP system. I just want to have a registry backup, so that I can import it later...


For the open item associated with the registry, you only need to fill in the program name. The file path in the system directory is the default access value. When you open NOTEPAD.EXE, the system will automatically search in several default paths.

[ Last edited by pengfei on 2006-9-20 at 10:20 ]
业精于勤而荒于嬉,形成于思而毁于随。
Floor 12 Posted 2006-09-20 11:16 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Originally posted by pengfei at 2006-9-20 10:19:

The Open item in the registry association only needs to fill in the program name, and the file path in the system directory is the default access value. Opening NOTEPAD.EXE, the system will automatically search in several default paths.

[ Last edited b ...

It's really done. All problems are solved. Thank you, great guys! Can delete the post!
Floor 13 Posted 2006-09-21 10:45 ·  中国 江苏 常州 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Originally posted by pengfei at 2006-9-20 08:15:
The landlord try it, it is iexplorer.exe in the system disk program folder
%ProgramFiles%\Internet Explorer\iexplore.exe

Please help me, Pengfei, thank you! I tried importing yesterday and it was okay, but why did it go wrong when I imported today? 2 Just restore the registration to the state before importing yesterday!
Floor 14 Posted 2006-09-21 10:49 ·  中国 湖南 娄底 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
Try adding quotes:

"%ProgramFiles%\Internet Explorer\iexplore.exe"

or

%systemdrive%\Program Files\Internet Explorer\iexplore.exe

[ Last edited by pengfei on 2006-9-21 at 10:54 ]
业精于勤而荒于嬉,形成于思而毁于随。
Floor 15 Posted 2006-09-21 11:36 ·  中国 江苏 常州 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
It doesn't work. It seems it won't work, but anyway, thank you.
Forum Jump: