Index: sansview/installer_generator.py
===================================================================
--- sansview/installer_generator.py	(revision fa5979903069ec07217984e991d9c863a7cc3766)
+++ sansview/installer_generator.py	(revision 50282f8d610bca0a19f8876d0a175269d3da0561)
@@ -10,5 +10,5 @@
 REG_PROGRAM = """{app}\MYPROG.EXE"" ""%1"""
 APPLICATION = str(local_config.__appname__ )+ '.exe'
-AppName = str(local_config.__appname__ )# + '-'+ str(local_config.__version__)
+AppName = str(local_config.__appname__ )
 AppVerName = str(local_config.__appname__ )+'-'+ str(local_config.__version__)
 Dev = ''
@@ -31,6 +31,4 @@
 PrivilegesRequired = 'none'
 INSTALLER_FILE = 'installer_new'
-#find extension for windows file assocation
-#extension list need to be modified for each application
 
 icon_path =  local_config.icon_path
@@ -42,6 +40,8 @@
     Describe the extensions that can be read by the current application
     """
+    list_data = []
+    list_app =[]
     try:
-        list = []
+        
         #(ext, type, name, flags)
         from sans.dataloader.loader import Loader
@@ -50,12 +50,12 @@
             #['All (*.*)|*.*']
             file_type, ext = string.split(item, "|*", 1)
-            if ext.strip() not in ['.*', ''] and ext.strip() not in list:
-                list.append((ext, 'string', file_type))
+            if ext.strip() not in ['.*', ''] and ext.strip() not in list_data:
+                list_data.append((ext, 'string', file_type))
     except:
         pass
     try:
         file_type, ext = string.split(local_config.APPLICATION_WLIST, "|*", 1)
-        if ext.strip() not in ['.', ''] and ext.strip() not in list:
-            list.append((ext, 'string', file_type))
+        if ext.strip() not in ['.', ''] and ext.strip() not in list_app:
+            list_app.append((ext, 'string', file_type))
     except:
         pass
@@ -63,12 +63,12 @@
         for item in local_config.PLUGINS_WLIST:
             file_type, ext = string.split(item, "|*", 1)
-            if ext.strip() not in ['.', ''] and ext.strip() not in list:
-                list.append((ext, 'string', file_type)) 
+            if ext.strip() not in ['.', ''] and ext.strip() not in list_app:
+                list_app.append((ext, 'string', file_type)) 
     except:
         pass
-    return list
-EXTENSION = find_extension()
-    
-def write_registry(extension=None):
+    return list_data, list_app
+DATA_EXTENSION, APP_EXTENSION = find_extension()
+
+def write_registry(data_extension=None, app_extension=None):
     """
     create file association for windows.
@@ -76,7 +76,39 @@
     """
     msg = ""
-    if extension is not None and extension:
+    if data_extension is not None and data_extension:
+        openwithlist = "OpenWithList\%s" % str(APPLICATION)
         msg = "\n\n[Registry]\n"
-        for (ext, type, _) in extension:
+        for (ext, type, _) in data_extension:
+            list = os.path.join(ext, openwithlist)
+            msg +=  """Root: HKCR;\tSubkey: "%s";\t""" % str(list)
+            msg += """ Flags: %s""" % str('uninsdeletekey noerror')
+            msg += "\n"
+        #list the file on right-click
+        msg += """Root: HKCR; Subkey: "applications\%s\shell\open\command";\t"""\
+                              %  str(APPLICATION)
+        msg += """ValueType: %s; """ % str('string')
+        msg += """ValueName: "%s";\t""" %str('') 
+        msg += """ValueData: \"""{app}\%s""  ""%s1\"""; \t"""% (str(APPLICATION),
+                                                          str('%'))    
+        msg += """ Flags: %s""" % str('uninsdeletevalue noerror')
+        msg += "\n"
+        user_list = "Software\Classes" 
+        for (ext, type, _) in data_extension:
+            list = os.path.join(user_list, ext, openwithlist)
+            msg +=  """Root: HKCU;\tSubkey: "%s";\t""" % str(list)
+            msg += """ Flags: %s""" % str('uninsdeletekey noerror')
+            msg += "\n"
+        #list the file on right-click
+        user_list = os.path.join("Software", "Classes", "applications")
+        msg += """Root: HKCR; Subkey: "%s\%s\shell\open\command";\t"""\
+                              %  (str(user_list), str(APPLICATION))
+        msg += """ValueType: %s; """ % str('string')
+        msg += """ValueName: "%s";\t""" %str('') 
+        msg += """ValueData: \"""{app}\%s""  ""%s1\"""; \t"""% (str(APPLICATION),
+                                                          str('%'))    
+        msg += """ Flags: %s""" % str('uninsdeletevalue noerror')
+        msg += "\n"        
+    if app_extension is not None and app_extension:
+        for (ext, type, _) in app_extension:
             msg +=  """Root: HKCR;\tSubkey: "%s";\t""" % str(ext)
             msg += """ValueType: %s;\t""" % str(type)
@@ -89,34 +121,42 @@
             msg += """ Flags: %s""" % str('uninsdeletevalue')
             msg += "\n"
