Old 1st March 2006, 14:56   #1
ehrens
Junior Member
 
Join Date: Mar 2006
Posts: 6
Writing (Default) values in registry

Hi,

I'm new at this... I'm trying to modify an existing script that we had been using to add in file associations between our custom file extension and our application. I've done it manually in the registry to get it working and then went to do it in the script and am having problems.

The problem is... When I do it manually, I set the values, for example, DefaultIcon (Default) REG_SZ c:\icon\icon.ico ...and this works. But, when I use the nsi file, I have the following line...

WriteRegStr "HKCR" "LMS\DefaultIcon" "(Default)" "c:\icon\icon.ico"

This adds a 2nd entry into the key's folder for (Default), it doesn't replace or modify the default one that is there when the key was created. How would I just write the default value of the key?

Thank you,

Aaron
ehrens is offline   Reply With Quote
Old 1st March 2006, 14:59   #2
glory_man
Senior Member
 
Join Date: Sep 2004
Location: Mogilev (Belarus)
Posts: 372
Use
code:
WriteRegStr "HKCR" "LMS\DefaultIcon" "" "c:\icon\icon.ico"
glory_man is offline   Reply With Quote
Old 1st March 2006, 17:53   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
As glory_man has pointed out, "" covers the default key name, not "(Default)" (which is just to show the default key name in regedit).

-Stu
Afrow UK 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