@cindex scripts
Apart from reading the server and host configuration files,
tinc can also run scripts at certain moments.
-Under Windows (not Cygwin), the scripts should have the extension .bat.
+Under Windows (not Cygwin), the scripts should have the extension @file{.bat} or @file{.cmd}.
@table @file
@cindex tinc-up
The scripts are started without command line arguments,
but can make use of certain environment variables.
Under UNIX like operating systems the names of environment variables must be preceded by a $ in scripts.
-Under Windows, in @file{.bat} files, they have to be put between % signs.
+Under Windows, in @file{.bat} or @file{.cmd} files, they have to be put between % signs.
@table @env
@cindex NETNAME
#include "utils.h"
#include "xalloc.h"
-#ifdef HAVE_MINGW
-#define SCRIPTEXTENSION ".bat"
-#else
-#define SCRIPTEXTENSION ""
-#endif
-
int addressfamily = AF_UNSPEC;
char *get_my_hostname() {
free(scriptextension);
if(!get_config_string(lookup_config(config_tree, "ScriptsExtension"), &scriptextension))
-#ifdef HAVE_MINGW
- scriptextension = xstrdup(".bat");
-#else
scriptextension = xstrdup("");
-#endif
get_config_string(lookup_config(config_tree, "Proxy"), &proxy);
if(proxy) {