    private void makeItem() throws CollectException {
	try {
	    long timeout = session.getTimeout(IBaseSession.Timeout.M);
	    String tempDir = session.getTempDir();
	    StringBuffer sb = new StringBuffer(tempDir);
	    if (!tempDir.endsWith(session.getFilesystem().getDelimiter())) {
		sb.append(session.getFilesystem().getDelimiter());
	    }
	    sb.append("secpol.inf");
	    String secpol = sb.toString();
	    String cmd = "secedit.exe /export /areas SECURITYPOLICY /cfg " + secpol;
	    SafeCLI.ExecData data = SafeCLI.execData(cmd, null, session, timeout);
	    int code = data.getExitCode();
	    switch(code) {
	      case 0: 
		IFile file = null;
		try {
		    file = session.getFilesystem().getFile(secpol, IFile.Flags.READWRITE);
		    IniFile config = new IniFile(file.getInputStream(), StringTools.UTF16LE);
		    items = new Vector<PasswordpolicyItem>();
		    PasswordpolicyItem item = Factories.sc.windows.createPasswordpolicyItem();
		    IProperty prop = config.getSection("System Access");
		    for (String key : prop) {
			if ("MaximumPasswordAge".equals(key)) {
			    EntityItemIntType type = Factories.sc.core.createEntityItemIntType();
			    type.setDatatype(SimpleDatatypeEnumeration.INT.value());
			    type.setValue(prop.getProperty(key));
			    item.setMaxPasswdAge(type);
			} else if ("MinimumPasswordAge".equals(key)) {
			    EntityItemIntType type = Factories.sc.core.createEntityItemIntType();
			    type.setDatatype(SimpleDatatypeEnumeration.INT.value());
			    type.setValue(prop.getProperty(key));
			    item.setMinPasswdAge(type);
			} else if ("MinimumPasswordLength".equals(key)) {
			    EntityItemIntType type = Factories.sc.core.createEntityItemIntType();
			    type.setDatatype(SimpleDatatypeEnumeration.INT.value());
			    type.setValue(prop.getProperty(key));
			    item.setMinPasswdLen(type);
			} else if ("PasswordHistorySize".equals(key)) {
			    EntityItemIntType type = Factories.sc.core.createEntityItemIntType();
			    type.setDatatype(SimpleDatatypeEnumeration.INT.value());
			    type.setValue(prop.getProperty(key));
			    item.setPasswordHistLen(type);
			} else if ("ClearTextPassword".equals(key)) {
			    EntityItemBoolType type = Factories.sc.core.createEntityItemBoolType();
			    type.setDatatype(SimpleDatatypeEnumeration.BOOLEAN.value());
			    type.setValue(prop.getProperty(key));
			    item.setReversibleEncryption(type);
			} else if ("PasswordComplexity".equals(key)) {
			    EntityItemBoolType type = Factories.sc.core.createEntityItemBoolType();
			    type.setDatatype(SimpleDatatypeEnumeration.BOOLEAN.value());
			    type.setValue(prop.getProperty(key));
			    item.setReversibleEncryption(type);
			}
		    }
		    items.add(item);
		} catch (NoSuchElementException e) {
		    error = new CollectException(e.getMessage(), FlagEnumeration.NOT_APPLICABLE);
		    throw error;
		} catch (IOException e) {
		    session.getLogger().warn(JOVALMsg.ERROR_IO, secpol, e.getMessage());
		} finally {
		    if (file != null) {
			file.delete();
		    }
		}
		break;
	      default:
		String output = new String(data.getData());
		String msg = JOVALMsg.getMessage(JOVALMsg.ERROR_WIN_SECEDIT_CODE, Integer.toString(code), output);
		throw new Exception(msg);
	    }
	} catch (CollectException e) {
	    throw e;
	} catch (Exception e) {
	    session.getLogger().warn(JOVALMsg.getMessage(JOVALMsg.ERROR_EXCEPTION), e);
	    error = new CollectException(e.getMessage(), FlagEnumeration.ERROR);
	    throw error;
	}
    }

    private void makeItem() throws CollectException {
	try {
	    long timeout = session.getTimeout(IBaseSession.Timeout.M);
	    String tempDir = session.getTempDir();
	    StringBuffer sb = new StringBuffer(tempDir);
	    if (!tempDir.endsWith(session.getFilesystem().getDelimiter())) {
		sb.append(session.getFilesystem().getDelimiter());
	    }
	    sb.append("secpol.inf");
	    String secpol = sb.toString();
	    String cmd = "secedit.exe /export /areas SECURITYPOLICY /cfg " + secpol;
	    SafeCLI.ExecData data = SafeCLI.execData(cmd, null, session, timeout);
	    int code = data.getExitCode();
	    switch(code) {
	      case 0: 
		IFile file = null;
		try {
		    file = session.getFilesystem().getFile(secpol, IFile.Flags.READWRITE);
		    IniFile config = new IniFile(file.getInputStream(), StringTools.UTF16LE);
		    items = new Vector<PasswordpolicyItem>();
		    PasswordpolicyItem item = Factories.sc.windows.createPasswordpolicyItem();
		    IProperty prop = config.getSection("System Access");
		    for (String key : prop) {
			if ("MaximumPasswordAge".equals(key)) {
			    EntityItemIntType type = Factories.sc.core.createEntityItemIntType();
			    type.setDatatype(SimpleDatatypeEnumeration.INT.value());
			    long days = Long.parseLong(prop.getProperty(key));
			    long secs = days * 86400;
			    type.setValue(Long.toString(secs));
			    item.setMaxPasswdAge(type);
			} else if ("MinimumPasswordAge".equals(key)) {
			    EntityItemIntType type = Factories.sc.core.createEntityItemIntType();
			    type.setDatatype(SimpleDatatypeEnumeration.INT.value());
			    long days = Long.parseLong(prop.getProperty(key));
			    long secs = days * 86400;
			    type.setValue(Long.toString(secs));
			    item.setMinPasswdAge(type);
			} else if ("MinimumPasswordLength".equals(key)) {
			    EntityItemIntType type = Factories.sc.core.createEntityItemIntType();
			    type.setDatatype(SimpleDatatypeEnumeration.INT.value());
			    type.setValue(prop.getProperty(key));
			    item.setMinPasswdLen(type);
			} else if ("PasswordHistorySize".equals(key)) {
			    EntityItemIntType type = Factories.sc.core.createEntityItemIntType();
			    type.setDatatype(SimpleDatatypeEnumeration.INT.value());
			    type.setValue(prop.getProperty(key));
			    item.setPasswordHistLen(type);
			} else if ("ClearTextPassword".equals(key)) {
			    EntityItemBoolType type = Factories.sc.core.createEntityItemBoolType();
			    type.setDatatype(SimpleDatatypeEnumeration.BOOLEAN.value());
			    type.setValue(prop.getProperty(key));
			    item.setReversibleEncryption(type);
			} else if ("PasswordComplexity".equals(key)) {
			    EntityItemBoolType type = Factories.sc.core.createEntityItemBoolType();
			    type.setDatatype(SimpleDatatypeEnumeration.BOOLEAN.value());
			    type.setValue(prop.getProperty(key));
			    item.setReversibleEncryption(type);
			}
		    }
		    items.add(item);
		} catch (NoSuchElementException e) {
		    error = new CollectException(e.getMessage(), FlagEnumeration.NOT_APPLICABLE);
		    throw error;
		} catch (IOException e) {
		    session.getLogger().warn(JOVALMsg.ERROR_IO, secpol, e.getMessage());
		} finally {
		    if (file != null) {
			file.delete();
		    }
		}
		break;
	      default:
		String output = new String(data.getData());
		String msg = JOVALMsg.getMessage(JOVALMsg.ERROR_WIN_SECEDIT_CODE, Integer.toString(code), output);
		throw new Exception(msg);
	    }
	} catch (CollectException e) {
	    throw e;
	} catch (Exception e) {
	    session.getLogger().warn(JOVALMsg.getMessage(JOVALMsg.ERROR_EXCEPTION), e);
	    error = new CollectException(e.getMessage(), FlagEnumeration.ERROR);
	    throw error;
	}
    }
