如何在没有完整路径的情况下使用批处理程序编辑文件?

时间:2021-01-22 17:41:35

I am trying to write a batch program to rewrite the realmlist.wtf for World of Warcraft and put in the correct realms. I ran into the problem after finishing it that some people had different directories than me(Ex:I had C:\Program Files (x86)\World of Warcraft\Data\enUS while others had F:\WoW\3.5.5a\data\enUS) I want to find a way to replace this no matter the path before data\enUS. Help?

我正在尝试编写一个批处理程序来重写魔兽世界的realmlist.wtf并放入正确的领域。我在完成之后遇到了问题,有些人的目录与我不同(例如:我有C:\ Program Files(x86)\ World of Warcraft \ Data \ enUS,而其他人有F:\ WoW \ 3.5.5a \ data \ enUS)我想找到一种方法来替换它,无论数据\ enUS之前的路径。救命?

1 个解决方案

#1


0  

You should find the install path by looking in the Windows Registry. As for how to do that from a batch file, see here: http://www.robvanderwoude.com/ntregistry.php . Everybody who has WoW installed should have a registry value in a well-known location that points to the installation's base directory.

您应该通过查看Windows注册表找到安装路径。至于如何从批处理文件中执行此操作,请参见此处:http://www.robvanderwoude.com/ntregistry.php。安装了WoW的每个人都应该在一个众所周知的位置拥有一个注册表值,该位置指向安装的基本目录。

#1


0  

You should find the install path by looking in the Windows Registry. As for how to do that from a batch file, see here: http://www.robvanderwoude.com/ntregistry.php . Everybody who has WoW installed should have a registry value in a well-known location that points to the installation's base directory.

您应该通过查看Windows注册表找到安装路径。至于如何从批处理文件中执行此操作,请参见此处:http://www.robvanderwoude.com/ntregistry.php。安装了WoW的每个人都应该在一个众所周知的位置拥有一个注册表值,该位置指向安装的基本目录。