473,320 Members | 1,853 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,320 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 1753
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.