Seems that messages hit antispam rules and not pass. i cut&paste the script on bottom of message.
----- Forwarded message from Marco Gaiarin <[EMAIL PROTECTED]> ----- From: Marco Gaiarin <[EMAIL PROTECTED]> Date: Thu, 22 Mar 2007 10:09:17 +0100 To: [email protected] Subject: WPKGWrapper... Organization: La Nostra Famiglia - Polo FVG Mandi! Tomasz Chmielewski In chel di` si favelave... > > As a total .js ignorant: could keep this approach, eg, build a little > > .js script that check an environment variable and then call wpkg.js? > OK, let's practice some JScript - create a file called marco.js, with > contents: My little exercise attached. But seems that does not work, or at least expose some strangeness that i'm not able to debug. Particulary: if i run on a cmd.exe prompt: \\FILE\wpkg\wpkgwrapper.js /help i'm expecting to have on the terminal the help. But nothing appear. If i run (both external and internal) script with wscript instead of cscript, help appear (as a window, of course). I'm a total windows ignorant, but seems to me as my wrapper does not connect STDIN/OUT/ERR correctly to the real cscript call. Can you help me? ----- End forwarded message ----- // Configure here the Wrapper... // var env_var_name="LOCALNET"; // Environment variable name var env_var_value="sv"; // Environment variable value ('server value') var wpkg_js="cscript \\\\FILE\\wpkg\\wpkg.js "; // Remember to double the \ !!! // Reapup commandline... // var cmdl = ""; var p = WScript.Arguments; for (i=0; i < p.length; i++) { cmdl = (cmdl + p(i) + " " ); } // Get environment var value... // var shell = new ActiveXObject("WScript.Shell"); var env_vars = shell.Environment("PROCESS"); var env_var_value_client = env_vars(env_var_name); // Check against "server" one... // if (env_var_value_client == env_var_value) { var cmd = wpkg_js + " " + cmdl; WScript.Echo("Starting: " + cmd); var shellExec = shell.exec(cmd); WScript.Echo("Exit status: " + shellExec.status); } -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/ Polo FVG - Via della Bontà , 7 - 33078 - San Vito al Tagliamento (PN) marco.gaiarin(at)sv.lnf.it tel +39-0434-842711 fax +39-0434-842797 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ wpkg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wpkg-users