-     
-        #create default icon
-        msg += """Root: HKCR; Subkey: "{app}\%s";\t""" % str(SetupIconFile)
-        msg += """ValueType: %s; """ % str('string')
-        msg += """ValueName: "%s";\t""" % str('') 
-        msg += """ValueData: "{app}\%s,0"\n""" % str(APPLICATION)
+    msg += """Root: HKCR; Subkey: "{app}\%s";\t""" % str(APPLICATION)
+    msg += """ValueType: %s; """ % str('string')
+    msg += """ValueName: "%s";\t""" % str('') 
+    msg += """ValueData: "{app}\%s";\t""" % str("SansView File") 
+    msg += """ Flags: %s \t""" % str("uninsdeletekey")
+    msg += "\n"
         
-        #execute the file on double-click
-        msg += """Root: HKCR; Subkey: "{app}\%s\shell\open\command";\t"""  %  str(APPLICATION)
-        msg += """ValueType: %s; """ % str('string')
-        msg += """ValueName: "%s";\t""" %str('') 
-        msg += """ValueData: \"""{app}\%s""  ""%s1\"""\n"""% (str(APPLICATION),
-                                                              str('%'))
-        
-        #SANSVIEWPATH
-        msg += """Root: HKLM; Subkey: "%s";\t"""  %  str('SYSTEM\CurrentControlSet\Control\Session Manager\Environment')
-        msg += """ValueType: %s; """ % str('expandsz')
-        msg += """ValueName: "%s";\t""" % str('SANSVIEWPATH') 
-        msg += """ValueData: "{app}";\t"""
-        msg += """ Flags: %s""" % str('uninsdeletevalue')
-        msg += "\n"
-        
-        #PATH
-        msg += """; Write to PATH (below) is disabled; need more work\n"""
-        msg += """;Root: HKCU; Subkey: "%s";\t"""  %  str('Environment')
-        msg += """ValueType: %s; """ % str('expandsz')
-        msg += """ValueName: "%s";\t""" % str('PATH') 
-        msg += """ValueData: "%s;{olddata}";\t""" % str('%SANSVIEWPATH%')
-        msg += """ Check: %s""" % str('NeedsAddPath()')
-        msg += "\n"
+    #execute the file on double-click
+    msg += """Root: HKCR; Subkey: "{app}\%s\shell\open\command";\t"""  %  str(APPLICATION)
+    msg += """ValueType: %s; """ % str('string')
+    msg += """ValueName: "%s";\t""" %str('') 
+    msg += """ValueData: \"""{app}\%s""  ""%s1\""";\t"""% (str(APPLICATION),
+                                                          str('%'))  
+    msg += """ Flags: %s \t""" % str("uninsdeletevalue noerror")
+    msg += "\n"                                                      
+    #create default icon
+    msg += """Root: HKCR; Subkey: "{app}\%s";\t""" % str(SetupIconFile)
+    msg += """ValueType: %s; """ % str('string')
+    msg += """ValueName: "%s";\t""" % str('') 
+    msg += """ValueData: "{app}\%s,0"\n""" % str(APPLICATION)
+
+    
+    #SANSVIEWPATH
+    msg += """Root: HKLM; Subkey: "%s";\t"""  %  str('SYSTEM\CurrentControlSet\Control\Session Manager\Environment')
+    msg += """ValueType: %s; """ % str('expandsz')
+    msg += """ValueName: "%s";\t""" % str('SANSVIEWPATH') 
+    msg += """ValueData: "{app}";\t"""
+    msg += """ Flags: %s""" % str('uninsdeletevalue')
+    msg += "\n"
+    
+    #PATH
+    msg += """; Write to PATH (below) is disabled; need more tests\n"""
+    msg += """;Root: HKCU; Subkey: "%s";\t"""  %  str('Environment')
+    msg += """ValueType: %s; """ % str('expandsz')
+    msg += """ValueName: "%s";\t""" % str('PATH') 
+    msg += """ValueData: "%s;{olddata}";\t""" % str('%SANSVIEWPATH%')
+    msg += """ Check: %s""" % str('NeedsAddPath()')
+    msg += "\n"
         
     return msg
@@ -143,6 +183,5 @@
     return msg
 
-path, _ =  os.path.split(os.getcwd())
-dist_path = os.path.join(path, "scripts", "dist")
+dist_path = "dist"
 def write_file():
     """
@@ -154,7 +193,9 @@
     msg += """Source: "dist\*";\tDestDir: "{app}";\t"""
     msg += """Flags: ignoreversion recursesubdirs createallsubdirs\n"""
-    msg += """Source: "%s\*";\tDestDir: "{app}\%s";\t""" % (icon_path, str("images"))
+    msg += """Source: "%s\*";\tDestDir: "{app}\%s";\t""" % (str(icon_path), str("images"))
     msg += """Flags: ignoreversion recursesubdirs createallsubdirs\n"""
-    msg += """Source: "%s\*";\tDestDir: "{app}\%s";\t""" % (test_path, str("test"))
+    msg += """Source: "%s\*";\tDestDir: "{app}\%s";\t""" % (str(test_path), str("test"))
+    msg += """Flags: ignoreversion recursesubdirs createallsubdirs\n"""
+    msg += """Source: "%s\*";\tDestDir: "{app}\%s";\t""" % (str(media_path), str("media"))
     msg += """Flags: ignoreversion recursesubdirs createallsubdirs\n"""
     msg += """;\tNOTE: Don't use "Flags: ignoreversion" on any shared system files"""
