Solved

Why can?t my software modify it?s own file on Win2000.

Posted on 2001-08-15
6
167 Views
Last Modified: 2013-12-03
Why is my software tied to the permission level of the login user? If in NT/2000/XP the user does not have modify file permissions for my software?s folder, then my software can not edit it's own files! What am i missing? i know that my software should be able to modify it's own data files no matter who is logged on. My software is written in VB.
0
Comment
Question by:L_P
  • 3
  • 2
6 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 6389583
You are correct.  Permissions are based on the USER running the program not the program itself.  If the logged on user starting the program doesn't have modify permissions for the file or folder where the program is located, the program cannot be modified by that user.

You are no longer in the free and clear world of DOS and WinNT and its successors have real security.  If you want to perform an operation that you don't have permission to perform, you will be stopped!
0
 

Author Comment

by:L_P
ID: 6389997
My software is auto started by Windows, not a user. This is done in the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run registry key. Is there a way to have Windows auto start my software and not have it at the logged in users security level?
0
 
LVL 32

Accepted Solution

by:
jhance earned 100 total points
ID: 6390013
The HLM\....CurrentVersion\Run is processed on your behalf by Windows but all of these apps run in the context of the currently logged on user and they start at logon time.

If you need to run something under a DIFFERENT user account, you must use a SERVICE and have the Service Control Manager (SCM) start it at boot time.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 5

Expert Comment

by:robpitt
ID: 6392651
Not that I've done this but...

You may be able to use the LogonUser() and CreateProcessAsUser() etc to execute code in the context of another user who has the required privaledges.
0
 

Author Comment

by:L_P
ID: 6417444
was not the answer i was looking for.
0
 
LVL 32

Expert Comment

by:jhance
ID: 6418132
>>was not the answer i was looking for.

Sorry, sometimes reality intrudes on our world.  It's just the way it is.  You can either do it the right way or stick with DOS where anything goes...
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

730 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