|| at Apr 27, 2008 at 12:38 pm
On Apr 24, 10:14 pm, flarefi... at googlemail.com wrote:
I am trying to make a a simple databasing GUI interface and and have
created a module to deal with parsing the data from a file and a GUI
based program that displays this data using PyQt4, i know how to
register files in the system registry using python and also using Inno
Setup which i use to package my applications, but i cant work out how
if a file is doubled clicked on to send the path of that file to
Do you mean: when a file with "your extension" is double clicked on,
then Windows should pass the path of that file to "your application"
that is written in Python?
On Apr 26, 7:26 pm, flarefi... at googlemail.com wrote:
I can't get this to work (I am on XP SP2 by the way and using Python
I wrote a very simple script to test the idea:
for arg in sys.argv:
raw_input("Done") #Merely to slow the program down so i can see output
and then setup a file extension .xyz, placed it in the registry, can
get a .xyz file to work as a python script so the registry setup is
fine, but when i try and put the parameter to the above program and a
%1 (or even without) it gets the following error message from windows:
C:\...\hmm.xyz is not a valid Win32 application.
Windows seems to be trying to execute your file.xyz as an application,
this means it hasn't associated your extension (.xyz) with your
application, instead .xyz is associated as an executable.
To associate your extension with your application, see:http://msdn2.microsoft.com/en-us/library/bb776883.aspx
It's a bit advanced
# Create or edit Registry Key: 'HKEY_CLASSES_ROOT\.xyz'
# Change the value for the key 'HKEY_CLASSES_ROOT\.xyz:' into 'MyApp'
# Create or edit Registry Key: 'HKEY_CLASSES_ROOT\MyApp\Shell\Open
# Change Registry Key value for 'HKEY_CLASSES_ROOT\MyApp\Shell\Open
\Command' into: '"C:\pathtomyapp\myapp.py" "%1"'
Check an existing registry key, how they do it.