Hello. I have hit a brick wall on an analysis I am writing. The goal is to get the log location for our IIS servers. I know the line exists in the C:\Windows\System32\inetsrv\config\applicationHost.config file. I can read the line if that file is located anywhere else but that location. I can copy and paste it to my desktop, a temp folder, etc. This is the relevance for the analysis.
if exists service “W3SVC” whose (state of it is “Running”) then lines whose (it as string as lowercase contains “logfile logformat”) of files “applicationHost.config” of folders “C:\Windows\System32\inetsrv\config\applicationHost.config” else “No Applicable”
Can someone help me figure this out?
32-bit redirection again! (We really need to pin a topic on this).
As BES Client is 32-bit, when it explicitly asks for “c:\windows\system32”, it’s actually redirected to “c:\windows\syswow64”. You need to work around this by using the “native system folder” or “x64 system folder” inspector to prevent the 32-bit redirection.
It also looks like you’re looking for a folder named applicationHost.config, which I presume is a typo based on frustration from all the variants you’ve tried 
Try
if exists service “W3SVC” whose (state of it is “Running”) then lines whose (it as string as lowercase contains “logfile logformat”) of files “applicationHost.config” of folders “inetsrv\config” of native system folder else “No Applicable”
3 Likes
UGH I feel like such an idiot about the redirection. I am going to put a sticky note on my computer to say did you check 32-bit redirection. Thanks so much Jason for help with this. Works like a charm now.