Solved

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

Posted on 2001-08-15
6
153 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now