Hello,
Sorry for my poor English...
not same result !?
I encounter a very curious problem. Indeed, I wrote a small program that launches a CLI command from a Winform application and I retrieve the result asynchronously using the ProcessStartInfo() and Process() duo and I read the result as I go. data feedback via a While loop and StreamReader.
Everything works fine except that I encounter something inexplicable. When I launch for example the following statement from the command interpreter as an administrator (displays the junction points contained in a directory and its subdirectories), the latter returns me a different result from the one obtained from the Winform application with the same instructions (also run as Administrator) !!!?
CLI command executed:
dir c:\windows /AL /S
Result obtained from the command interpreter:
Répertoire de c:\windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\Windows\INetCache
01/10/2022 23:26 <JUNCTION> Content.IE5 [C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Local\Microsoft\Windows\INetCache\IE]
0 fichier(s) 0 octets
Répertoire de c:\windows\System32\config\systemprofile\AppData\Local\Microsoft\Windows\INetCache
28/09/2022 16:11 <JUNCTION> Content.IE5 [C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\Windows\INetCache\IE]
0 fichier(s) 0 octets
Result obtained from the Winform application:
Répertoire de c:\windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\Windows\INetCache
01/10/2022 23:26 <JUNCTION> Content.IE5 [C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Local\Microsoft\Windows\INetCache\IE]
0 fichier(s) 0 octets
Does anyone have an explanation for me to solve this mystery?
Best regards