Unable to set Custom logs with log path configure to c:\users\%username%\...

%3CLINGO-SUB%20id%3D%22lingo-sub-1379949%22%20slang%3D%22en-US%22%3EUnable%20to%20set%20Custom%20logs%20with%20log%20path%20configure%20to%20c%3A%5Cusers%5C%25username%25%5C...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1379949%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20set%20a%20Windows%20Custom%20Log%20with%20a%20file%20path%20in%26nbsp%3Bc%3A%5Cusers%5C%3CSTRONG%3E%25username%25%3C%2FSTRONG%3E%5C%20but%20the%20Agent%20doesn't%20seem%20to%20recognize%20the%20%25username%25%20Windows%20variable.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20way%20to%20set%20the%20custom%20path%20using%26nbsp%3BWindows%2010%20Environment%20variables%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EMy%20path%20are%20currently%20defined%20to%20%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EC%3A%5CUsers%5C%25username%25%5CAppData%5CRoaming%5CICAClient%5Cwfcwin32.log%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EFile%20type%3A%3C%2FSTRONG%3E%20ANSI%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1379949%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECustom%20Logs%20and%20Custom%20Fields%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1400442%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20set%20Custom%20logs%20with%20log%20path%20configure%20to%20c%3A%5Cusers%5C%25username%25%5C...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1400442%22%20slang%3D%22en-US%22%3EHave%20you%20tried%20%22*%22%20instead%20of%20%25username%25%20-%20depending%20on%20if%20you%20have%20other%20folder%20in%20the%20location%3F%3CBR%20%2F%3Ee.g.%3CBR%20%2F%3EC%3A%5CUsers%5C*%5CAppData%5C%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1401832%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20set%20Custom%20logs%20with%20log%20path%20configure%20to%20c%3A%5Cusers%5C%25username%25%5C...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1401832%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20pretty%20sure%20that%20MMA%20does%20not%20collect%20my%20log%20on%20%25username%25%20path%20because%20the%20process%20MonitoringHost.exe%20is%20running%20as%20SYSTEM.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20wildcard%20in%20the%20path%20%C2%ABshould%C2%BB%20work%20but%20Azure%20won't%20let%20me%20do%20it.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3EError%3A%20%3CSPAN%3EWindows%20paths%20cannot%20contain%20%22%5C%20%2F%3A%20*%3F%22%26gt%3B%20%26lt%3B%7C%20%22%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SebasL_0-1589882668401.png%22%20style%3D%22width%3A%20847px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192965i7B3AF386E4D54725%2Fimage-dimensions%2F847x648%3Fv%3D1.0%22%20width%3D%22847%22%20height%3D%22648%22%20title%3D%22SebasL_0-1589882668401.png%22%20alt%3D%22SebasL_0-1589882668401.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I'm trying to set a Windows Custom Log with a file path in c:\users\%username%\ but the Agent doesn't seem to recognize the %username% Windows variable. 

 

Is there any way to set the custom path using Windows 10 Environment variables ?

 

My path are currently defined to :

C:\Users\%username%\AppData\Roaming\ICAClient\wfcwin32.log

 

File type: ANSI

 

2 Replies
Highlighted
Have you tried "*" instead of %username% - depending on if you have other folder in the location?
e.g.
C:\Users\*\AppData\
Highlighted

@Clive Watson 

 

I'm pretty sure that MMA does not collect my log on %username% path because the process MonitoringHost.exe is running as SYSTEM. 

 

The wildcard in the path «should» work but Azure won't let me do it. 

 

Error: Windows paths cannot contain "\ /: *?"> <| "

 

SebasL_0-1589882668401.png