venerdì 19 novembre 2010

impostare associazione di file con win xp

anche windows ha la linea di comando. certo un po' desolante ma insomma qualcosina c'è

da noi, nel palazzuccio, sembra che il tecnico non sappia trovare come impostare via group policy le associazioni tra file .doc e openoffice.org

ho trovato qui
http://www.brianmadden.com/blogs/brianmadden/archive/2004/04/20/creating-custom-file-associations-to-support-side-by-side-applications.aspx

questa roba del 2004 che forse funziona ancora

# Since installing Acrobat changed the PDF file association for all your users, you need to change it back to the free Acrobat Reader. (Since you have many more users who need the free one and you don’t want to risk anything from a licensing standpoint, it’s a good idea to make the default option the free reader.)
# Execute “ftype |more” from a command line to find out the internal file type name for Acrobat Reader documents. (This will vary depending on your version of Acrobat, but it’s called “pdf_auto_file” for Acrobat Reader 6.02.) Remember, when you’re looking through the list, you need to make sure you find the one that’s associated with AcroRd32.exe, not Acrobat.exe. You’ll have to skip through several pages all the way down to the “P” section.
# Use a command called “assoc” to associate the PDF file extension with the internal file type for the free Acrobat reader. You can execute this command on the console directly, and it will modify the HKLM classes key that affects all users. In this case, the command would be “assoc .pdf=pdf_auto_file”
# Now that everyone is configured to launch PDF files with the free Acrobat Reader, you need to get the five users in the “Acrobat Users” group configured to use the full version of Acrobat. I like to do this via a logon script. If you’re using Kixtart, you can easily create a script that checks for group membership and then writes the proper registry key and value.



in pratica si tratta di fare un ftype e trovare il tipo con cui è riconosciuto il file .doc (di default è un WordPad.Document.1 (bella idea congratulazioni) va impostato con

assoc .doc=opendocument.WriterDocument.1

anche qui .1 , vabbè

ecco fatto, basta inserirlo in uno script eseguito con le policy di gruppo e voilà anche quel pirla di windows è a posto.

Nessun commento:

Posta un commento