Alpha Video Training
Results 1 to 3 of 3

Thread: Set-Reset Passwords

  1. #1
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,957

    Default Set-Reset Passwords

    Installation: Paste the attachment inside the folder addins_installed inside the folder a5v6, the full version. (This code has the potential for abuse, so it is offered as an encrypted addin only.)

    Audience: V6 developers (will not currently work below V6), especially who use xbasic and want to protect their scripts. (I rarely use action scripting, so it has limited testing for action scripting, but works with action scripting with the following complication: it will successfully add a password to an event with action scripting, but if you edit the script and save it, it will be saved without a password, and you will have to re-run the function.)

    Use: from the control panel, from interactive, start typing and use resetpasswords(). You will be asked to enter an “Old Password,” a “New Password,” and select from the following 3 choices – “Update Only if Has Password,” “Update Only if Has Code,” and “Update Regardless.”

    Example Use: on a full blown app, there may be a total of 25,000 events and may take 5 minutes to complete, but the statusbar will keep you informed of where you are in the process. The function will check every event for every form for all [form events,] [button events,] [field events,] and [embedded browse events,] as well as every global script and every global UDF. But it will NOT update [named browses,] [browse by expressions,] or [sub forms,] or any “fly over” events.

    Say you have 100 forms with 10 events per form with scripts. Say you originally used “3333” as the password, but forgot to protect half of the scripts and/or want to change the password – if you enter “3333” as the old password and “4444” as the new password and select the option “Update Only if Has Code” the function will check all events for all forms and update all scripts on all forms where there is code, and where there is code that has the password “3333” it will change it to “4444” and where there is no password, it will add one for “4444.”

    If the “Old Password” you entered does not match the existing password, you will be alerted and have the option to stop the function – but the script WILL NOT be updated.

    Global Scripts and Global Functions are updated regardless, providing the password is correct.

    To update passwords, you can use the same “Old Password” and “New Password” and it will reset and/or add the password to scripts.

    I RECOMMEND YOU MAKE A COPY OF YOUR APP AND RUN THIS FROM THE COPY. If you like the results you can run it from the original.

    I wrote this for myself, to be sure all scripts were protected, and when I suspect someone has discovered the password, (or I had to give it to them to deal with an emergency,) I can change it.



  2. #2
    "Certified" Alphaholic Ronald Anusiewicz's Avatar
    Real Name
    Ronald Anusiewicz
    Join Date
    Oct 2000
    Location
    Southampton, MA
    Posts
    1,583

    Default RE: Set-Reset Passwords

    Thank you Martin.

    What a handy tool.
    I've been using it now for about two weeks.

    Ron

  3. #3
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,957

    Default RE: Set-Reset Passwords

    this version will work in either V5 or V6

Similar Threads

  1. Reset indexs to 1
    By B Philip Gerber in forum Alpha Five Version 6
    Replies: 2
    Last Post: 02-14-2005, 10:32 AM
  2. Can't Reset Index
    By Phil Rolf in forum Alpha Five Version 6
    Replies: 21
    Last Post: 02-04-2005, 09:55 AM
  3. Reset a filter
    By Martin in forum Alpha Five Version 4
    Replies: 1
    Last Post: 01-19-2005, 06:15 AM
  4. Form reset?
    By pps in forum Alpha Five Version 5
    Replies: 2
    Last Post: 05-28-2004, 04:34 PM
  5. RESET PC MEMORY ?
    By ken tjia in forum Alpha Five Version 4
    Replies: 2
    Last Post: 02-15-2002, 04:09 PM

Bookmarks

Posting Permissions

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