Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2001-08-15
6
Medium Priority
?
182 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 300 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
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

610 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