Re: win32com can't find file but I can see it, confused
Do you need to quote the value sent to shell.run() since there is a
space in it?
Development & Executive Director
Level 12 Technologies (formerly Intelicom)
Intelicom is now Level 12 Technologies, learn more about our name change.
Please update your address book with my new email address.
Principled People, Technology that Works
On 03/09/2012 08:17 AM, dave selby wrote:
OK I am a little confused, I have the following
shell = win32com.client.Dispatch('WScript.Shell')
The file self.exe exists, I get a 'true' from os.path.isfile, I can
execute it on the command line AOK, its path is as I would expect but
when I attempt to execute it I get ...
C:\Documents and Settings\dave\Desktop\My Mobile\MyMobiler\MyMobiler.exe
Traceback (most recent call last):
File "C:\Program Files\FX Hammer\core\diag.py", line 64, in <module>
File "C:\Program Files\FX Hammer\core\my_mobiler.py", line 93, in startExe
shell.Run('C:\Documents and Settings\dave\Desktop\My
File "<COMObject WScript.Shell>", line 2, in Run
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None,
None, None, 0, -2147024894), None)
Now using win32api.FormatMessage() I get ...
The system cannot find the file specified.
Am I missing anything ?