Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

I want to create a registry string :

 

HKEY_CURRENT_USER\Software\Nico Mak Computing\WinZip\WinZip

 

And set the value of "0" to it.

 

So the shortest way is:

 

Dim ExtractKey As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\Nico Mak Computing\WinZip\WinZip")

ExtractKey.SetValue("OpnExplFolder", "0")

ExtractKey.Close()

 

?

I'm doing it good and is there a shorter way? And .Close is necessary?

Thank you very much...

  • 2 weeks later...
Posted

1) .Close is a good idea as without it the file is still open in the RAM. It is good practice.

 

2) i can't see a quicker way of doing it, unless you want to change your 'Explicit' option to off.

 

so don't change a thing in this case, as it is a small enough peace of coding anyway

 

> LamKat

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...