diff --git a/pandora_agents/win32/ChangeLog b/pandora_agents/win32/ChangeLog index 9806bb6828..7f2f440ffa 100644 --- a/pandora_agents/win32/ChangeLog +++ b/pandora_agents/win32/ChangeLog @@ -1,3 +1,7 @@ +2013-12-09 Mario Pulido + + * bin/util/df_percent.vbs: Bug fixes wrong values. + 2013-11-14 Ramon Novoa * main.cc: Quote the path to the service binary to avoid exploits. diff --git a/pandora_agents/win32/bin/util/df_percent.vbs b/pandora_agents/win32/bin/util/df_percent.vbs index b904324836..e5b3406860 100644 --- a/pandora_agents/win32/bin/util/df_percent.vbs +++ b/pandora_agents/win32/bin/util/df_percent.vbs @@ -26,13 +26,19 @@ For Each objItem in colItems ' Include only harddrivers (type 3) If (objItem.FreeSpace <> "") AND (objItem.DriveType =3) Then Percent = round ((objItem.FreeSpace / objItem.Size) * 100, 2) - Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine " " Wscript.StdOut.WriteLine " " - Wscript.StdOut.WriteLine " " - Wscript.StdOut.WriteLine "" - Wscript.StdOut.flush + if (Percent > 99.99) then + Wscript.StdOut.WriteLine " " + elseif (Percent < 0.01) then + Wscript.StdOut.WriteLine " " + else + Wscript.StdOut.WriteLine " " + Wscript.StdOut.WriteLine "" + Wscript.StdOut.flush + End If End If + End If Next