When the environment-variable "COMPUTERNAME" is retrieved using 'Windows Script Host Object Model'.WshShell, the warning "The server has requested to run Windows Script Host Shell Object on your client." is displayed.
If "COMPUTERNAME" is retrieved through .NET Interop, does this still issues a warning?
How does the .NET Interop code looks like, to retrieve this variable, using NAV 2009 R2?
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
0
Answers
If you need it for the client, the warning still apears, at least if you don't change your ClientUserSettings.
If you want the service tier name (you don't run the code on the server) then no user validation is required.
There are serveral ways to do this. You can evaluate a Environment Variable text by using this method:
http://msdn.microsoft.com/en-us/library/system.environment.expandenvironmentvariables.aspx
Or you use "system.environment.machinename":
http://msdn.microsoft.com/en-us/library/system.environment.machinename.aspx
If the warning still appears when using Interop code, then I stick with Automation. What setting can be modified in ClientUserSettings.config to avoid this warning?
Please check at this post
http://mibuso.com/forum/viewtopic.php?f=32&t=56039
http://www.mibuso.com/forum/viewtopic.php?f=23&t=48217
Regards,
Yukon
EXIT(SysEnv.GetEnvironmentVariable(property));
where property is text for e.g can 'COMPUTERNAME'
and SysEnv is variable of type DotNet and subtype
System.Environment.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Jerome Cader