windows 路径 WinSysPath 和 WinSysPathSysFile 之间的区别?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7083350/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 17:52:33  来源:igfitidea点击:

Difference between Path WinSysPath & WinSysPathSysFile?

windowsvb6pathsystem32

提问by Peretz

In a .LST file for my VB6 installer there are two lines as follow:

在我的 VB6 安装程序的 .LST 文件中,有如下两行:

[email protected],$(WinSysPathSysFile),......
[email protected],$(WinSysPath),.....

After installing my application, I found out that both go to the same \Windows\System32folder. Do you know what is the difference between both paths?

安装我的应用程序后,我发现两者都转到同一个\Windows\System32文件夹。你知道这两条路有什么区别吗?

Thanks

谢谢

回答by Hans Passant

This dates back from VB4, I think, a version that could still generate 16-bit executables. Where the system directory was c:\windows\system, the synonym of $(WinSysPath). $(WinSysPathSysFile) is c:\windows\system32. There should be no difference on a 32-bit operating system, but worth a check. wshom.ocx really does belong in system32. It is already there on any recent operating system.

我认为这可以追溯到 VB4,一个仍然可以生成 16 位可执行文件的版本。其中系统目录是 c:\windows\system,$(WinSysPath) 的同义词。$(WinSysPathSysFile) 是 c:\windows\system32。在 32 位操作系统上应该没有区别,但值得一试。wshom.ocx 确实属于 system32。它已经存在于任何最新的操作系统上。

回答by Deanna

They both go to the same system folder (The windows folder if it's not writable). The latter just marks it as a system file so it's not uninstalled.

它们都转到同一个系统文件夹(如果不可写,则为 windows 文件夹)。后者只是将其标记为系统文件,因此不会被卸载。

Snippets from Setup1.bas in the PDW:

PDW 中 Setup1.bas 的片段:

fSystem As Boolean 'whether the file is a system file (i.e. should be installed but never removed)

If InStr(strInitialDestDir, gstrWINSYSDESTSYSFILE) Then
  sFile.fSystem = True
End If

Case gstrWINSYSDEST, gstrWINSYSDESTSYSFILE
  strResolved = gstrWinSysDir