Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2006
    Posts
    3

    How to check already installed Software ?

    Hi,

    i am new to Setup Factory, Please guide me.

    How can i do this in "SETUP FACTORY 7.0"???

    I have make an installer of my project in "Setup Factory", and burned it on a CD-R.

    Now, I want that, when user will insert this cd in his Cd-Rom, My Setup(installer) should check whether my software is already installed on this system or not. If it is already installed, then it should run my executable file of my project, otherwise it should prompt me to install the software first.

    Is it possibe in Setup Factory 7.0 or not ???

    thanks in advance

    regards

    Eshban

  2. #2
    Join Date
    Nov 2005
    Location
    Banned by moderator.
    Posts
    264
    Yes. In your software's folder, put an empty file, let's say named "no-del.bye".
    I can't remember if actions from SF7 are the same from AMS6, because I used the trial once...but, here we go:

    Code:
    function IsInstalled()
    -- set the folder name of your software and the drive
    path = "C:\\"
    soft = "MySoftware"
    -- search for the software
    Folder_soft = Folder.Find(path, soft, true, nil);
    -- check for the file
    File_inst = File.Find(path, "no-del.bye", true, false, nil, nil);
    -- if the file is found, run the application and tell the user
    if File_inst ~= 0 then
    -- tell the user
    run = Dialog.Message("Notice", soft" is already installed. Do you want to run it?", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);
    -- run the file
    if run == 6 then
    File.Run(File_inst, , , SW_SHOWNORMAL, false);
    end
    end
    -- something else
    if not File_inst ~= 0 then
    return true
    else
    return false
    end
    end
    As I said, I do'nt have SF7, so I can't test this code.

  3. #3
    Join Date
    Mar 2006
    Posts
    3

    Code not Works

    Hi,

    Thanks for reply, but alas your code not runs, i run this code by writing in "OnStartup" and on "PreInstall" actions, but it wont run.

    Plz guide me, what can i do

    Regards,
    Eshban

  4. #4
    Join Date
    Aug 2004
    Posts
    98
    Why so complicated?

    Your original installer should save a special registry key somewhere in the registry. If that key exists, then the software is already installed; if not, then the new installer will continue and install the latest version.

    The registry key could even be the path to the version already installed on the system - if the new installer finds it, it could grab the path, add the .exe filename to it, launch the old executable, and abort the new setup.

    On uninstallation you must ensure that you set the uninstaller to remove that very registry key from the registry. Otherwise the whole thing would be useless ...



    Steve

  5. #5
    Join Date
    Jul 2001
    Location
    Sunshine Coast, Queensland, Australia
    Posts
    139
    You can always check the uninstall details (which SF would normally create, unless you disabled uninstall).

    This is created under (in XP, not 100% about other versions) HLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Unin stall\Product Name.

    From there you can get to the uninstall details (.xml file), then you should be able to pick out the installed path, and then verify that it is actually installed.

    It is far better to think of these things ahead of time and have your installation/program write details of it's where abouts to the registry.

    But in failing that it is still possible (if the uninstall was used) to pick out the relevent details, but the exact entries depend upon what settings you used when installing the product in the first place.

  6. #6
    Join Date
    Mar 2006
    Posts
    3
    Hello,

    If anyone provide me the source code, or the sample application developed in Setup Factory, then it really helps me out very much.

    Please help me in this regard.

    I shall be very thankful to you.

    Hoping for a positive response.

    Kind Regards,
    Eshban

  7. #7
    Join Date
    Aug 2004
    Posts
    98
    All the stuff required to code the things above is mentioned in the help file ... maybe you should have a look and learn a bit ...

  8. #8
    Join Date
    Jul 2001
    Location
    Sunshine Coast, Queensland, Australia
    Posts
    139
    There is not going to be a magic script that somebody can post which will do exactly what you want. You are going to atleast make changes and some decisions here.

    First off have a look at your registry and indentify the key that get's created.

    To do this use 'regedit'.

    Now you are going to need to add some code to your 'On Startup' (could also be put elsewhere) which sets your %AppFolder% variable to the appropriate path.

    Your uninstall registry key may be different to mine but i have it as %ProductName%%ProductVer%

    A bit of string manipulation and you should have your .xml file available.

    then you need to look at the xml file and decide what you path in that best suits you needs. If this does not exists then you need to decide what to do.

    Don't forget to test if the main .exe file exists as it may have been deleted manually.

    Once you progress through how to code this if you get confused and post your specific issues i am sure people will help.

Similar Threads

  1. Sorry quick question Boolean
    By slafta in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 06-05-2005, 12:37 AM
  2. Frequently Asked Questions
    By Ted Sullivan in forum Visual Patch 2.0
    Replies: 0
    Last Post: 04-08-2005, 02:49 PM
  3. Need a code that will check for installed programs.
    By Quantrac in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 02-07-2005, 12:07 AM
  4. Check if Software is installed, and gather other Info
    By Worm in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 03-12-2003, 05:00 AM
  5. How to check third party software installed
    By Andrew Hardy in forum Setup Factory 6.0
    Replies: 2
    Last Post: 02-27-2002, 11:30 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