From ee0b693ffaf02e75d3d740c36fffb9ea75e54431 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Aug 2005 12:19:59 +0000 Subject: [PATCH] r9580: put the libinclude() after the GetOptions so the smb.conf is loaded to get the libjs path --- source/scripting/bin/winreg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/scripting/bin/winreg b/source/scripting/bin/winreg index 12f40f11555..ac6f9e61ba1 100755 --- a/source/scripting/bin/winreg +++ b/source/scripting/bin/winreg @@ -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 [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);