diff U3b C:\Dokumente und Einstellungen\gok\Desktop\wpkg\wpkg-0.9.9-test3\wpkg.js C:\Dokumente und Einstellungen\gok\Desktop\wpkg\wpkg_9.9.t4.js
--- C:\Dokumente und Einstellungen\gok\Desktop\wpkg\wpkg-0.9.9-test3\wpkg.js	Thu Jun 08 22:00:49 2006
+++ C:\Dokumente und Einstellungen\gok\Desktop\wpkg\wpkg_9.9.t4.js	Wed Jun 21 20:15:34 2006
@@ -220,7 +220,7 @@
     
     if (argn("rebootcmd") != null) {
         rebootCmd=(argn("rebootcmd"));
-        if (debug)  info("Reboot-Cmd is " + rebootCmd +".");
+        dinfo("Reboot-Cmd is " + rebootCmd +".");
     }
     
     // want to export the state of WPKG to registry?
@@ -267,7 +267,7 @@
 
 
     if (force  &&  isArgSet(argv, "/synchronize")) {
-        if (debug)  info("Skipping current settings. Checking for actually installed packages.");
+        dinfo("Skipping current settings. Checking for actually installed packages.");
 
         settings = createXml("wpkg");
 
@@ -276,7 +276,7 @@
     } else {
         // load or create settings file
         if (!fso.fileExists(settings_file)) {
-            if (debug)  info("Settings file does not exist. Creating a new file.");
+            dinfo("Settings file does not exist. Creating a new file.");
 
             settings = createXml("wpkg");
             saveXml(settings, settings_file);
@@ -346,7 +346,7 @@
         }
     }
 
-    if (debug)  info("Using profile: " + profile);
+    dinfo("Using profile: " + profile);
 
     
     // check for existance of the current profile
@@ -548,7 +548,7 @@
     // accquire packages that should be present
     var packageArray = getAvailablePackages();
 
-    if (debug) { info("number of available packages: " + packageArray.length); }
+    dinfo("number of available packages: " + packageArray.length);
 
     
     // grab currently installed package nodes
