Hi,
the following code:
Seems to ALWAYS return true, such as compiled into a Console application, and when executed from a BAT file and ps1 also.Code:Console.WriteLine(Environment.UserInteractive.ToString());
I had hoped theCode:PS C:\temp> .\EnvironmentTest.ps1 -NonInteractive C:\temp>.\EnvironmentTest.exe True PS C:\temp>parameter would do the trick. However it does not force it to false.Code:-NonInteractive
Is there any way to trick this System.Environment variable that is already compiled into an .exe?
Thanks!
Dave




Reply With Quote