Solved

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

Posted on 2001-08-15
6
172 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

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.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

691 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