【发布时间】:2009-04-28 01:32:47
【问题描述】:
我一直在编写一个需要在文件中扩展环境字符串的应用程序。
为此,我可以使用标准的 Windows API 函数 ExpandEnvironmentStrings: http://msdn.microsoft.com/en-us/library/ms724265(VS.85).aspx
不过,我在使用该功能时确实存在一些问题。
第一的:
The size of the lpSrc and lpDst buffers is limited to 32K.
下一个:Note that this function does not support all the features that Cmd.exe supports. For example, it does not support %variableName:str1=str2% or %variableName:~offset,length%.
我想实现 cmd.exe 允许的这些额外功能,但我不确定它们到底是什么。 :~offset,length 有点明显......子字符串。但不确定第一个是什么。
有什么想法吗?
比利3
【问题讨论】:
标签: batch-file environment-variables