Solved

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

Posted on 2001-08-15
6
158 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
link access with Quickbooks 9 41
VBA code to compact and repair Access 2010 database on exit? 9 168
Access Query (QBE) Using VBA Function for Criteria 13 57
Vb.Net Loading Word 11 98
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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 this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

21 Experts available now in Live!

Get 1:1 Help Now