473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Why does my app not load user scope my.settings when in starts by registry run key

Why does my app not load the saved user scope my.settings when it starts by way of the registry run key? This key starts programs after the user login, per microsoft. So why does it not load the saved user settings? The program does start up, but all the areas on the form where saved user scope settings should be, are the default values (mostly empty strings). (The user scope settings are there if I start my program by the desktop shortcut.)

I've looked, searched, posted to other forums, but can't seem to find an answer.

I'm pretty much a novice programmer, and any help would be much appreciated. Thanks a lot.
Aug 17 '10 #1
2 1722
MrMancunian
569 Expert 512MB
Is the link that is in your Registry\Run key the same as the link you use when you click the desktop shortcut? Which registry is it in? If there are user settings, I'd imagine you put it in the HKCU (CurrentUser) instead of the HKLM (Local Machine).

Steven
Aug 17 '10 #2
Mr. Mancunian, thanks for the reply.

The Registry link is in HKCU and is: C:\Users\Jeff\AppData\Local\Apps\2.0\D5ZPYN2E.G6B\ 0YHBPWKG.YJD\ab2l..tion_0000000000000000_0001.0000 _bd808c8132a0d2ac\AB2L6WS.exe -hide; while the Desktop shortcut shows no such link (it's a ClickOnce deployment). The shortcut properties are:
Name: AB2L 6-Way Sync.appref-ms
Type: ClickOnce Application Reference
Folder Path: C:\Users\Jeff\Desktop

More info: The settings work fine if I start program by using the startmenu link, Desktop link, or command line in command prompt. Also if I use the Release version .exe (before deployment) with the run key there is no problem. But using the debug .exe or the downloaded version with the run key there is a problem.

In case you want to know, my code to create the reg key is:
Expand|Select|Wrap|Line Numbers
  1.  Try
  2.             Dim regKey As RegistryKey
  3.             regKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
  4.             Dim myPath As String = Application.ExecutablePath & " -hide"
  5.             regKey.SetValue(Process.GetCurrentProcess.ProcessName, myPath)
  6.         Catch
  7.         End Try
I've already checked to see if it had anything to do with the " -hide" (which hides the form by defining " -hide" in the form load event) by taking it out, but I get the same result.

I'm wondering if it has something to do with ClickOnce, but I don't know.

Curious to see what you might think. Thanks again.
Aug 17 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: nigb | last post by:
I am running a 3rd party commercial access application (Access 2003 & XP) which initially installs in demo mode then when registered the details are kept in HKEY_CURRENT_USER\Software\VB and VBA...
0
by: Dave O | last post by:
Has anyone had experience loading a previous version of an assemblie's settings when installing a newer version of the assembly? for example, the old assembly version is 1.0.0.0 and its settings...
3
by: Trapulo | last post by:
What does mean this error? The current configuration system does not support user-scoped settings. I'm accessing a my.settings data from a DAL dll referenced by an ASP.NET app. I've a...
0
by: Cyke | last post by:
Hello, I have created an ASP.NET application that consumes a C# webservice. The webservice works fine on its own. However, when I try to access it from my applicaiton, I get the following...
4
by: vighnesh | last post by:
Hello EveryOne Can Anybody help in finding out What are User Software Settings and System Software Settings in Windows Registry.I mean what are all the keys that are concerned to User Software...
3
by: davepkz | last post by:
I have a basic question about managing user.config settings: In my C# app, I save the user's preferences to the config file. But each time I release a new build of the app, something in .NET...
0
by: dfererer | last post by:
Published application's user scope Properties.Settings.Default file can be found in every users's Documents and settings,but where is it in debug mode?
3
by: nielsena54 | last post by:
Hi all, I have an application setting (user-scope) that tracks if the application is opened for the first time. There are also some other settings such as user names that are stored. I have a...
0
by: active T | last post by:
Hello, Is it possible to setup the user scope settings during the install of a application. In VS2005 I create a setup project. I add a installer class into my application project and...
2
by: John A Grandy | last post by:
Apparently stroring app specific settings in the registry is taboo for .net applications ? Anyone care to expand on this ? Is there an established system for storing app settings in xml config...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.