Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2002
    Location
    Atlanta, GA. USA
    Posts
    73

    Project Method Help

    I have a project where I need Autoplay to read the computers MAC address and then change various setting depending on what it's MAC address is.

    Example: What I am hoping to do:

    I have a list of 100+ machine and their MAC address:
    Have Autoplay read a (text, other file) to do a IF (MAC) then (Values to pass back to Autoplay or LIST of actions {future EXE to run}). I would like Autoplay to be able to read the MAC address and list of thing to do or change from a TEXT file or some other file so that I can change the ONE file, rather than editing the Autoplay core Application each time I add a Computer or change a NIC card.

    More info:

    The basic things I wish to Change are thing in the Computer Name (via reg edit), A few Text files that are used to report reboot notices to me, even possible NIC setting as DNS or WINS setting may change.

    I do not use Autoplay on a daily or weekly time frame so it is harder for me to invision the best method to do this.

    I have been able to do what I want by have a LONG list of IF-THEN one for each MAC, but this requires editing the APP each time I add a computer that I support.

    Thanks in Advance

    Please reply to both me and the list

  2. #2
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    A simple way is to work with an INI File like

    [MAC-Adress1]
    PC_NAME

    [MAC-Adress2]
    PC_NAME

    read all sections with [table]INIFile.GetSectionNames
    Then use your if condition inside a for loop


    Stefan_M
    "With a rubber duck, one's never alone."

    Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    I was thinking something similar to what StefanM suggested. I was thinking of a SQLite database to store information with a key that would equal the MAC address of the PCs that you wanted to change.

    Then you could search the db to find the MAC Address and if there was something in the db then you could perform your actions. Check to see if there were values in the different columns and if so then perform some specific action.

    Have a table like this
    MAC Change1 Change2 Change3 Change4
    123456789 pcname1 another change anotherchange NULL
    234567890 pcname2 anotherchange NULL NULL


    Same concept can be done with the INI as Stefan suggested.

    Get all the section names, use a for loop to traverse the table comparing each section name to your MAC address. If a match is found then get the value names where each value name performs a certain action. Then again use a for loop to enumerate the table of value names and perform the selected actions.

    That would be fun to build.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  4. #4
    Join Date
    Apr 2002
    Location
    Atlanta, GA. USA
    Posts
    73
    Thanks for the suggestions, I will read up on on that, do u know of any examples. Like many people I can see the idea MUCH clearer with a working model.

    Once again thanks for the response.

  5. #5
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    This project reads all sections and create files on the desktop depending on the defined values.

    Stefan_M
    Attached Files
    "With a rubber duck, one's never alone."

    Douglas Adams, The Hitchhiker's Guide to the Galaxy

  6. #6
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Here was my stab at it. It also includes a function to setwallpaper that includes registry interaction and use of a dll. It also includes Original TJ_Tigger photography of the Scott Monument in Edinburg, Scotland. I tried to automate some aspects of the tool so it will read your MAC and put it into the INI file automatically for you. Just select an image on the right and click Test to have it do its thing. On the Test button you will see that it is similar to what StefanM did in that it reads in the section names and compares that with the MAC of the system. If there is a match it executes the code to get all the Value Names and compares those Value Names to a list of words and when there is a match it executes the code to do your update. So this project will change your wallpaper and display your PCName. There is a Restore button that will restore your wallpaper to it's original config.

    HTH
    Let me know if there are questions
    Tigg

    With my images in the folder it is too large to upload. Here is a link

    ACINI.apz
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  7. #7
    Join Date
    Apr 2002
    Location
    Atlanta, GA. USA
    Posts
    73

    Thanks

    Thanks to BOTH of you, the examples help a great deal.

    One of the things I am thinking of changing is the background, Thanks Tigger

  8. #8
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Not a problem, hope it is of some help. The wallpaper was the quickest thing I could think of since the function already existed in another project.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Similar Threads

  1. How to change project name on CD presentation ??
    By videoman2 in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 08-08-2004, 03:04 PM
  2. HOWTO: Open a Version 3.0 Project in Version 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-30-2002, 02:09 PM
  3. HOWTO: Create a Project Template
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-28-2002, 01:49 PM
  4. INFO: Recovering a Project File From a Built Application
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-10-2002, 08:44 AM
  5. Import a Project file ?
    By SwamiTK in forum Setup Factory 6.0
    Replies: 2
    Last Post: 05-29-2001, 07:33 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