String pw = getWindowsPassword(host);
WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(host, getRemoteUser(), pw);
WindowsRemoteFile remoteInstallDir = new WindowsRemoteFile(wrfs, getInstallDir());
if (!remoteInstallDir.exists()) {
throw new CommandException(
Strings.get("remote.install.dir.already.gone", getInstallDir()));
}
remoteInstallDir.delete();
// make sure it's gone now...
if (remoteInstallDir.exists()) {
throw new CommandException(Strings.get("remote.install.dir.cant.delete", getInstallDir()));
}
}
catch (CommandException ce) {
throw ce;
}
catch (Exception e) {
throw new CommandException(e);
}
}
}