Solved

Accessing the Access rights of the User

Posted on 2002-06-13
6
126 Views
Last Modified: 2010-04-04
Hello everyone anybody can help me here?

We have a problem here coz we are making a SOFTWARE INSTALLER PROGRAM (for our multimedia products).
When installing our program (when on WINDOWS XP is used)
only the SYSTEM ADMINISTRATOR or the POWER USER have the full access of the system AND CAN write or remove installed programs in the system, BUT HOW ABOUT if the user is an ORDINARY USER. he cant install our software coz he/she dont have rights to install coz it will be a readOnly system. how can i change the system rights or how can i write files in the system and then make it restore the default?

for example i cant write from the WINDOWS DIRECTORY how can i make myself having a full access and then turn it back to its original rights.

anybody can help me with this one. and can give me CODES FOR IT. so that i can use it right away.

example

Procedure changeAccess(DirectoryPath;kinds_rights)
Procedure EditableFiles(Filename;kinds_rights)

DirectoryPath - any directory specified
Filename      - filename of the file you want to access
Kinds_rights  - can be readonly or writetable etc.

0
Comment
Question by:girlswants_me
6 Comments
 

Author Comment

by:girlswants_me
Comment Utility
help us please
0
 
LVL 14

Expert Comment

by:DragonSlayer
Comment Utility
write it to
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall

instead... coz every user can access that... unless of course, the System Admin has completely disabled registry access.
0
 
LVL 44

Expert Comment

by:CrazyOne
Comment Utility
Well this is a tough call. Consider that the SysAdmin may not want this to be done. They may have even setup these user's with the implicit intent of disallowing anything to be installed or uninstalled by that user. What you are asking seems as a way to circumvent the reason the Deny access is in place to begin with.


The Crazy One
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 14

Expert Comment

by:DragonSlayer
Comment Utility
... unless of course, you save the uninstallation details in an .ini file in the program folder, and add a shortcut to the uninstaller to the start menu as well
0
 
LVL 20

Accepted Solution

by:
Madshi earned 200 total points
Comment Utility
Hey, what would NT security be worth, if an ordinary user could change his own rights to be administrator like? You're joking, aren't you?

You have to live with the restrictions, that is: Don't use the Windows directory, don't use HKEY_LOCAL_MACHINE. Instead put everything into "C:\Program Files" and write to HKEY_CURRENT_USER. That's the way to go.

If your program can't run without putting something into the Windows directory (why???), you have to ask the user to let the administrator install the program.

Sorry for the bad news.

Regards, Madshi.
0
 

Author Comment

by:girlswants_me
Comment Utility
tHANK you so much MADSHI, we realized it all.
so to install programs you must see the system admin.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 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

15 Experts available now in Live!

Get 1:1 Help Now