+ Post New Thread
Results 1 to 6 of 6
Coding Thread, AutoIT and SQL help in Coding and Web Development; I'm working on a program to manually install software to machines via BITS and as part of it, I want ...
  1. #1

    MK-2's Avatar
    Join Date
    Oct 2006
    Location
    Nottingham
    Posts
    3,237
    Thank Post
    149
    Thanked 581 Times in 307 Posts
    Blog Entries
    8
    Rep Power
    200

    AutoIT and SQL help

    I'm working on a program to manually install software to machines via BITS and as part of it, I want the program to scan active dir for all computers (have done that bit) but then want it to put all those computer names into a SQL DB under a "machines" table.
    Then, when you go to install a bit of software, it will update the DB to reflect what machine had what software installed.
    The idea is that next time you run the program, if you were to try and install the software to the same pc it would see from the DB it's already done.

    would anyone be able to help me work on this? basically it would be:

    1) start program
    2) program scans AD and puts all computer names it finds into temp array (done)
    3) that list of machines is added to a SQL DB table
    3a) if run a second time it will add new machines, delete ones not there anymore and leave the rest
    4) you go to install (for eg) smartboard.msi it will add "Smartboard" to another table of the DB
    5) a third table will tie the two results in. so it will show PC1 had smartboard installed
    6) next time you run the software, you can click a button which shows what is installed where and it will read the third table and show accordingly
    PC1 has Smartboard installed - installed on DD/MM/YY

    nice and simple, see

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,408
    Thank Post
    640
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    326
    MSSQL/MySQL/SQLite? The best thing to do would be to look on the AutoIt forum for a UDF code module that interacts with your chosen database. I think AutoIt can interact with ODBC, but you'd need to ensure the workstation has the necessary ODBC driver installed for your database engine.

  3. #3

    MK-2's Avatar
    Join Date
    Oct 2006
    Location
    Nottingham
    Posts
    3,237
    Thank Post
    149
    Thanked 581 Times in 307 Posts
    Blog Entries
    8
    Rep Power
    200
    i've had a look and there are MySQL/SQLite UDFs but not sure how maintained they are.
    That part will be fairly easy, it's the actual coding of it and the logistics of it I'm trying to work out!

  4. #4

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,408
    Thank Post
    640
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    326
    It sounds like you need two programs - one to maintain the list of AD machines in the DB, and the other to install software and update the DB accordingly.

    Try and flowchart how you want it to work (your list above is a good start!), and then work out what functions you'll need to code up to produce that one bit of functionality.

    One way to get a fresh list of machines from AD into the DB, is to just empty the machines table each time. This saves a lot of checking for consistency and is one less area of complexity you have to worry about. As long as you use machine names as keys when referencing software installs, it should be fine.

  5. #5

    MK-2's Avatar
    Join Date
    Oct 2006
    Location
    Nottingham
    Posts
    3,237
    Thank Post
    149
    Thanked 581 Times in 307 Posts
    Blog Entries
    8
    Rep Power
    200
    right so for refreshing lists it could just be a case of
    - get list
    - if table exists drop table
    - import list to table (repeat on every run)

    i know how i want it to work, but the problem is putting it into words on here to describe to others. the closest i can explain would be similar to how the RM console software overview works. it will show a list of software, list of machines and say whats installed where. but not in a grid view and not having to constantly update

  6. #6

    Join Date
    Jan 2006
    Location
    Surburbia
    Posts
    2,178
    Thank Post
    74
    Thanked 307 Times in 243 Posts
    Rep Power
    115
    Don't use computer names, it breaks if you: a) Zap from AD then rebuild/reimage a computer with the same name, b) Rename a computer. I would use computer SIDs instead and (ephemerally) translate those to names whenever I needed to display them.

SHARE:
+ Post New Thread

Similar Threads

  1. SQL Server 2008 - Automating DB Backup using the SQL Mgmt Console
    By bodminman in forum How do you do....it?
    Replies: 8
    Last Post: 24th January 2011, 02:55 PM
  2. autoit help please
    By RabbieBurns in forum Scripts
    Replies: 8
    Last Post: 16th June 2008, 03:47 PM
  3. AutoIT help.
    By K.C.Leblanc in forum Scripts
    Replies: 7
    Last Post: 28th November 2007, 03:27 PM
  4. AutoIT help
    By randle in forum Windows
    Replies: 14
    Last Post: 11th July 2007, 09:26 AM
  5. AutoIT
    By Gatt in forum Scripts
    Replies: 3
    Last Post: 3rd July 2007, 01:29 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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