Pete Zerger Posted August 25, 2006 Share Posted August 25, 2006 I want users to run a script, based on their authenticating domain controller. I have copies of a target script in NETLOGON and has replicated to all DCs. Here's the script ;Hide any fatal error messages Opt("RunErrorsFatal", 0) ;Call this vbscript from netlogon on the authenticating DC Run("@LogonServer\netlogon\localscript.vbs ScriptArgHere") The error I get says "Unable to execute external program". I know I've seen this work in the past, but cannot get the syntax right. Any thoughts on how to make this work? Link to comment Share on other sites More sharing options...
Danny35d Posted August 25, 2006 Share Posted August 25, 2006 Welcom to AutoIt You are using @LogonServer between quotes Try this: Run('"' & @LogonServer & '\netlogon\localscript.vbs ScriptArgHere"', @WorkingDir) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Pete Zerger Posted August 25, 2006 Author Share Posted August 25, 2006 It gives me the same error, but when I print the string to the screen (see below), the string looks correct. It gives me "\\myauthdc\netlogon\localscript.vbs ScriptArgHere". If I throw that string in a Run box, it works like a champ. Not sure why it wont fly from my AutoIT script. $localscript = '"' & @LogonServer & '\netlogon\localscript.vbs ScriptArgHere"' $var = @LogonServer MsgBox ( 4096, "Testing", $localscript) Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 25, 2006 Share Posted August 25, 2006 Hi, try same command with _RunDos() So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Danny35d Posted August 25, 2006 Share Posted August 25, 2006 I forgot you're trying to run a vbs script.you can try as th.meger suggested but don't forget to add the following line at the begging of your script#include <Process.au3>OrtryRun(@ComSpec & ' /c "' & @LogonServer & '\netlogon\localscript.vbs ScriptArgHere"', @WorkingDir) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Pete Zerger Posted August 25, 2006 Author Share Posted August 25, 2006 Danny, that last suggestion works like a champ. Thanks very much to all. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now