To run hello.xsh just
Same, but disable output to info stream:
Same as above, but also copy script output to a file (it will be still displayed in the console)
Require script elevation if the current user is not an administrator:
Run code from a URL (signature validation is forced)
To run hello.xsh just
Same, but disable output to info stream:
Same as above, but also copy script output to a file (it will be still displayed in the console)
Require script elevation if the current user is not an administrator:
Run code from a URL (signature validation is forced)
Same, but using a shorter syntax
.NET programs are crazy about configuration files. Many popular frameworks put lots and lots of program data, and even program logic into XML configuration files. While I'm not a big fan of replacement of code verified during compile time with code verified only on runtime, and System.Configuration namespace is a huge beast that takes hundreds of milliseconds to load even on a decent machine, the configuration files do have their legitimate uses.
A big problem with scripting languages is that configuration files are usually loaded by .NET looking at the executable name and location. Not a problem for compiled XSharper scripts. For interpreted scripts, however, the executable is always xsharper.exe and .NET will expect to find its .config file in the binary directory, not where your script is located.
To solve this problem for interpreted scripts, XSharper allows to explicitly specify what configuration file should be used via //config parameter:
To make the config madness complete, the script itself may reside in the configuration file (template may be produced via //genconfig):
This can be executed by providing . (dot) as script name: