r9580: put the libinclude() after the GetOptions so the smb.conf is loaded to
authorAndrew Tridgell <tridge@samba.org>
Wed, 24 Aug 2005 12:19:59 +0000 (12:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:34:31 +0000 (13:34 -0500)
get the libjs path
(This used to be commit ee0b693ffaf02e75d3d740c36fffb9ea75e54431)

source4/scripting/bin/winreg

index 12f40f1155515967d0901700fb23781f3976a9c4..ac6f9e61ba1bfb040f7bc5b0825cd7e6e2eecba9 100755 (executable)
@@ -6,9 +6,6 @@ exec smbscript "$0" ${1+"$@"}
   Released under the GNU GPL v2 or later
 */     
 
-libinclude("base.js");
-libinclude("winreg.js");
-
 var options = GetOptions(ARGV,
                         "POPT_AUTOHELP",
                         "POPT_COMMON_SAMBA",
@@ -19,6 +16,9 @@ if (options == undefined) {
        return -1;
 }
 
+libinclude("base.js");
+libinclude("winreg.js");
+
 if (options.ARGV.length < 1) {
        println("Usage: winreg.js <BINDING> [path]");
        return -1;
@@ -91,7 +91,7 @@ if (options.ARGV.length > 1) {
 if (options.createkey) {
        var ok = reg.create_key("HKLM\\SOFTWARE", options.createkey);
        if (!ok) {
-               
+               println("Failed to create key");
        }
 } else {
        printf("Listing registry tree '%s'\n", root);