Reading From Registry's Uninstall Section?
Apr 5, 2007
I'm trying to read keys in the HKLM Uninstall section in my attempt to do a software inventory. I tried the WMI, it works but it doesn't show everything. I decided to just read each of the sub keys in the Uninstall section, but it doesn't show everything.
The code works, but it's just not showing some items.
Dim UninstallKey, SubKey As RegistryKey
Dim SubUninstallKeyNames() As String
UninstallKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, "\" &
[Code]....
View 4 Replies
ADVERTISEMENT
Feb 11, 2010
Does anyone know how to use the registry section in Inno Setup to add a registry key that make a program start with windows when a Checkbox is checked in the setup wizard? If anyone know please step forward. I am getting near the launch of a program and it would be nice to include this feature.
View 5 Replies
Dec 20, 2006
I have program that on first run will run after installed will setup a server connection. The next times the program is run it will not execute this code to setup the server as it was done in the first run.
I can't use clickOnce IsFirstRun as the customer doesn't want that used for installation.I am using MSI to create the setup. I right click setup / view / Registry. I create a key value, example "HKEY_CURRENT_USERSoftwareReality", "App", "Installed"I set the property AlwaysCreate = false, and DeleteAtUninstall = true.
My big question I don't want to create the key value when the application is first installed. Only delete it when uninstalled.My code for checking for the key value:
Code:If (My.Computer.Registry.GetValue("HKEY_CURRENT_USERSoftwareReality", "App", Nothing) <> "Installed") Then 'The program is running for the first time so create key value My.Computer.Registry.SetValue("HKEY_CURRENT_USERSoftwareRealitySolutions", "CodeRed", "Installed") 'Setup server for the fist time Else 'The key exists so go no need to setup the server'Do something else End If
The key value deletes on the uninstalled - which is what i want it to do. However, it always creates the key value when installed. i don't want it to do this. It should only create the key value in the code.Can any tell me, when setting up the registry in the setup project, is there a way to stop it from creating the key value when the program is installed.
View 4 Replies
Sep 17, 2010
I am trying to enumerate the
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall
registry key and check the displayname & displayversion registry value for all the sub keys under the uninstall key then compare the displayname & displayversion value with a if statement.
For example if one of the the displayname = "Adobe Flash Player 10 ActiveX" & displayversion = "10.1.82.76" then textbox.text = "Your adobe flash is up to date"
This is the code I been using to check a specific registry value to see if quicktime 7.67.75.0 is installed i figured it would be best to enumerate the subkeys and check the displayname & displayversion because im checking like 6 programs to see if the version is current.
Dim quicktime As String
quicktime = My.Computer.Registry.GetValue _
("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall{EB900AF8-CC61-4E15-871B-98D1EA3E8025}", "DisplayVersion", Nothing)
[Code].....
View 1 Replies
Aug 27, 2008
I am writing an application that connects to a specific com port. This com port can change depending on how many physical ports are on the PC, and if other USB devices have installed com ports before this one.
I have the communication to the com port all working great, but I need to get the com port description not just the "COM#" which is all I currently get.
I found in the registry where the description is stored but am having trouble doing what I need.
In this key:
Code:
HKEY_LOCAL_MACHINESYSTEMControlSet001ControlClass{4D36E978-E325-11CE-BFC1-08002BE10318}
there is a varied number of sub keys. The are numbered 0000-NNNN depending on how many ports you have. Inside each of these keys, there are multiple values, although I am only interested in one or 2 of them.
My problem is, that I do not know how to get a list of the subkeys (the 0000-NNNN keys/folders) from the original key I posted. I have looked through a few registry tutorials, and I can view the default value in the listed key, but I could not find how to list the subkeys of the listed key.
Does anyone have any sample code they could share that shows how I can get a listing of subkeys, and then run through those subkeys checking for a specific value in one of the strings contained in the subkey?
I am using VB.net 2008 and Windows XP.
View 1 Replies
Jun 23, 2011
Have a VB.net application that installs initially from CD and then when the user gets into the internet the application updates. In order to better support problems with this application is has been suggested in the past to uninstall it and do a fresh re-install. However, in investigation it was determined that the uninstall does not consider all installed objects and does not uninstall the CD install.Can the uninstall functionality be modified to catch the other instances of this application and also uninstall them?
View 11 Replies
May 17, 2012
I'm having troubles reading the values from a registy key, basically I already have my code working which reads back data from a registry key with the name "data" however I also have another key called "data+" and when I attempt to read that the "+" get ignored and it reads back "data" which is in the same location. I have no power of changing the reg key, do I need to convert the + into hex or something like that, if so how do I that and then read it back?
View 16 Replies
Mar 15, 2011
I thought this was simple so i guess i am doing something wrong. want to read the value of an item in the registry.the value im after is the centralprofile key which im trying to get by passing the SID and looking up the subkey but it never returns anything.
my code
Function getprofilepath(ByVal SID As String) As String
Try
[code].....
View 3 Replies
Jul 27, 2009
I'm trying to implement code that can determine the value of a registry key dword value and put a check mark in the checkbox depending on if the key exist, does not exist, or equals ffffffff in hex (4294967295 in Decimal).[code]
View 4 Replies
Sep 20, 2010
I need to read a value (and possibly adjust the value) in HKLMSoftwareMicrosoftWindowsCurrentVersionUninstall key on both 32 and 64 bit systems.I've tried accessing 'stuff' by compiling my widget as both a 32 and 64 bit app, but nothing is working. Then I came across some information indicating that this could be done from a 32 bit applicaiton using KEY_WOW64_64KEY [URL] somehow, but I can't figure it out.
1) Check the existing value of HKLMSoftwareMicrosoftWindowsCurrentVersionUninstall{ProductGUID}DisplayVersion handling both architectures.
2) If the value <> "" And <> Our Current Version Then
3) Write the Current Version to the value mentioned in step 1.
I wouldn't think this is that difficult as I've worked with registry before, but the 64 bit stuff is throwing me for a loop.It would be nice if I could compile my app to target AnyCPU then detect where its running on 32 or 64 bit. The app could then look and update in the appropriate location.I currently am set to use .NET 2.0, but could go to 4.0 if there is something in there that makes the above tasks easier.
View 1 Replies
Jun 23, 2010
I'm trying to understand how to get a string from the registry. There are a lot of walkthroughs, and information about retrieving known strings, keys. But what about if the value changes or could be unknown? For example, I wrote some values to the registry:
[Code]....
The txt1.Text information will differ so I can't say it is a definite string. The txt1.Text will be created based on information entered into the form and then it is encrypted. It will be unique to that user, but I want to compare the string in the registry key to one in a textbox on the form.
View 3 Replies
Feb 23, 2009
I have been following tutorial from Bort and writed encrypted string to registry with this
[Code]...
Now I want to read that from registry and get the date witch is encrypted to decrypted to textbox so I can compare it to date.today. How can I get that date from registry. I have used this Tutorial: RSA Encryption in VB.NET and tried to get these trial version tutorials to work together.
View 2 Replies
Jul 6, 2011
What I need is a method to read the registry (completely) and then compare to another, my reasoning for this is so that I can track the changes that happen through programs to the registry so that I can make them portable so that I can code in vb.net on my flashdrive (not really) but it would be pretty useful.
View 3 Replies
Aug 16, 2011
I am trying to get the value of a registry key with the REG_NONE type. MSDN suggests that RegistryKey.GetValue does not support reading of this type, and the default value (Nothing) is returned instead of the actual value.
View 10 Replies
Apr 21, 2009
I want read the below remote registry using VB.Net. "SOFTWAREMicrosoftWindowsCurrentVersionInstall erUserDataS-1-5-18Products"
View 4 Replies
Apr 14, 2009
how do i read from registry, i want my program to do this once u open it it reads the registry for a number 1 means non-active 1.2 means active i its active it bring you to form 2 if not it just stays t form 1
View 6 Replies
Feb 8, 2011
I am trying to loop through a key to get all values. For some reason this returns nothing
Dim RegKey2 As RegistryKey = Registry.LocalMachine.OpenSubKey("SoftwareCompanyStartup")
Dim subname() = RegKey2.GetSubKeyNames
MsgBox(subname.Length)
[code].....
View 2 Replies
Oct 24, 2011
I was just playing around with trying to set up a datacontract that returned a class that had a property that took/returned an enum value. I could set the class up so that it worked great, but the service contract seen by the client had the enum turned into a string, of all things. Had it been turned into an Integer, that would have been useable, but not a string
View 1 Replies
Aug 9, 2009
I am trying to read all the attributes, there are 3, from a single node. This is what I tried from an example I found:
Code:
Dim xl As New XmlDocument
xl.Load(XMLfile)
Dim rn As XmlNode = xl.SelectSingleNode("p1")
[code]....
I have used a messagebox to show the xl.OuterXml, I see the file is loaded.
View 3 Replies
Feb 15, 2011
How can i make and read a registry key? my program creating a registry key (on the first run) and later reading it to see if it is registered or not. any suggestions on how i can manage this?
i do know it goes something like: my.computer.registry.currentuser.createsubkey, but im stuck making it and i have no clue as to where to read it...
--ThrDude--:P If it is not worth it, it is not fun - you say programmers are boring but i say they are worth it.
View 7 Replies
Mar 6, 2012
the following code is not reading the registry on a 64bit server 2008. I don't think that I have it correct and am looking for assistance.
Protected Overrides Sub OnStart(ByVal args() As String)
Dim messagestr As String = ""
''first lets read the registry in order to get ip addresses etc..
[code].....
View 4 Replies
May 28, 2010
i need a way to open a offline registry and read the oem info from it. The registry will be from a a hdd from another pc atached to mine. What im trying to accomplish is open the offline registry and read the model/serial info on it. i am able to read the registry of the booted system but no a offline one.
View 3 Replies
Aug 18, 2010
I'm trying write a code that will check the framework version on the same computer it runs.
Now this code has to be able to run on every machine regardless the frameowrk version on it.
Now, i know how to read one registery key, but i don't know how to check muliple keys.
For example "HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDP"
Under the key "NDP" there are a couple of more keys, how can i get the keys name?
View 2 Replies
Mar 5, 2006
Trying to read a registry key that has a name and a value associated with it. However, the value name doesn't have a name, per say, but it does have a name of (Default).
Anyway, the following lines of code return a value of Nothing.
Dim ReadValue As Object = My.Computer.Registry.GetValue _
("RegKeyName", "(Default)", Nothing)
'Try to use "(Default)" for the name.
However, if I pass empty quotes, as the ValueName, it returns the correct value for the value name. I spent quite alot of time before even thinking of trying it with empty quotes.
Dim ReadValue As Object = My.Computer.Registry.GetValue _
("RegKeyName", "", Nothing)
'Passing empty quotes for the name.
Is passing the empty quotes the correct way of getting the values from the (Default) value names? I don't want to assume this is going to work in all occasions only to get tripped up later.
View 5 Replies
Jun 24, 2010
I have the following code to read values in the ABCInstall folder inside SOFTWARE sub key of which is under HKEY_LOCAL_MACHINE.
This works fine in Windows XP but not in Windows 7. make it work in both XP and Windows 7?
Dim Key As RegistryKey = Registry.LocalMachine.OpenSubKey _
("SOFTWARE\ABCInstall", False)
Dim SubKeyNames() As String = Key.GetSubKeyNames()
[Code].....
View 2 Replies
Sep 24, 2009
What I am trying to do is save a value (from a textbox) to the registry, and later retrieve the same:This is the code (not working) that I have at the moment:My.Computer.Registry.SetValue(My.Application.Info.Title, (TextBox1.Text), "MyFCA")
View 17 Replies
May 6, 2009
I want to read 'File.ini' line by line checking if specific text exists in the file and then display on a windows form weather particular settings are turned on or off.So far this code works if "TargetText" exists but if it doenst I get an error on the code line: "If line.Contains("TargetText") Then".
Code:
Using z As System.IO.StreamReader = New System.IO.StreamReader(File.ini")
Dim line As String
' Read first line.
[code]....
It works if "TargetText" exists in a line in the file but if it doesnt exist I get the 'Null Reference Exception. Object reference not set to an instance of an object.'
View 4 Replies
Sep 1, 2008
Alright this is what im working with. Im Working with vb.net 2003.I have (X) amount txt files in "C:Marble".In each txt files there are 3 lines.I want to read the first line of each txt file and display them in a listbox. [code] Things i need to Find:
-1 How to tell how many files are in a folder
-2 How to create a loop were it reads the first line of each file in that folder
View 13 Replies
Mar 6, 2010
I'm trying to read multiple values from a registry subkey in the CurrentUser key. I need to display these values in a listbox with multiple lines. I so far can only get one of the values from the subkey. I know (or at least I think I know) that I need to list the values in a string (with a possible loop), and then just display the string to the listbox. The subkey is the TypedURLs under CurrentUserSoftwareMicrosoftInternet Explorer Typed URLs. Here is my code I have so far (I did a year of basic VB as part of my Uni course).[code]
View 4 Replies
Apr 24, 2009
An application that my company uses stores report files with a .dat extension for use with their software. These files can be opened in notepad and the basic report information can be seen as text. I am attempting to write an app that opens and reads data from these .dat files and displays it in a checked listbox. My hangup thus far is that I can't figure out how to read the data from the .dat files since they are not .txt files. Can anyone point me in the right direction?
[Code]...
View 5 Replies