Working With 32 & 64 Bit Registry
Sep 24, 2010I've got a 32bit app & the following reg key works fine in 32 bit operating systems but not 64bit systems.
[Code]...
I've got a 32bit app & the following reg key works fine in 32 bit operating systems but not 64bit systems.
[Code]...
Dim rk As Microsoft.Win32.RegistryKey
rk = My.Computer.Registry.CurrentUser.OpenSubKey("SYSTEMCurrentControlSetControlSession ManagerBootExecute", True)
rk.SetValue("BootExecute", "autocheck autochk /p ??C:")
I'm trying to make a application that will start "Check Disk " on boot time.But i get this error
Object reference not set to an instance of an object.
This time i'm tring to work with registry values and so i'm using the following code Private Function RegKeyExists(ByVal hKey As Long, ByVal sKeyPath As String) As Boolean
[Code]...
I've got a program which sets focus to a web browser, selects all and copies to clipboard. all of this works.my problem is pasting from the clipboard. I want the text pasted into a new file which I can create and open programatically but when I place clipboard.gettext in the parenthesis as the string to send to the file, nothing happens. there's no error and nothing gets pasted to the target file.i've confirmed the copy on the windows clipboard viewer just can't get it to write it to the file. (also tried just setting a textbox's text property to clipboard.gettext for testing purposes but it still does nothing)
View 1 RepliesIn my application I am selecting a folder path and then asking the user if he/she wants to display full path or file names only.
My problem arises when I want to insert the results in a datagridview. The datagridview has 2 columns:
column1 ----> shows file name
column2 ----> shows file size in MB.
with the below code I get the file name and then the file size on the same column one after the other
I want to show as follows:
File Name Size (MB)
sample.txt 1.2
myspreadsheet.xls 0.6
Seanie.bmp 0.8
What do I need to modify in order to achieve this?
Code:
I have the following code in my application and the code works fine in Windows 2000, XP but for some reason does not work in Windows Vista, is someone able to help me with this?[code...]
View 8 RepliesI have the following code in my application and the code works fine in Windows 2000, XP but for some reason does not work in Windows Vista, is someone able to help me with this?
dim myReg as string = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINESoftwareMyCompanyMySoftware", "Path", Nothing)
this works partially but if I close the reg key as shown I get an error [code]So my question is how/where do I place the Myreg.close and OldReg.Close commands???
View 3 RepliesError is coming Registry Access is not allowed.While Opening a Key.
Code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
NewDelete("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun", "Sonia")
End Sub
[CODE]...
I've had a bit of a look around the net and on the forums but I've yet to find an answer to my question. I've got Visual Basic 2008 Express and I'm trying to write some registry entries, I can write strings fine just using
[Code]...
Currently, I am try to get the email addresses that have been saved or stored by the user of the computer. This isn't the emails that the user has sent or received, or the contacts he/she has in his address book. Just simply the email accounts that have been accessed from the computer.I know that there are some locations stored in the registry that have the email account. The email addresses that are used on the current computer. I just can't seem to find them on my computer.I am not sure if the registry is the only place to find it or if it stored on the web browser such as internet explorer or google chrome.
View 1 RepliesI 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.
I have several programs that must write to HKLM in XP and Windows 7/64 Pro.The programs work in VB6 but not in VB.Net 2008 on target machines. It does works on our development machine. [code]I just cannot figure out why VB6 works but .net doesn't and fails only on the target machine not the development machine.
View 2 RepliesHow can I change the permissions of a registry key. I want to allow anyone in the "Users" group to be able to write to "SOFTWAREMyApp".
View 2 RepliesI want to get every single registry Name and value, which lies in HKEY_CURRENT_USER....Run(for getting and THEN deleting them to prevent run those programs at windows start). This is just for getting names.
Imports Microsoft.Win32
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click[code].....
Well, this isnt working, when i run it in the vb and click button, it says system missing member exception: IWshShell3 hasnt been found.
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 Replieshow do i write to the windows registry and read from the registry?i'm using windows 7 - 64 bits, and visual studio 2008.
View 1 RepliesI need to be able to change a line in the regisrty an am not sure how to go about it, i have searched but nothing i can understand at the moment.
Code:
HKCU,"SOFTWAREMicrosoftInternet ExplorerDesktopGeneral","Wallpaper",0x00020000,"%SYSTEMDRIVE%WebDreamSceneBeach.html"
The part in bold is the part i need to be able to change as i am having to write a little program to change the background on the desktop.
I should be ok once i know more on how to do things like this.
I just bet the answer to this question already exists, however I saw no search mechanism under the forum. Anyhow, I would like to change registry data, and this code is asking for an instance to the object.
Dim RegKey As RegistryKey = My.Computer.Registry.LocalMachine.OpenSubKey("HKEY_CURRENT_USERSoftwa reAnyDWGSoftwareDWGtoPDFProSettings", True)
RegKey.SetValue("OutputPDFFileOpt", 1)
Finally, I want to apply this setting to the program on four different computers (local, and three others on the network).
I wrote an application to manage several installers and I wanted to throw in some registry settings as well. Unfortunately the following code is not writing to the registry, nor is it returning any exceptions.I'm running Visual Basic 2010 Express as administrator using Windows 7 64 bit, I can manually add the values, and I can add them from a .reg file manually but not even by calling the .reg file as a new process (it asks for permission, says it succeeded, but nothing changed).The key already exists, all I need to do is add two values.
My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION", True)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION", "uwgm_client.exe", 32768, Microsoft.Win32.RegistryValueKind.DWord)[code].....
Currently I am using this code to check for Firefox on a 32 bit machine
Code:
Dim Firefox32 As String
Firefox32 = My.Computer.Registry.GetValue _
("HKEY_LOCAL_MACHINESOFTWAREMozillaMozilla Firefox 5.0in", "PathToExe", Nothing)
MsgBox("The value is " & Firefox32)
If the value is found then the above message is fine, but if the entry is not found I want it to display a message like: "Firefox could not be found" instead of "The value is: " What code would make this appear?
[Code]...
I found on msdn samples and modified (add Thread.GetDomaind.UnhandledException)
<SecurityPermission(SecurityAction.Demand, Flags:=SecurityPermissionFlag.ControlAppDomain)> _
Public Sub Main()
' Add the event handler for handling UI thread exceptions to the event.[code].....
It appears that my favorite thing in the world is tackling projects that are beyond my current knowledge and abilities. I have a little project that I am working on which is a simple image viewer stocked with (upon completion) your standard Load..., Next/Previous, Zoom In/Out, Actual Size, and Full Screen capabilities. However, I am running into a few snags:
(1) I've been able to get my "Load..." button to display a file dialog box, but I cannot seem to get a working filter (with which only image file types are allowed to be selected) in working order.
(2) I have a PictureBox object (entitled PictureBox1) that displays the image selected via the file dialog box, but it loads images in their full size (1:1/100% zoomed) state without scrollbars, etc. to allow me to navigate the loaded image. I would like to have it load the image, initially, to fit within the dimensions of PictureBox1 and from there be able to zoom in/out via my "Zoom In/Out" and "Actual Size" buttons and be able to scroll if the zoom level is beyond the dimensions of PictureBox1.
(3) It dawned on me that I haven't the faintest idea how to get my "Next/Previous" buttons to allow the user (me) to navigate, in succession, the images contained in the folder in which the currently loaded image is stored. [code]
If it is deemed that this thread is inappropriately requesting help, I ask that it be locked/deleted quickly as I recognize that this is a large community with many discussions going without need of unwelcome posts.
How can i add a value to this?
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows
[Code].....
I am trying to add Hex value to registry[code]...
View 1 RepliesI want an option in the context menu of Windows to open my software when clicked.To do this i need to create a key in the HKEY_CLASSES_ROOT\*\shell directory I did some research but couldn't figure out how i can create a key to open up my application I need the key to be created when the user clicks the "Add to windows context menu" Command button And i need the key to be removed when the user clicks the "Remove from windows context menu" Command button?
View 7 RepliesI've written a Windows 7 app that runs from the notification area. When I'm installing it, where do I put it so it starts automatically. Do I use the all users startup folder or do I use the Run key in the registry?Or is there another prefered location?
View 1 RepliesI am a complete beginner vb 2008, and for once collected exemple from the other people.I wonder how the contents of a registry key (enable-disable TaskManager)I enter in the register with button to enable and disable taskmanager.[code]...
View 6 RepliesI am looking for a way to block registry changes unless I choose to allow them to be made. So basically if an application tries to make a change my program would display a dialog with information of the change and I can either click Allow Change or Disallow Change.
Only thing is I am not sure how I go about stopping a registry change before it happens.
The following code causes an error but should work. Any ideas? The same code (originally in REALbasic) does work so the currentuser (also an admin on the pc) does have access to write to the registry.
[Code]...