私はファイル内の環境文字列を展開する必要があるアプリケーションを書いてきました。
そのために、標準の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