drive encryption using python

A forum for general discussion of the Python programming language.

drive encryption using python

Postby abroy » Tue Aug 27, 2013 4:13 am

Here i am trying to encrypt my removable media(F:) using python but getting the error, my script is

Code: Select all
from win32com.client import Dispatch

strComputer="."
objwmiservices=Dispatch("WbemScripting.SWbemLocator")
objSwbemservices=objwmiservices.ConnectServer(strComputer,"\\ROOT\\CIMV2\\Security\\MicrosoftVolumeEncryption")
colitem=objSwbemservices.ExecQuery("SELECT * FROM Win32_EncryptableVolume")
for objitem in colitem:
    if Driveletter=="F:"
       objItem.Encrypt()
       print objItem.GetConversionStatus


its showing following error

'int' object is not callable
Last edited by micseydel on Tue Aug 27, 2013 5:17 am, edited 1 time in total.
Reason: Locked OP, added code tags.
abroy
 
Posts: 1
Joined: Tue Aug 27, 2013 3:53 am

Re: drive encryption using python

Postby micseydel » Tue Aug 27, 2013 5:19 am

Please post your full traceback verbatim.
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
micseydel
 
Posts: 939
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to General Discussions

Who is online

Users browsing this forum: Google [Bot] and 2 guests