Results 1 to 2 of 2

Thread: Running programs for non-previleged users in XP

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2003
    Location
    C:\Windows\Microsoft.NET\Framework
    Posts
    574

    Running programs for non-previleged users in XP

    Scenario
    ===========

    (1) You write a program using VB.NET.

    (2) You make an assembly out of the program by compiling it. It is a single module assembly.

    (3) You create a setup program for this.

    (4) During the setup, the user, an administrator group user, selects the option, "Install this program for all the people who use this computer, and not just for me."

    (5) The administrator group user finishes installing the program. Then he goes on to use it. He is able to use it.

    (6) The administrator group user logs off.

    (7) Another user, let's call him by the name John, who's only a "regular user" who does not belong to the administrator group (not even a Power User), logs in and wants to use the program. He double-clicks on the program exe icon on the desktop. It doesn't work for him.


    Questions:
    ============
    (1) Is is even possible or a reasonable demand that the user who does not have administrative previliges be able to use the program. It must be noted that the intention is so, since the administrator who installed the program supplied the choice "Install for everyone" while installing it.

    (2) If it is possible and a reasonable demand, how can it be accomplished?


    * I present an oversimplified version of the problem only to focus on the bare essentials of the problem.

  2. #2
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622

    Re: Running programs for non-previleged users in XP

    This problem depends on what your application does.

    For example a limited user only has READ permissions on anything in c:\Program Files\* unless its been explicitly given.

    to give limited users the proper rights, it must be installed as an Administator, and you should have your setup execute "cacls "c:\Program Files\MyApplication" /e /t /p users:F"

    You should probably only assign the rights you need but the above command should allow full access access to anyone within the "Users" group.


    Code:
    Displays or modifies access control lists (ACLs) of files
    
    CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]]
                   [/P user:perm [...]] [/D user [...]]
       filename      Displays ACLs.
       /T            Changes ACLs of specified files in
                     the current directory and all subdirectories.
       /E            Edit ACL instead of replacing it.
       /C            Continue on access denied errors.
       /G user:perm  Grant specified user access rights.
                     Perm can be: R  Read
                                  W  Write
                                  C  Change (write)
                                  F  Full control
       /R user       Revoke specified user's access rights (only valid with /E).
       /P user:perm  Replace specified user's access rights.
                     Perm can be: N  None
                                  R  Read
                                  W  Write
                                  C  Change (write)
                                  F  Full control
       /D user       Deny specified user access.
    Wildcards can be used to specify more that one file in a command.
    You can specify more than one user in a command.
    
    Abbreviations:
       CI - Container Inherit.
            The ACE will be inherited by directories.
       OI - Object Inherit.
            The ACE will be inherited by files.
       IO - Inherit Only.
            The ACE does not apply to the current file/directory.
    FYI: cacls.exe resides within %windir%\system32
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width