Registry Picker to export registry files

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
GHIsolierung
Posts: 62
Last visit: Tue Nov 02, 2021 12:46 am

Registry Picker to export registry files

Post by GHIsolierung »

Product, version and build: Powershell Studio 2019, Version 5.6.160
32 or 64 bit version of product: 64bit
Operating system: Windows 10, 1803
32 or 64 bit OS: 64bit

I want to be able to click on a registration path in my Forms application and export it later.

I have tried to adapt your example, but unfortunately without success.
In the example I can only print the subkeys, but like in the picture when I click on 7zip I want to have the whole path to exactly this key. Later I want to export, import this key.
Is it possible that you give me another example, or customize your own?

Code: Select all

$formRegistrypicker_Load={
	$regKey = Get-Item HKLM:\
	$script:n = New-Object System.Windows.Forms.TreeNode
	$n.Name = $regKey.PsPath
	$n.Text = $regKey.Name
	$n.Tag = $regKey
	$treeview1.Nodes.Add($n)
	
}

$treeview1_NodeMouseClick = [System.Windows.Forms.TreeNodeMouseClickEventHandler]{
	if ($_.Node.Nodes.Count -eq 0) {
		foreach ($keyName in ($_.Node.Tag.GetSubkeyNames())) {
			Try {
				$regKey = $_.Node.Tag.OpenSubKey($keyName)
				$n = New-Object System.Windows.Forms.TreeNode
				$n.Name = $regKey.PsPath
				$n.Text = $keyName
				$n.Tag = $regKey
				$_.Node.Nodes.Add($n)
				
				
				
			} Catch {
				Write-Host $_
			}
		}
	}
	# display properties...



example_registrypicker.png
example_registrypicker.png (6.19 KiB) Viewed 2827 times
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Registry Picker to export registry files

Post by davidc »

I'm sorry, but I'm not familiar with this example. Can you provide a link?

It looks like you have access to the registry items directly, so you should be able to use the Name property of the RegistryKey object:

Code: Select all

$_.Node.Tag.Name
David
SAPIEN Technologies, Inc.
User avatar
GHIsolierung
Posts: 62
Last visit: Tue Nov 02, 2021 12:46 am

Re: Registry Picker to export registry files

Post by GHIsolierung »

Hi and thanks for reply.
I thought this example was from you...I dont know the exact link anymore.

Code: Select all

[attachment=0]treeview.psf[/attachment]
Attachments
treeview.psf
(189.29 KiB) Downloaded 144 times
User avatar
GHIsolierung
Posts: 62
Last visit: Tue Nov 02, 2021 12:46 am

Re: Registry Picker to export registry files

Post by GHIsolierung »

David, is it possible that you look at the example and answer the question?
I don't think I can do it alone.
Thank you for your help.
I just want to export a complete registry key using this 'Mini-GUI'.
This topic is 4 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.