Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Percent Signs %%
Thanks
ProfilesDir1="%SystemRoot%\Profiles" ProfilesDir2=RegQueryExpSz(@RegMachine,"Software\Microsoft\Windows NT\CurrentVersion\ProfileList[ProfilesDirectory]") If DirExist(ProfilesDir1) Then Message("Status","Dir1 exists") If DirExist(ProfilesDir2) Then Message("Status","Dir2 exists")and here's the debug info:
ProfilesDir1="C:\WINNT\Profiles" (0) VALUE=> "C:\WINNT\Profiles" ProfilesDir2=RegQueryExpSz(@RegMachine,"Software\Microsoft\Windows NT\CurrentVersion\ProfileList[ProfilesDirectory]") (0) VALUE=> "%SystemRoot%\Profiles" If DirExist(ProfilesDir1) Then Message("Status","Dir1 exists") (640) ==>TRUE=> 1 If DirExist(ProfilesDir2) Then Message("Status","Dir2 exists") (640) ==>FALSE=> (skipped)The problem is the fact that when I pull data OUT of an ExpSz registry key into a WB variable, that variable then contains a literal string with %SystemRoot% (in this example) in it. When I then try to use that variable, I need it to be resolved to the value of %SystemRoot%.
value=RegQueryExpSZ(..... systemroot=Environment("systemroot") value=StrReplace(value,"%%systemroot%%",systemroot)
Article ID: W14708
Filename: Retain Percent Signs in SystemRoot.txt
File Created: 2000:07:20:13:22:56
Last Updated: 2000:07:20:13:22:56