User Tag List

Results 1 to 9 of 9

Thread: AppData\Roaming read\write privileges in non-admin Windows user account?

  1. #1
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    AppData\Roaming read\write privileges in non-admin Windows user account?

    I've run into a major issue with my software. On my computer I don't have this issue, so I am curious if it has to do with Windows user accounts and their privileges.

    At installation, the PC's HD serial and a license key (generated from an online server at time of purchase) is encrypted and written to an .ini file in the user's AppData\Roaming directory. If the program is ever launched and the current HD serial doesn't match the one in the .ini file, the user is prompted with the registration routine. Therefore, the first time they run the program they are prompted to register.

    This setup has run great on my own computer and a few I've tested it on. The thing is, I've had user's tell me the program prompts them with the registration routine eventually, even though things were running well for quite some time. That should only happen if that .ini was either deleted or contains a non-matching HD serial. The computers this is happening to have not had hardware changes, so I don't think it could be the HD serial issue. The computers do, however, have Windows user permissions in place and the program is run under a non-admin user account. I'm assuming that is causing the file to be deleted at some point.

    If anyone has any idea how I can address this issue, I will be VERY grateful. My program is primarily used in schools and other teaching institutions, so it is most likely the user will be involved in Windows user accounts.

  2. #2
    Clicker Fusion 2.5 DeveloperInstall Creator Pro

    Join Date
    Sep 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi ratty,
    Is it not a roaming profile problem? Meaning roaming files are not attached to a specific computer and will be seen identically amongs all computers of a network. This kind of file should be local and not roaming file.
    ouly

  3. #3
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    AppData\Roaming read\write privileges in non-admin Windows user account?

    Ouly, thanks for the info. Where should I put such a file? AppData\Local? Is there a way to guarantee that directory across various builds of Windows? I currently use the File Object AppDataDirectory$ expression, though that defaults to AppData\Roaming. I think I previously misunderstood roaming directory use and am curious what input you have.

    Edit: I tried using AllUsersAppData$ (C:\ProgramData). It seems the program cannot write to the file after it is created at installation. Is there a way to use Install Creator to allow users to write to that?

  4. #4
    Clicker Fusion 2.5 DeveloperInstall Creator Pro

    Join Date
    Sep 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi ratty,
    Here are more informations on roaming and local settings/data: http://technet.microsoft.com/en-us/l.../cc766489.aspx
    Then, to retrieve local settings folder, the best is probably to use Dll Object, SHGetFolderPath() * and CSIDL_LOCAL_APPDATA **

    Or perhaps an easier alternative would be just to write data in registry using Registry Object.

    ouly

    * http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
    ** http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

  5. #5
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Wont the registry object require permissions as well if various users need to write to the file? Will the local settings allow access by all users?

  6. #6
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I guess another key question I have is if the AppData\Roaming files are ever just randomly deleted. Knowing that would help solve a lot of this issue.

    And sorry for the sporadic posting. I'm just in a bit of a pickle and need to squash the issue ASAP. I really appreciate the community input.

  7. #7
    Clicker Fusion 2.5 DeveloperInstall Creator Pro

    Join Date
    Sep 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi ratty,
    Sorry, you are right. The best option would be to have a file shared by all users on a specific device and not roamed on any other device. In this case CSIDL_COMMON_APPDATA folder would be better.
    As stated on MSDN about this folder:
    This information will not roam and is available to anyone using the computer.
    This is the folder that you tried using AllUsersAppDataDirectory$() expression of the File object. Now, looking to MS documentation, this file is effectively read-only for normal users. Except that it is allowed to change permissions of sub-folders:
    This information will not roam and is available to anyone using the computer. By default, this location is read-only for normal (non-admin, non-power) Users. If an application requires normal Users to have write access to an application specific subdirectory of CSIDL_COMMON_APPDATA, then the application must explicitly modify the security on that sub-directory during application setup.
    ouly

    Reference:
    http://msdn.microsoft.com/en-us/library/ms995853.aspx

  8. #8
    Clicker Fusion 2.5 DeveloperInstall Creator Pro

    Join Date
    Sep 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now, to change permissions during setup, the best is probably to execute Cacls (deprecated but still available on Win 8): http://technet.microsoft.com/en-us/l.../bb490872.aspx or Icacls (not sure if it's installed by default, to check): http://technet.microsoft.com/en-us/l...=ws.10%29.aspx

  9. #9
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    AppData\Roaming read\write privileges in non-admin Windows user account?

    Ouly, I greatly appreciate your support on this matter. I'll be sure to check those links when I'm home today.

Similar Threads

  1. read/write an ini
    By arthurh in forum Android Export Module Version 2.0
    Replies: 9
    Last Post: 28th May 2013, 08:08 AM
  2. Accessing "C:\Users\USERNAME\AppData\Roaming\Clickteam\offli ne3.INI"
    By Xeeko in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 29th June 2012, 06:06 AM
  3. Install Creator needs admin privileges. Why?
    By SethAluma in forum Install Creator and Patch Maker
    Replies: 8
    Last Post: 28th August 2011, 01:27 PM
  4. Windows 7 User Account Control issues!
    By SirEatAlot in forum Multimedia Fusion 2 - Technical Support
    Replies: 16
    Last Post: 27th October 2010, 12:03 AM
  5. Ask for Admin Privileges
    By wizkidweb in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 3rd November 2009, 05:24 PM

Posting Permissions

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