User Tag List

Results 1 to 9 of 9

Thread: need help with serial number using INI object

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

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    need help with serial number using INI object

    Hi Everyone,

    I am usingh an INI++ object to store the users serial number for my app.

    I followed the instructions in the this thread to set where the INI saves to and loads from, BUT a handfull of my customers still report that they need to re-enter the serial number every time they start my app.

    I had thought that the technique mentioned in that thread would make it work for all versions of windows, even when not in administratyor mode, but aparently not. Anyone have any suggestions?

    thanks.

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2011
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: need help with serial number using INI object

    I'm assuming you've programmed it to access the file in "Program Files" (or AppPath$, and the file's stored in "Program Files")?
    When UAC is enabled, writing to "Program Files" will write to "ProgramData" instead, as a security measure.

    To get around this with my own software, I programmed it to use "ProgramData" for its writable files, OR I use the registry instead for things like GUI settings, serial numbers, path locations, etc.

    If you want the serial number to apply to all users, it will need to be written to the HKLM part of the registry. They might need admin privileges to write there, but standard users should be able to read it.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: need help with serial number using INI object

    I DID use ProgramData just as that other thread I likend to had instructed, BUT a customer using windows vista 32 bit still has to reenter the serial number every time.

    So its working for some customers and not others...I'm assuming they are not in adminisatrator mode, but I though if I had folowed the instructions of that thread it would work for everyone whether or not they were in administrator mode.

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2011
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: need help with serial number using INI object

    Is it storing in %appdata% or %programdata%? I guess it doesn't matter much, except that %appdata% is for the current user only.

    Could it be that the customer's computer is too slow for the app, and it does the serial number check before it actually finishes retrieving it?
    I had that issue once when I was setting the check to wait "xx" seconds before starting. Got around it by setting a flag when the serial number was retrieved, and using that to trigger the check.

    [Edit:] Some info that would be handy to you for troubleshooting:
    Where has the client installed it?
    &
    What are the client's computer specs?
    &
    Does it work fine on another machine?

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: need help with serial number using INI object

    Hmm.. you're right about my using appdata instead of programdata...I dont see a way to find the programdata directory using the file object...

    thats an interesting thought about it the customers system being too slow to retrieve the serial.. I hadn't considdered that posibility...I do have the load and then the serial number check in two consecutive "start of frame" events...maybe some systems can't handle it that quickly.

    thanks for mentioning this. I'll try and make it wait a second before checking the serial number...

    anyone else have any other ideas?


  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2011
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: need help with serial number using INI object

    Quote Originally Posted by Yves
    AppDataDirectory$( "File" ) returns C:\Users\User_Name\AppData\Roaming

    AllUsersAppDataDirectory$( "File" ) returns C:\ProgramData
    (http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=179776#Post1797 98)

    And yea, took me a week and a half to find out what was causing the issue. What I had to do was have one "Start of Frame" event which loads the serial, and then set a flag/global value to one. Then have a "Global Value X=1" (or "This flag = on") + "Run this action once per loop" event to run the check (it's how I solved my issue).

    [Edit:] I'd advise against using a timer to make it wait. If the computer's running really slow, it may takes 10-20 seconds for the app to start. Using a flag/value instead will make it wait until the previous events are actually finished. If it takes 0.001 seconds for the initial events to finish, the second will start then. If it takes 9999 seconds, the second event will wait that long

  7. #7
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2011
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: need help with serial number using INI object

    Also thinking, it could possibly be that "something" has marked the ini file as "read-only". Unlikely, but possible.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: need help with serial number using INI object

    One last question..Do I need to set the "Execution Level" of the app to "none (virtualization)" or "as invoker" or does this part not really matter?

    thanks

  9. #9
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2011
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: need help with serial number using INI object

    From what I've read, "None" makes windows think it's a legacy application, and will only run it as a standard user (i.e. %programfiles% would equal "C:\ProgramData")

    "As Invoker" means that if run normally, it will run as a standard user (i.e. %programfiles% would equal "C:\ProgramData").
    If run as admin, it will run as an admin user (i.e. %programfiles% would equal "C:\Program Files")

    "As Invoker" is normally the default for modern programs. I only use "As Invoker" if admin rights aren't really needed, and "As Administrator" if they are

Similar Threads

  1. Serial number for my app
    By iOSC in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 27th March 2012, 08:35 AM
  2. Reinstall from serial number?
    By Thomas in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 24th November 2009, 04:05 PM
  3. Where's the serial number?
    By Fralex in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 13th September 2009, 12:19 AM
  4. Protect your serial number
    By Jeff in forum News
    Replies: 0
    Last Post: 7th May 2009, 02:50 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
  •