473,241 Members | 1,465 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,241 software developers and data experts.

Need help getting "Startup" items

I'm making a utility similar to MSConfig, I've found it easy enough to
obtain the startup items from the registry for the current user and local
machine... but what about the Startup folder on the Start Menu?

I've found there are 2 system variables that could help me but.. what is the
proper way to get these locations? And be win95/98/me/nt/2k/xp compatable?

ALLUSERPROFILE=C:\Documents And Settings\All Users
USERPROFILE=C:\Documents And Settings\Current User

But I know you can move your profile and what about roaming profiles?

Also what if I want to list all the users on the machines and their startup
items (via their start menu\startup and registry) then I cant use
CurrentUser to access registry.... hrmmm

Can anyone help?

------
If you respond to one of my posts please respond also via e-mail if possible
as I have limited Usenet access, thank you!
Nov 20 '05 #1
1 1750
Locke Nash Cole wrote:
I'm making a utility similar to MSConfig, I've found it easy enough to
obtain the startup items from the registry for the current user and
local machine... but what about the Startup folder on the Start Menu?

I've found there are 2 system variables that could help me but.. what
is the proper way to get these locations? And be win95/98/me/nt/2k/xp
compatable?

ALLUSERPROFILE=C:\Documents And Settings\All Users
USERPROFILE=C:\Documents And Settings\Current User

But I know you can move your profile and what about roaming profiles?
What you need is in the registry. Remember that the Startup folder can also
have a different name in different localised versions of Windows (in the
Dutch version it's called Opstarten), so never hard code these things.
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\Shell
Folders contains all the info you need (in this case, the Startup key)

You can actually access this in code without directly accessing the
registry. To get the name of the startup folder for instance, use:
Dim startup As String =
Environment.GetFolderPath(Environment.SpecialFolde r.Startup)
Also what if I want to list all the users on the machines and their
startup items (via their start menu\startup and registry) then I cant
use CurrentUser to access registry.... hrmmm


You might be able to enumerate the members of HKEY_USERS, but remember that
on WinNT/2k/xp/2003 you might not have access to the registry of all users,
and access to their actual start menu location is even more likely to be
restricted, so don't assume you can do this at all.

--
Sven Groot
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: gagaguy | last post by:
1.i saw "+=" in a program code,but i haven't see it before,neither can i find it in a cook,who can tell me the usage of "python0" 2.how can i know how long does a program run?
3
by: Paramesh | last post by:
Hello friends, My friend asked me this question: This question regards proprietary software (of which I am one of the developers), so I cannot post actual code for this question. I will try...
6
by: Clément Collin | last post by:
I working on a GIS project, with Access link which just need a little routine in VBA, but I haven't knowledges in VBA language. It's very simple, and it looks like that in a TPascal way : .......
8
by: Martin | last post by:
I hope not, but, I think the answer to this question is "it can't be done". Northwind sample database. Orders form. Go to a new record. Select a customer in "Bill To:" Don't enter any...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
0
by: =?Utf-8?B?ay1jZXNz?= | last post by:
A nonfunctional icon/box calle "Dialog" appears in taskbar on "Startup" On the left side of this is a blue arrow touching a blue ball. Move & Close are the only optons. What causes this, how do i...
4
by: evenlater | last post by:
Anybody know how to prevent the annoying Access 2007 "Getting Started with Access" page from showing up when the database is closed using DoCmd.Quit? My database is used in a terminal server...
6
by: John Wright | last post by:
During my program startup I need to check for a couple of things. 1. I need to check for network availability 2. I need to check for database connectivity 3. I need to check for access to the...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.