Solved

How to allow a program always run at startup and run as an administrator?

Posted on 2004-07-30
5
948 Views
Last Modified: 2013-12-04
I create a Limit user account, this account have a program always run at startup and it needs to read/write some settings in the registry. However Windows prevents it from modifying the registry because it's running under a Limit user account.
How do I allow this program always run at startup with administrator permission?
0
Comment
Question by:geidza
5 Comments
 
LVL 4

Expert Comment

by:WerewolfTA
ID: 11677331
Sounds like you need to script that program to run with administrator credentials.  Try this link:

http://www.jsiinc.com/SUBO/tip7100/rh7111.htm
0
 
LVL 11

Expert Comment

by:gothicbloody
ID: 11680141
0
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 11680264
Two cases here: If the program changes (restricted) settings in the HKCU part, there's nothing you can do except change the permissions on the trees in question. Any "runas" procedure will not have access to another user's registry.
If this is only about the HKLM part, the easiest solution would be to simply create a scheduled task to run at logon, and use an appropriate user account to run the scheduled task.
Another option, if the security on the keys in question isn't really a concern, would be to get RegMon (http://www.sysinternals.com/ntw2k/source/regmon.shtml) (and maybe FileMon, http://www.sysinternals.com/ntw2k/source/filemon.shtml), logon with the limited account, start RegMon with an administrative account using runas, filter for your program and have RegMon log errors only, then start the program. RegMon will report the errors, so that you can identify the keys in question and change the permissions accordingly. Once that's done, the user can run the program without further problems.
0
 
LVL 4

Expert Comment

by:WerewolfTA
ID: 11680474
Damn, I think I like oBdA's solutions better than mine.  :)  

Never even thought about the reg keys permissions in HKCU. You rock, man!
0
 

Author Comment

by:geidza
ID: 11682915
yes, setting key permissions in the registry is a simple way.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question