File Associations - is it stored somewhere in UE files

File Associations - is it stored somewhere in UE files

8
NewbieNewbie
8

    Nov 10, 2005#1

    I have made a setup for a number of people where uedit32.ini, .kbd and other ultraedit files are copied to those peoples machine. I would very much like to have the file associations which is done on my machine (.txt, .log etc) were transferred to the other peoples machins.

    Is such information saved in any UltraEdit file. It seems as uedit32.ini does not carry this information. If saved in an ultraedit file then this file could be given to the different users which then wouldn't need to do the file associations manually themselves.

    344
    MasterMaster
    344

      Nov 10, 2005#2

      Hi Krivo,

      no, file associations are stored in the registry, for each user.

      Look here:
      http://www.microsoft.com/technet/script ... opts2.mspx


      The following script changes the default program used to open files with a given extension.


      Const HKEY_CURRENT_USER = &H80000001
      strComputer = "."
      strExtension = "TEXT"
      strFileExtsKey = "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\"
      strNewProgram = "excel.exe"

      Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
      strComputer & "\root\default:StdRegProv")

      strKeyPath = strFileExtsKey & "." & strExtension

      strEntryName = "Application"
      objReg.SetStringValue _
      HKEY_CURRENT_USER,strKeyPath,strEntryName,strNewProgram


      Modify this script and let it run from the users.
      NO GUARANTEE FROM ME HERE !!!!

      rds Bego
      Normally using all newest english version incl. each hotfix. Win 10 64 bit

      6,675585
      Grand MasterGrand Master
      6,675585

        Nov 11, 2005#3

        At Advanced - Configuration File Associations you can specify the files associated to UltraEdit. But this information is stored only in the registry.

        What you can do is to create a DOS terminated ASCII text file with following content (example):

        ------------- START CUT HERE --------------------------
        REGEDIT4

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.log]
        @="UltraEdit.log"

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.log]
        @="Log file"

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.log\shell]

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.log\shell\open]

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.log\shell\open\command]
        @="\"C:\\Program Files\\UltraEdit\\Uedit32.exe\" \"%1\""

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.log\shell\print]

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.log\shell\print\command]
        @="\"C:\\Program Files\\UltraEdit\\Uedit32.exe\" /p \"%1\""

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt]
        @="UltraEdit.txt"

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.txt]
        @="Text document"

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.txt\shell]

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.txt\shell\open]

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.txt\shell\open\command]
        @="\"C:\\Program Files\\UltraEdit\\Uedit32.exe\" \"%1\""

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.txt\shell\print]

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.txt\shell\print\command]
        @="\"C:\\Program Files\\UltraEdit\\Uedit32.exe\" /p \"%1\""

        ------------- END CUT HERE --------------------------

        You see, you have to create for every extension a block of registry entries and each extension has it's own description. Also possible is a "compressed" version, where all associated files have the same file description - see example below.

        ------------- START CUT HERE --------------------------
        REGEDIT4

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.log]
        @="UltraEdit.Document"

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt]
        @="UltraEdit.Document"

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.Document]
        @="UltraEdit Document"

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.Document\shell]

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.Document\shell\open]

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.Document\shell\open\command]
        @="\"C:\\Program Files\\UltraEdit\\Uedit32.exe\" \"%1\""

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.Document\shell\print]

        [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\UltraEdit.Document\shell\print\command]
        @="\"C:\\Program Files\\UltraEdit\\Uedit32.exe\" /p \"%1\""

        ------------- END CUT HERE --------------------------

        Now save the file with extension .reg, for example UltraEdit_Associations.reg. Every user has to double click with primary (left) mouse button on this file to import the settings into his/her registry. Or you run a silent import with following command:

        regedit /s "Path to the reg file\UltraEdit_Associations.reg"

        Note: Check path to uedit32.exe in examples above. It can be different on your computer!
        Best regards from an UC/UE/UES for Windows user from Austria

        8
        NewbieNewbie
        8

          Nov 12, 2005#4

          Hi Guys,

          thanks for the tips. I just used your input for a .reg file Mofi. It works very nice.

          I'm wondering whether I should think about an environmental variable which described where UE is installed. Thereby I could probably make the .reg file and maybe other of my files work despite different installation paths for UE. I have changed to the default installation path proposed by UE but it actually would have been better if the default path was kept for c:\program files\ultraedit - then I wouldn't have needed to change my setup :-)