+ Reply to Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Check if a program is installed before running installation

  1. #11
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Check if a program is installed before running installation

    Alejandro,

    If it does not work then you are doing something wrong. Not exactly sure what you are trying to do, but why don't you simply use the NEVER Replacement Condition? Then it will only install the file if it does not already exist.

    Or just send your project and we can tell you what causes it.

    Friedrich

  2. #12

    Default Re: Check if a program is installed before running installation

    Hello Friedrich,

    I tried sending you a private message through the forums but it says that you do not allow recieving them, how can i send it to you?

    Regards,

    Alejandro

  3. #13
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Check if a program is installed before running installation

    Hi Alejandro,

    if you are interested, you can send the .sb8 file to support [at] lindersoft [dot] com and we'll review the project for you.

    Friedrich

  4. #14

    Default Re: Check if a program is installed before running installation

    Hello Friedrich,

    I sent the email to the account you indicated.

    Thank you.

    Alejandro.

  5. #15
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Check if a program is installed before running installation

    Alejandro,

    You have set the %_SB_INSTALLDIR% folder to %PROGRAMFILESDIR%\UserZoom\[PRODUCTNAME]. At runtime, this will resolve to:

    C:\Program Files (x86)\UserZoom\UserZoom

    But you perform the following check:

    If %PROGRAMFILESDIR%\GOOGLE\DRIVE\GOOGLEDRIVESYNC.EXE File or Folder exists Then

    So it will ALWAYS install your "googledrivesync.exe" because you NEVER install to:

    C:\Program Files (x86)\GOOGLE\DRIVE

    Instead, you install:

    C:\Program Files (x86)\UserZoom\UserZoom\googledrivesync.exe

    In other words, your "If Statement" is always FALSE and the "Else Statement" is executed. You have a minor folder issue here.

    Does this help?

    Friedrich

  6. #16
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Check if a program is installed before running installation

    Alejandro,

    I am still not sure what you are trying to accomplish, but I think you would like to do something similar to the attached?

    Friedrich
    Attached Images Attached Images   

  7. #17

    Default Re: Check if a program is installed before running installation

    Hello Friedrich,

    What my app does is: Check if Google Drive is installed in this computer and is currently running or the file/folder exists. IF it does, then I don't want to install it. IF it doesn't, I want it to run the googledrivesync.exe which is the installer that Google gives you for Google Drive, which I will rename to InstallGDrive.exe
    I don't want InstallGDrive.exe to be installed inside my application's folder, I want it to install in the default folder it has to go to(C:\ProgFiles\Google\Drive\googledrivesync.exe). googledrivesync.exe is what runs the application Google Drive, not the installer itself, I have renamed the installer to InstallGDrive.exe

  8. #18
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Check if a program is installed before running installation

    Hi Alejandro,

    Aha, okay. This is the wrong way to handle it. Your deployment strategy is simply not correct. I'll try to develop a quick-and-dirty demo for you.

    Friedrich

  9. #19
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Check if a program is installed before running installation

    Alejandro,

    Okay, I have developed two different methods for you (very quick-and-dirty -- you can fine tune it with check boxes, custom messages, uninstall actions, etc.). It's just to demonstrate on how to do it. BTW, there are different methods available on how to detect an installed product. The recommended way is to check the Product GUID. I have used your .exe detection method here.

    http://www.lindersoft.com/projects/GoogleDriveDemo.zip


    1. Offline Installation (recommended method)

    This can be used for a silent unattended installation.

    https://support.google.com/a/answer/2490101?hl=en

    Download the file "gsync_enterprise.msi" and copy it into the folder where the "GoogleDrive_msi.sb8" project file is located in.

    https://dl.google.com/drive/gsync_enterprise.msi

    Then compile and run GoogleDrive_msi.sb8.

    2. Online Installation

    Google does NOT support a silent unattended installation.

    Download the Google Drive installer and copy your "googledrivesync.exe" into the folder where your "GoogleDrive.sb8" project file is located in.

    Then compile and run GoogleDrive.sb8.


    Hope this helps a bit.

    Friedrich
    Attached Images Attached Images  

  10. #20

    Default Re: Check if a program is installed before running installation

    Hello Friedrich,

    I took your base code and modified it to my taste and it works perfectly, i'll be sure to use this methodology in the future.

    Thank you very much.

    Alejandro.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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