User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: Windows 7/Vista permissions

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    756
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Windows 7/Vista permissions

    My game needs save files. These save files ideally will live within the same folder as my exe. This exe ideally lives within the C:\Program Files\MyGame folder. Windows 7/Vista doesn't like letting my program create, modify, or delete files within Program Files unless I make it so the user has to run as an Admin. I would rather not have the user run as Admin, as some users are not allowed to do so on some computers.

    How do we get around this problem?

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Windows 7/Vista permissions

    You should save your files in a sub-directory of the user's Documents or AppData folders.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows 7/Vista permissions

    ...what Yves said.

    Basically, Program Files is a protected folder, and a correctly designed Windows application should not write there (unless it's an installer or updater). So, there's no problem really, this limitation makes Windows much more secure (e.g. malware can't change or infect the system or the installed software without first asking for admin rights) and forces programmers to save files at the right place.

    You can use the File object to retrieve the path to the user account's application data folder. Create a folder inside that, named after your game, and store the data there.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    756
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows 7/Vista permissions

    Gotcha, okay that makes sense. So how do I use the File Object to find the AppData folder? I'm away from my normal computer at the moment, otherwise I'd open up mmf2 and figure it out myself...

  5. #5
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)iOS Export Module (Steam)

    Join Date
    Jun 2007
    Location
    United States
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows 7/Vista permissions

    I suggest using My Documents instead. Windows XP doesn't have an AppData folder, so using it would mean your application won't save games properly on XP.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Windows 7/Vista permissions

    Windows has had an application data folder since at least Windows 95, I think.

  7. #7
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows 7/Vista permissions

    Yeah, on early versions of windows it maps directly to the user folder, on XP it is %User%/Local Settings/Application Data/ and on 7 it is %User%/AppData/Local/

  8. #8
    Clicker Fusion 2.5
    Warmachine's Avatar
    Join Date
    Nov 2009
    Location
    Charleston, WV
    Posts
    664
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows 7/Vista permissions

    Quote Originally Posted by Bipolar_Games
    My game needs save files. These save files ideally will live within the same folder as my exe. This exe ideally lives within the C:\Program Files\MyGame folder. Windows 7/Vista doesn't like letting my program create, modify, or delete files within Program Files unless I make it so the user has to run as an Admin. I would rather not have the user run as Admin, as some users are not allowed to do so on some computers.

    How do we get around this problem?
    I had the same problem, what worked for me was setting the file to share with everyone. that way there were no restrictions. if you have tried this, try selecting the share with no one option. i know it sounds goofy, but once i did that it shared it with everyone and i could save wherever lol.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows 7/Vista permissions

    Actually, that's not the way to do it properly. Follow the set Windows standards or create portable software without installers (or like in my case, offer both). Why bother trying to circumvent UAC with hacky solutions when the correct rules are so easy to follow?

  10. #10
    Clicker Fusion 2.5
    Warmachine's Avatar
    Join Date
    Nov 2009
    Location
    Charleston, WV
    Posts
    664
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Windows 7/Vista permissions

    Um....i tried the latter from the start, and i had no luck. the way i did it worked like a charm for me, but maybe that is only in my case, may not work for others.......

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Need Windows Lock Example for Windows Vista/7...
    By LUCKYCREATIONS in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 27th July 2010, 01:55 PM
  2. Vista file permissions issue
    By Spitz in forum Install Creator and Patch Maker
    Replies: 46
    Last Post: 15th May 2008, 10:08 AM
  3. MMF et Windows Vista
    By Calimero in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 10th December 2007, 10:15 AM
  4. New Windows Vista
    By gballa in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 31st January 2007, 08:26 AM

Posting Permissions

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