Jump to content

File Association


Zbuby
 Share

Recommended Posts

Hi all, (I'm french so i'm sorry for my speaking)

I just want to know if is it possible to assoiacte file to a software with an autoit script ?

I use PortableOpenoffice and when a file is saved and we want to open it, we have to right-click and open with ! :P

thank you.

^^

Edited by Zbuby
Link to comment
Share on other sites

Forum Rules This is not a general support forum!

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

hi,

first, you have posted this in the wrong place.

second, as you said, it is portable so all the computers you are use with don't know that your software on your external harddisk or thumb drive or what ever is associated with an extension, to solfe this, you can do difficult but i think the easyest way is to first open (portable)openoffice.org and than open the file you want.

to do it in the difficult way, it is possible to write a (autoit) script for it

an last (but not least) your english isn't that bad (I'm from the netherlands)

Edited by Pakku
Link to comment
Share on other sites

Hi all, (I'm french so i'm sorry for my speaking)

I just want to know if is it possible to assoiacte file to a software with an autoit script ?

I use PortableOpenoffice and when a file is saved and we want to open it, we have to right-click and open with ! :P

thank you.

^^

Tu pouras trouver la donnée de la fiche a cet endroit:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts

c'est simple.

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Link to comment
Share on other sites

Method using ftype and assoc. They make the registry refresh associations after use so you can open the file without needing to restart explorer.

; _FiletypeAssociation('.test', 'test', 'notepad "%1"', 'test description')

Func _FiletypeAssociation($extension, $type, $program, $description = '')
    ; e.g. _FiletypeAssociation('.pdf', 'FoxitReader.Document', '"%ProgramFiles%\FoxitReader.exe" "%1"')
    $exitcode = RunWait(@ComSpec & ' /c ftype ' & $type & '=' & $program & _
             ' && assoc ' & $extension & '=' & $type, '', @SW_HIDE)
    If $description And Not $exitcode Then
        Return RegWrite('HKCR\' & $type, '', 'Reg_sz', $description)
    EndIf
    Return Not $exitcode
EndFunc

:P

Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...