This topic contains 2 replies, has 1 voice, and was last updated by
December 17, 2015 at 5:43 pm #33099
I created a custom resource to set file associations and it works, sometimes.
As I'm explaining the problem here I'm realizing it is probably not a DSC, maybe not even a powershell, problem – but all the smart people are here, so can I ask it anyway, or is there a more appropriate forum I should go to?
I use my custom resource to set file association for .txt and .log to notepad++.exe
But when a user double-clicks a .txt file it won't open, but a .log file will.
In my resource I use assoc and ftype to set the associations.
The correct filetype is set.
C:\Users\simon>assoc | grep txt
And this is associated with the right exe file:
txtfile="C:\Program Files (x86)\Notepad++\notepad++.exe" %1 %*
But it still remains that the txt file, when double-clicked on by a user, presents a popup to ask what application is they want to use to open the file, while the log file opens.
I have used the same file, changing it's extension through .log .txt .scp and .wtx (all the txtfile extension in my system). They all launch notepad++ except .txt
December 17, 2015 at 5:46 pm #33100
Digging deeper, Running
"C:\Program Files (x86)\Notepad++\notepad++.exe" C:\eula.1028.txt
on the command line does successfully launch notepad++ with the correct file
December 17, 2015 at 5:50 pm #33101
Digging deeper still. XML files.
I haven't touched the XML file configuration, it says:
xmlfile="C:\Program Files\Internet Explorer\iexplore.exe" %1
But double-clicking an xml file also presents the popup asking for an application, and running "C:\Program Files\Internet Explorer\iexplore.exe" does launch IE.
Sorry, this really is a Window Setup issue, isn't it?
The topic ‘Can't Set File Associations (Properly)’ is closed to new replies.