Andrew Struiksma <astruik...@nwesd.org> writes: > I found the attached script (uninstall_java.cmd) which seems to do a > good job of uninstalling all previous versions of Java in a more > efficient way.
Thanks a lot, this gives me idea for the following 15 lines JScipt which list the UUIDs of the J2SE. Regards. -- Daniel Dehennin RAIP de l'Orne
var UUIDS = new Array(); var objFSO = WScript.CreateObject("Scripting.FileSystemObject"); var strComputer = "."; var WMIServiceStr = "winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2"; var objWMIService = GetObject(WMIServiceStr); var colSoftware = objWMIService.ExecQuery ("Select * from Win32_Product Where Description LIKE 'J2SE%'"); for ( var Item=new Enumerator(colSoftware); !Item.atEnd(); Item.moveNext() ) { var item = Item.item(); UUIDS.push(item.IdentifyingNumber); // WScript.Echo( item.Caption // + " " + item.Description // + " " + item.IdentifyingNumber // + " " + item.InstallDate2 // + " " + item.InstallLocation // + " " + item.InstallState // + " " + item.Name // + " " + item.PackageCache // + " " + item.SKUNumber // + " " + item.Vendor // + " " + item.Version // + "\n" // ); } WScript.Echo(UUIDS.join("\n"));
pgpy7uH4NUe7g.pgp
Description: PGP signature
------------------------------------------------------------------------- wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/ _______________________________________________ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users