@@ -557,17 +557,17 @@
     // loop over each installed package and check whether it still applies
     for (var i = 0; i < installedPackages.length; i++) {
         var installedPackageNode = installedPackages(i);
-        if (debug) { info("found installed package: " + installedPackageNode.getAttribute("id")); }
+        dinfo("found installed package: " + installedPackageNode.getAttribute("id"));
         
         // search for the installed package in available packages
         var found = false;
         for (j in packageArray) {
-            if (debug) { info("testing available package: " + packageArray[j].getAttribute("id")); }
+            dinfo("testing available package: " + packageArray[j].getAttribute("id"));
 
 
             if (packageArray[j].getAttribute("id") ==
                 installedPackageNode.getAttribute("id")) {
-                if (debug) { info("package: " + installedPackageNode.getAttribute("id") + " found in available packages."); }
+                dinfo("package: " + installedPackageNode.getAttribute("id") + " found in available packages.");
 
                 found = true;
                 break;
@@ -576,7 +576,7 @@
         
         // if package is no longer present, remove it
         if (!found) {
-            if (debug) { info("removing package: " + installedPackageNode.getAttribute("id")); }
+            dinfo("removing package: " + installedPackageNode.getAttribute("id"));
 
             notifyUserStart();
             removePackage(installedPackageNode);
@@ -1059,6 +1059,9 @@
             } else {
                 info("The registry path '"+checkPath+"' did not contain the value: '"+
                          checkValue+"' : the check failed");
+// change: use a return fale:
+                return false;
+// endChange
             }
         } else {
             throw new Error("Check condition " + checkCond + " unknown " +
@@ -1083,7 +1086,7 @@
                 return true;
             } else {
                 // Some debugging information
-                info("The path '"+checkPath+"' does not exist: the test failed");
+                dinfo("The path '"+checkPath+"' does not exist: the test failed");
                 return false;
             }
         } else if (checkCond == "sizeequals") {
@@ -1300,16 +1303,16 @@
 function GetFileVersion (file) {
     var version="UNKNOWN";
     try {
-        if (debug) { info ("Finding version of "+file+"\n");}
+        dinfo ("Finding version of "+file+"\n");
         var FSO = new ActiveXObject("Scripting.FileSystemObject");
         version = FSO.GetFileVersion(file);
-        if (debug) { info ("Obtained version \""+version+"\".");}
+        dinfo ("Obtained version \""+version+"\".");
     } catch (e) {
         version="UNKNOWN";
-        if (debug) { info ("Unable to find file version for "+file+" : "+
-                      e.description);}
+        dinfo ("Unable to find file version for "+file+" : "+
+                e.description);
     }
-    if (debug) { info ("Leaving GetFileVersion with version "+version); }
+    dinfo ("Leaving GetFileVersion with version "+version);
     return version;
 }
 
@@ -1320,16 +1323,16 @@
 function GetFileSize (file) {
     var size="UNKNOWN";
     try {
-        if (debug) { info ("Finding size of "+file+"\n");}
+        dinfo ("Finding size of "+file+"\n");
         var FSO = new ActiveXObject("Scripting.FileSystemObject");
         var fsof = FSO.GetFile(file);
         size = fsof.Size;
     } catch (e) {
         size="UNKNOWN";
-        if (debug) {info("Unable to get file size for "+file+" : "+
-                         e.description);}
+        dinfo("Unable to get file size for "+file+" : "+
+               e.description);
     }
-    if (debug) { info ("Leaving GetFileSize with size "+size);}
+    dinfo ("Leaving GetFileSize with size "+size);
     return size;
 }
 
@@ -1339,7 +1342,7 @@
 function checkInstalled(packageNode) {
     var packageName = packageNode.getAttribute("name");
 
-    if (debug)  { info ("checking existence of package:" + packageName); }
+    dinfo ("checking existence of package:" + packageName);
     
     // get a list of checks to perform before installation.
     var checkNodes = packageNode.selectNodes("check");
@@ -1388,10 +1391,10 @@
             
         try {
 
-            if (debug) { info("executing command : " + cmd); }
+            dinfo("executing command : " + cmd);
             var result = 0;
             result = exec(cmd, timeout);
-            if (debug) { info("command returned result: " + result); }
+            dinfo("command returned result: " + result);
 
             // if exit code is 0, return successfully
             if (result == 0) {
@@ -1516,11 +1519,11 @@
             try {
 
 
-                if (debug) { info("executing command : " + cmd); }
+                dinfo("executing command : " + cmd);
 
                 var result = 0;
                 result = exec(cmd, timeout);
-                if (debug) { info("command returned result: " + result); }
+                dinfo("command returned result: " + result);
 
                 // if exit code is 0, return successfully
                 if (result == 0) {
@@ -1601,10 +1604,10 @@
         }
         
         try {
-            if (debug) { info("executing command : " + cmd); }
+            dinfo("executing command : " + cmd);
             var result = 0;
             result = exec(cmd, timeout);
-            if (debug) { info("command returned result: " + result); }
+            dinfo("command returned result: " + result);
 
 
             // if exit code is 0, return successfully
@@ -1703,10 +1706,10 @@
         }
         
         try {
-            if (debug) { info("executing command : " + cmd); }
+            dinfo("executing command : " + cmd);
 
             var result = exec(cmd, timeout);
-            if (debug) { info("command returned result: " + result); }
+            dinfo("command returned result: " + result);
             
             // if exit code is 0, return successfully
             if (result == 0) {
@@ -1731,13 +1734,13 @@
                     // this exit code forces a reboot
                     info("Command in removal of " + packageName + " returned " +
                         "non-zero exit code [" + result + "]. This exit code " +
-                        "is not an error.");
+                        "requires an immediate reboot.");
                     reboot();
                 } else {
                     // this exit code is successful
                     info("Command in removal of " + packageName + " returned " +
                         "non-zero exit code [" + result + "]. This exit code " +
-                        "requires an immediate reboot.");
+                        "is not an error.");
                     continue;
                 }
             }
@@ -1843,7 +1846,7 @@
 	    // skip unknown entries 
 	    if (dependsId == null) continue;
 
-	    if (debug) info("Checking " + sourceName + " dependency: " + dependsId);
+	    dinfo("Checking " + sourceName + " dependency: " + dependsId);
 	    var dependsNode = sourceArray.selectSingleNode(sourceName + "[@id='" +
 		dependsId + "']");
 
@@ -1856,7 +1859,7 @@
 	    if (searchArray(appendArray, dependsNode)) {
                         continue;
                     } else {
-		if (debug) info("Add " + sourceName + " dependecy: " + dependsId);
+		dinfo("Add " + sourceName + " dependecy: " + dependsId);
 		appendArray.push(dependsNode);
 		appendDependencies(appendArray, dependsNode, sourceArray, sourceName);
                 }
@@ -1876,7 +1879,7 @@
     var profileNode = profiles.selectSingleNode("profile[@id='" + profile +
         "']");
 
-    if (debug) { info("profile: " + profile + " profileNode: " + profileNode); }
+    dinfo("profile: " + profile + " profileNode: " + profileNode);
         
     // add the current profile's node as the first element in the array
     profileArray.push(profileNode);
@@ -2165,7 +2168,7 @@
     if (dryrun) {
         path += ".dryrun";
     }
-    if (debug) { info("saving XML : " + path); }
+    dinfo("saving XML : " + path);
     var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
     xmlDoc.appendChild(root);
     if (xmlDoc.save(path)) {
@@ -2308,7 +2311,6 @@
   */
 function reboot() {
     if (!noreboot ) {
-      var fso = new ActiveXObject("Scripting.FileSystemObject");
       switch (rebootCmd) {
         case "standard":
 		{	       
@@ -2328,6 +2330,7 @@
                        psreboot();
                        break;
 	default:
+      var fso = new ActiveXObject("Scripting.FileSystemObject");
           	if (!fso.fileExists(rebootCmd)) {
                     var path = WScript.ScriptFullName;
                     base = fso.GetParentFolderName(path);