@@ -250,5 +291,6 @@
     TEMPLATE += "PrivilegesRequired=%s\n" % str(PrivilegesRequired)
    
-    TEMPLATE += write_registry(extension=EXTENSION)
+    TEMPLATE += write_registry(data_extension=DATA_EXTENSION,
+                                app_extension=APP_EXTENSION)
     TEMPLATE += write_language()
     TEMPLATE += write_tasks()
Index: sansview/installer_new.iss
===================================================================
--- sansview/installer_new.iss	(revision d4c19e5f5e7a7eda9ebaa848b52d647d4f05bb25)
+++ sansview/installer_new.iss	(revision 50282f8d610bca0a19f8876d0a175269d3da0561)
@@ -26,29 +26,31 @@
 
 [Registry]
-Root: HKCR;	Subkey: ".txt\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".xml\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".tif\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".tiff\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".asc\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".dat\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".sans\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCR; Subkey: "applications\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1""" ; Flags: uninsdeletevalue noerror
-Root: HKCU;	Subkey: "Software\Classes\.txt\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.xml\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.asc\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.dat\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.tif\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.tiff\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.sans\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
-Root: HKCU; Subkey: "Software\Classes\applications\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1""" ; Flags: uninsdeletevalue noerror
+Root: HKCR;	Subkey: ".xml\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".txt\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".asc\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".dat\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".tif\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".abs\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".d1d\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".sans\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR; Subkey: "applications\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1"""; 	 Flags: uninsdeletevalue noerror
+Root: HKCU;	Subkey: "Software\Classes\.xml\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes\.txt\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes\.asc\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes\.dat\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes\.tif\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes\.abs\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes\.d1d\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes\.sans\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR; Subkey: "Software\Classes\applications\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1"""; 	 Flags: uninsdeletevalue noerror
 Root: HKCR;	Subkey: ".svs";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
-Root: HKCR;	Subkey: ".fitv"; ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
+Root: HKCR;	Subkey: ".fitv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
 Root: HKCR;	Subkey: ".inv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
 Root: HKCR;	Subkey: ".prv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
-Root: HKCR; Subkey: "{app}\SansView.exe"; ValueType: string; ValueName: ""; ValueData: "SansView File"; Flags: uninsdeletekey 
-Root: HKCR; Subkey: "{app}\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1""" ; Flags: uninsdeletevalue noerror
+Root: HKCR; Subkey: "{app}\SansView.exe";	ValueType: string; ValueName: "";	ValueData: "{app}\SansView File";	 Flags: uninsdeletekey 	
+Root: HKCR; Subkey: "{app}\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1""";	 Flags: uninsdeletevalue noerror 	
 Root: HKCR; Subkey: "{app}\images\ball.ico";	ValueType: string; ValueName: "";	ValueData: "{app}\SansView.exe,0"
 Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment";	ValueType: expandsz; ValueName: "SANSVIEWPATH";	ValueData: "{app}";	 Flags: uninsdeletevalue
-; Write to PATH (below) is disabled; need more work
+; Write to PATH (below) is disabled; need more tests
 ;Root: HKCU; Subkey: "Environment";	ValueType: expandsz; ValueName: "PATH";	ValueData: "%SANSVIEWPATH%;{olddata}";	 Check: NeedsAddPath()
 
@@ -62,11 +64,10 @@
 
 
-
 [Files]
 Source: "dist\SansView.exe";	DestDir: "{app}";	Flags: ignoreversion
 Source: "dist\*";	DestDir: "{app}";	Flags: ignoreversion recursesubdirs createallsubdirs
 Source: "images\*";	DestDir: "{app}\images";	Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "test\*";	DestDir: "{app}\test";	Flags: ignoreversion recursesubdirs createallsubdirs
 Source: "media\*";	DestDir: "{app}\media";	Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "test\*";	DestDir: "{app}\test";	Flags: ignoreversion recursesubdirs createallsubdirs
 ;	NOTE: Don't use "Flags: ignoreversion" on any shared system files
 
Index: sansview/local_config.py
===================================================================
--- sansview/local_config.py	(revision 8e3dc19e70bc161819fbe6590c0384552a35aa9a)
+++ sansview/local_config.py	(revision 50282f8d610bca0a19f8876d0a175269d3da0561)
@@ -37,8 +37,8 @@
 _license = "mailto:sansdanse@gmail.com"
 
-path = os.getcwd()
-icon_path = os.path.join(path, "images")
-media_path = os.path.join(path, "media")
-test_path = os.path.join(path, "test")
+
+icon_path = "images"
+media_path = "media"
+test_path =  "test"
 
 _nsf_logo = os.path.join(icon_path, "nsf_logo.png")
