Exemple #1
0
    def cleanup():
        gpo = GPO()
        if not gpo.parse():
            Logger.error("Failed to parse GPO")
            return False

        absCommand = Util.get_from_PATH(Profile.vfsCommand)
        if absCommand is None:
            Logger.warn("VFS.exe is not installed")
            return False

        if not gpo.contain(GPO.LOGOFF, absCommand, Profile.vfsParameter):
            gpo.remove(GPO.LOGOFF, absCommand, Profile.vfsParameter)
            return gpo.save()

        return True
Exemple #2
0
    def installLogoffGPO(self):
        gpo = GPO()
        if gpo.parse() is False:
            Logger.error("Failed to parse GPO file")
            return False

        absCommand = Util.get_from_PATH(Profile.vfsCommand)
        if absCommand is None:
            Logger.warn("VFS.exe is not installed")
            return False

        if not gpo.contain(GPO.LOGOFF, absCommand, Profile.vfsParameter):
            gpo.add(GPO.LOGOFF, absCommand, Profile.vfsParameter)
            return gpo.save()

        return True
Exemple #3
0
	def cleanup():
		gpo = GPO()
		if not gpo.parse():
			Logger.error("Failed to parse GPO")
			return False
		
		absCommand = Util.get_from_PATH(Profile.vfsCommand)
		if absCommand is None:
			Logger.warn("VFS.exe is not installed")
			return False
		
		if not gpo.contain(GPO.LOGOFF, absCommand, Profile.vfsParameter):
			gpo.remove(GPO.LOGOFF, absCommand, Profile.vfsParameter)
                        return gpo.save()
		
		return True
Exemple #4
0
	def installLogoffGPO(self):
		gpo = GPO()
		if gpo.parse() is False:
			Logger.error("Failed to parse GPO file")
			return False
		
		
		absCommand = Util.get_from_PATH(Profile.vfsCommand)
		if absCommand is None:
			Logger.warn("VFS.exe is not installed")
			return False
		
		if not gpo.contain(GPO.LOGOFF, absCommand, Profile.vfsParameter):
			gpo.add(GPO.LOGOFF, absCommand, Profile.vfsParameter)
			return gpo.save()
		
		return True