cannot install auto IT library

3,082 views
Skip to first unread message

Shirshendu Saha

unread,
Apr 26, 2011, 7:32:19 PM4/26/11
to robotframework-users, shirshe...@gmail.com
Hi All,
I am facing issue while installing AutoIT V1.1. I have installed
python 2.7 and i have installed Python for Windows Extensions. But
also i have facing the below error. Could you please help

C:\AutoItLibrary-1.1>python setup.py install
Don't think we need to unregister the old one...
%SYSTEMROOT%\system32\regsvr32.exe /S C:\Python27\Lib\site-packages
\AutoItLibrar
y\lib\AutoItX3.dll
python C:\Python27\Lib\site-packages\win32com\client\makepy.py C:
\Python27\Lib\s
ite-packages\AutoItLibrary\lib\AutoItX3.dll
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\win32com\client\makepy.py", line
383, in <
module>
rc = main()
File "C:\Python27\Lib\site-packages\win32com\client\makepy.py", line
376, in m
ain
GenerateFromTypeLibSpec(arg, f, verboseLevel = verboseLevel,
bForDemand = bF
orDemand, bBuildHidden = hiddenSpec)
File "C:\Python27\Lib\site-packages\win32com\client\makepy.py", line
272, in G
enerateFromTypeLibSpec
fileUse = gen.open_writer(outputName)
File "C:\Python27\lib\site-packages\win32com\client\genpy.py", line
780, in op
en_writer
ret = codecs.open(filename, "wt", encoding)
File "C:\Python27\Lib\codecs.py", line 881, in open
file = __builtin__.open(filename, mode, buffering)
ValueError: Invalid mode ('wtb')
Traceback (most recent call last):
File "setup.py", line 81, in <module>
subprocess.check_call(cmd)
File "C:\Python27\Lib\subprocess.py", line 504, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'python C:\Python27\Lib\site-
packages\win
32com\client\makepy.py C:\Python27\Lib\site-packages\AutoItLibrary\lib
\AutoItX3.
dll' returned non-zero exit status 1

Taylor, Martin

unread,
Apr 27, 2011, 7:39:05 AM4/27/11
to shirshe...@gmail.com, robotframework-users
You don't mention what platform you're running this on, but I assume its Windows 7. I recently upgraded to a new laptop with Win7 Pro 64-bit and have been having similar problems with building and installing the AutoItLibrary. The problem is that the AutoItX3.dll must be registered using regsvr32.exe but in Win7 this requires Admin rights. Right now the only solution I know of is to completely turn off UAC on the Win7 platform where you're using AutoItLibrary. I'm working with my IT department to try to come up with a better solution but unfortunately this is not a high-priority item at TI because we don't use AutoItLibrary for any product testing. I do hope to have a solution and a new release of AutoItLibrary within the next few weeks.

Regards,
Martin

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.

Carl Dichter

unread,
Apr 27, 2011, 10:27:52 AM4/27/11
to cmta...@ti.com, shirshe...@gmail.com, robotframework-users

Try installing from an elevated shell.

To get an elevated shell, right click on "Command Prompt" (in All
Programs->Accessories) and select "Run as Administrator". When you run the
python command line from that shell, it should be able to register the dll.

Taylor, Martin

unread,
Apr 27, 2011, 10:33:02 AM4/27/11
to Carl Dichter, shirshe...@gmail.com, robotframework-users
Sure, that works as a one-off solution. But the setup.py is what runs the regsvr32.exe using subprocess. That's the only part that needs Admin rights. I'd like to find a solution that works with UAC so that regsvr32.exe tries to run as Admin, generates the UAC dialog prompt "Do you want to allow this program to make changes..." and then lets the user decide. That's what lots of Win7 installers do but I'm just not sure how to make it all happen.

Cheers,
Martin

-----Original Message-----
From: Carl Dichter [mailto:carl.d...@gmail.com]
Sent: Wednesday, April 27, 2011 9:28 AM
To: Taylor, Martin; shirshe...@gmail.com; 'robotframework-users'
Subject: RE: cannot install auto IT library

Try installing from an elevated shell.

To get an elevated shell, right click on "Command Prompt" (in All
Programs->Accessories) and select "Run as Administrator". When you run

Programs->the

Carl Dichter

unread,
Apr 27, 2011, 1:21:14 PM4/27/11
to Taylor, Martin, shirshe...@gmail.com, robotframework-users
Here is one way to do it...

* Since we're running a command (Python) with arguments, I would
recommend creating a batch file (Setup.bat) that runs the
installation.
* Right click on the batch file, and select properties, under
Compatibility, choose "Run as administrator".

When you run that shortcut, the system will provide the UAC dialog. If
the user is not a administrator, it will also prompt for user/password
of an admin.

Reply all
Reply to author
Forward
0 new messages