中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-02 02:22
48,037 topics / 350,122 posts / today 2 new / 48,250 members
DOS批处理 & 脚本技术(批处理室) » Path expression! Consulted!
Printable Version  3,351 / 24
Floor1 terse Posted 2006-09-20 08:08
银牌会员 Posts 946 Credits 2,404
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 ]
Floor2 pengfei Posted 2006-09-20 08:15
银牌会员 Posts 485 Credits 1,218 From 湖南.娄底
The owner of the post, try it. It's iexplorer.exe in the system disk program folder
%ProgramFiles%\Internet Explorer\iexplore.exe
Floor3 electronixtar Posted 2006-09-20 08:20
铂金会员 Posts 2,672 Credits 7,493
Just type iexplore directly. Try it if you don't believe it. Start / Run iexplore http://www.google.com
Floor4 namejm Posted 2006-09-20 08:36
荣誉版主 Posts 1,737 Credits 5,226 From 成都
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.
Floor5 terse Posted 2006-09-20 09:22
银牌会员 Posts 946 Credits 2,404
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?
Floor6 electronixtar Posted 2006-09-20 09:46
铂金会员 Posts 2,672 Credits 7,493
Floor7 pengfei Posted 2006-09-20 09:52
银牌会员 Posts 485 Credits 1,218 From 湖南.娄底
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 ]
Floor8 namejm Posted 2006-09-20 10:06
荣誉版主 Posts 1,737 Credits 5,226 From 成都
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.
Floor9 terse Posted 2006-09-20 10:10
银牌会员 Posts 946 Credits 2,404
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!
Floor10 terse Posted 2006-09-20 10:14
银牌会员 Posts 946 Credits 2,404
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!
Floor11 pengfei Posted 2006-09-20 10:19
银牌会员 Posts 485 Credits 1,218 From 湖南.娄底
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 ]
Floor12 terse Posted 2006-09-20 11:16
银牌会员 Posts 946 Credits 2,404
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!
Floor13 terse Posted 2006-09-21 10:45
银牌会员 Posts 946 Credits 2,404
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!
Floor14 pengfei Posted 2006-09-21 10:49
银牌会员 Posts 485 Credits 1,218 From 湖南.娄底
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 ]
Floor15 terse Posted 2006-09-21 11:36
银牌会员 Posts 946 Credits 2,404
It doesn't work. It seems it won't work, but anyway, thank you.
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023