Old 20th May 2012, 00:32   #1
oldfriend
Member
 
Join Date: May 2008
Location: Ukraine
Posts: 93
Question Windows 7 and File Association

Hello everyone!

It happened so that I start my posts from the question "Is it possible or not?" to solve my problem. As well as now actually.

I have a simple media player and I want to associate media file types with it. I found VLC player installer script here and without further ado have placed some parts to my one. Unfortunately, my player becomes default for those file types only for which previously there wasn't defined any player or application. This means that if e.g. avi file was previously player with WMP by default after installing my player and associating avi with it WMP remains default program for this file type.

But if I try to open avi file via context menu and "Open with ..." there my player is first in the list. Unfortunately, this doesn't help much.

As I noticed during the installation of VLC the same problems occurs.

So main question here: is it possible at all to associate application and file types via installer?

P.S. To prevent possible suggestions of "try to ... " need to say that I'm known and already tried "RequestExecutionLevel admin", "UserInfo plug-in", "UAC plug-in" "run as administrator" with no luck or without confidence that problem is in admin privileges.

Thank you for attention, reading and possible help.
oldfriend is offline   Reply With Quote
Old 21st May 2012, 18:31   #2
oldfriend
Member
 
Join Date: May 2008
Location: Ukraine
Posts: 93
Ok, I hope absence of answers doesn't mean my problem is unsolvable, but those who know salvation haven't seen this post yet

Probably anybody knows how to change:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.avi\UserChoice]
"Progid"="WMP11.AssocFile.AVI"

with, e.g.
"Progid1"="WMP11.AssocFile.AVI"

i.e. simply change "Progid" with "Progid1"

I was unable to do this under administrator account.
oldfriend is offline   Reply With Quote
Old 21st May 2012, 18:59   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,153
You are not really supposed to mess with UserChoice, just follow the docs

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 21st May 2012, 20:08   #4
oldfriend
Member
 
Join Date: May 2008
Location: Ukraine
Posts: 93
Quote:
Originally Posted by Anders View Post
You are not really supposed to mess with UserChoice, just follow the docs
Thank you, but I don't have problems with Shortcuts.

Any other ideas?
oldfriend is offline   Reply With Quote
Old 21st May 2012, 20:38   #5
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
AFAIR you need to go back to user level if you want to set at user level - see:

Quote:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion

I was unable to do this under administrator account.
as admin it will go admins user settings.

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 21st May 2012, 22:26   #6
oldfriend
Member
 
Join Date: May 2008
Location: Ukraine
Posts: 93
Quote:
Originally Posted by Brummelchen View Post
AFAIR you need to go back to user level if you want to set at user level - see:

Quote:
Originally Posted by oldfriend View Post
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion


I was unable to do this under administrator account.
as admin it will go admins user settings.
Well, probably it was a wrong way of salving my main problem. Anyway any thoughts about file association?
oldfriend is offline   Reply With Quote
Old 21st May 2012, 22:39   #7
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
do it like vlc did

Quote:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.avi]
"VLC.backup"="WMP11.AssocFile.AVI"
@="VLC.avi"
Brummelchen is offline   Reply With Quote
Old 21st May 2012, 23:22   #8
oldfriend
Member
 
Join Date: May 2008
Location: Ukraine
Posts: 93
Quote:
Originally Posted by Brummelchen View Post
do it like vlc did
Once again need to that after installing VLC player files previously associated with WMP are still opened with WMP even if you associate them with VLC.

That's why I'm here.

Please don't reply if you haven't faced with such problem.
oldfriend is offline   Reply With Quote
Old 21st May 2012, 23:50   #9
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,153
Quote:
Originally Posted by oldfriend View Post
Thank you, but I don't have problems with Shortcuts.

Any other ideas?
Actually read the page I linked to? That page also links to this . Those two pages link to all the information about registering file types...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 22nd May 2012, 01:27   #10
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
na, dont bother me with your dullness, i tried to help

first - did you install vlc with your script or with the official setup?
i guess your script is outdated and buggy wether i've seen it or not.

second - you cant fix it your way - not possible

third - you need to reconnect WMP to all its files
then you need to clear up that vlc crap connections

fourth - delete this tree
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
you will loose some connections - just reconnect later

reinstall vlc with official setup
you can do that in sandboxie to grab the knowledge behind how it works.
sandboxie forum offers tools for that
otherwise install it normally

much faster to repair something you dont get ATM

HTH
Brummelchen is offline   Reply With Quote
Old 22nd May 2012, 19:54   #11
oldfriend
Member
 
Join Date: May 2008
Location: Ukraine
Posts: 93
Thank you, Anders. Will read more carefully.


Quote:
Originally Posted by Brummelchen View Post
na, dont bother me with your dullness, i tried to help
Brummelchen, words "don't reply" were not directed personally to you, so please don't be rude.

Quote:
Originally Posted by Brummelchen View Post
first - did you install vlc with your script or with the official setup?
Yes installer was taken from http://www.videolan.org/vlc/download-windows.html and after redirecting to http://sourceforge.net/ was downloaded, so it is official. Ans it's installer DOESN'T ASSOCIATE files with VLC player which were previously associated with WMP. To complete association you need to do this via VLC player later. It is confirmed! On clean system. Not by me only.

Quote:
Originally Posted by Brummelchen View Post
i guess your script is outdated and buggy wether i've seen it or not.
as you wish


Quote:
Originally Posted by Brummelchen View Post
second - you cant fix it your way - not possible
I'm beginning to think so to, too sad

Quote:
Originally Posted by Brummelchen View Post
third - you need to reconnect WMP to all its files
then you need to clear up that vlc crap connections
VLC is not my goal. I just used it's installer's patrs with the only success with non-associated files and in this case it works fine.

Quote:
Originally Posted by Brummelchen View Post
fourth - delete this tree
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
you will loose some connections - just reconnect later
I can't do this neither with installer nor with my admin rights ander admin account. And not only me.

Quote:
Originally Posted by Brummelchen View Post
reinstall vlc with official setup
you can do that in sandboxie to grab the knowledge behind how it works.
sandboxie forum offers tools for that
otherwise install it normally
as I sad i don't need VLC

Quote:
Originally Posted by Brummelchen View Post
much faster to repair something you dont get ATM
No comments

Quote:
Originally Posted by Brummelchen View Post
HTH
Not really, since unfortunately your post is not connected with my NSIS problem. Anyway, thank you Brummelchen for your time and attention.
oldfriend is offline   Reply With Quote
Old 23rd May 2012, 17:52   #12
oldfriend
Member
 
Join Date: May 2008
Location: Ukraine
Posts: 93
Anders, thank you very much for the link which helped me to understand more deep file association in the Windows 7 (and Vista)

Brummelchen, you were right regarding the
code:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts

my problem was exactly in the registry key, so thank you for pointing me there.

At the moment I'm writing and testing clear version if installer, so when I finish I'll explain were I was wrong.
oldfriend is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump