Archive: Default registry key


Default registry key
Hi ,
I have a question with all Registry key expert , as i am attaching a file with this post, in this attachment the first line under the red circle of the registry key is by default, i have written the registry code for the five line which is given below...

WriteRegStr HKLM "Software\${APPNAME}\Microsoft\Office\Outlook\Addins\OutlookAddIn12" "CommandLineSafe" "1"
WriteRegStr HKLM "Software\${APPNAME}\Microsoft\Office\Outlook\Addins\OutlookAddIn12" "Description" "OutlookAddIn12 -- an addin created with VSTO technology"
WriteRegStr HKLM "Software\${APPNAME}\Microsoft\Office\Outlook\Addins\OutlookAddIn12" "FriendlyName" "OutlookAddIn12"
WriteRegStr HKLM "Software\${APPNAME}\Microsoft\Office\Outlook\Addins\OutlookAddIn12" "LoadBehavior" "3"
WriteRegStr HKLM "Software\${APPNAME}\Microsoft\Office\Outlook\Addins\OutlookAddIn12" "Manifest" "[TARGETDIR]OutlookAddIn12.dll.manifest"

My question is that default registry code which is coming by default should not come or how to write code that our second line of attached file should overwrite the first line, i don't want to delete the default key manually , any help should be appreciated ..
Thanks


Use an empty value name.

WriteRegStr HKLM "Software\${APPNAME}\Microsoft\Office\Outlook\Addins\OutlookAddIn12" "" "default"

Thanks kichik for reply ,
By that code we can make change in the default registry, but how to delete the default line which i have shown in the attached file...


DeleteRegValue HKLM "Software\${APPNAME}\Microsoft\Office\Outlook\Addins\OutlookAddIn12" ""

Thanks for replying,
The code you have given is not working.......means it is not deleting the whole row in the registry ..


Deleting the whole row as in you want nothing about "(Default)" being displayed in the registry? That's impossible. There is no registry key that doesn't have that line. It can be empty "(value not set)", but it can't disappear.


yes , thats i was thinking too ..
Thanks so much kichik ...