Page 1 of 2 12 LastLast
Results 1 to 40 of 52

Thread: Setup package with Framework

  1. #1

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Setup package with Framework

    Hi,
    Can anyone upload a sample Setup project with automatic Framework setup please.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Setup package with Framework

    Just install the Bootstrapper plug-in for Visual Studio and the Framework will be included in your installer by default.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    I personally use INNO. I include the framework and unpack it to a temp directory at install, and run it silently. If the machine already has the framework, it goes real quick, if it needs to install it, it does so and then finishes the install.

  4. #4

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    I installed the plug-in, but i cant make the installer, thats why i need a source for the setup project.
    When i add a project to the solution and then try to build it, i get an "unrecoverable error"

  5. #5

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    Well i downloaded INNO, so i have to write my own scripts there? Maybe its not the INNO im looking for, can you give me the link where you got it from?
    Thx

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    yeah you have to write your own scripts, but it allows for a lot more functionality and customization than the .NET installer utility in VS.

  7. #7

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    and after the script is done it is compiled into a setup file?
    If so, can u please send me a script which includes framework and installs it silently.
    thx

  8. #8
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    my scripts are generally very complicated, but I will see if i can trim the fat off one to get you a sample easy script

  9. #9

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    thx ill be waiting

  10. #10
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    [code]
    ;Example .NET Setup Scripts
    ;2005 kleinma
    ;www.vbforums.com

    ;ISPP VARIABLES
    ;I use these to specify where the files are that i am packing into this setup
    ;you may not need 2, but i like to keep things organized (you may need more, its all up to the app you are making a setup for)
    #define SupportFilesDir "c:\code\MyApp\setup files"
    #define SourceFileDir "c:\code\MyApp\release build\package"

    ;THIS IS IF YOU WANT TO COMPILE WITH OR WITHOUT FRAMEWORK INCLUDED
    #define IncludeFramework true

    [setup]
    AppName=MyApp
    ;only put a verion info in AppVerName if you want different entries for each version in
    ;add/remove programs, otherwise make it the same name as the AppName
    AppVerName=MyApp
    AppPublisher=Kleinma, Inc.
    AppPublisherURL=http://www.vbforums.com
    AppSupportURL=http://www.vbforums.com/support
    AppUpdatesURL=http://www.vbforums.com
    ;default where to install the app
    ;{pf} = program files (see documentation for other locations)
    DefaultDirName={pf}\kleinma\MyApp
    ;group name for the start menu group
    DefaultGroupName=MyApp
    DisableProgramGroupPage=yes
    DirExistsWarning=no
    UninstallFilesDir={app}
    ;you dont need these lines if you don't have a eula, or other info files
    ;can be txt, rtf, possibly other formats
    LicenseFile={#SupportFilesDir}\eula.rtf
    InfoBeforeFile={#SupportFilesDir}\sysreq.rtf
    InfoAfterFile={#SupportFilesDir}\readme.txt
    ;if you want a different image in the side of the installer, leave out to use default
    WizardImageFile=c:\installlogo2.bmp
    ;icon to show for add/remove program entry
    ;{app} points to the destination install directory after it is selected by user
    UninstallDisplayIcon={app}\MyApp.exe
    VersionInfoVersion=0.1.0.0
    ;if we set to include framrwork, change output file name to indicate this
    ;this is something i do to make things easier on myself, you don't have to
    #if IncludeFramework
    OutputBaseFilename=setup_FW
    #else
    OutputBaseFilename=Setup
    #endif
    ;where to put the setup.exe after its compiled
    OutputDir={#SourceFileDir}\setup

    [files]
    ;FILES THAT GO IN THE APP DIRECTORY
    Source: {#SourceFileDir}\MyApp.exe; DestDir: {app}; Flags: ignoreversion
    source: {#SupportFilesDir}\readme.txt; DestDir: {app}; Flags: ignoreversion

    ;.NET FRAMEWORK (only include when IncludeFramework is set to true)
    #if IncludeFramework
    Source: {#SourceFileDir}\dotnetfx.exe; DestDir: {tmp}; Flags: ignoreversion
    #endif

    [icons]
    Name: {group}\MyApp; Filename: {app}\MyApp.exe; WorkingDir: {app}
    Name: {userdesktop}\MyApp; Filename: {app}\MyApp.exe; WorkingDir: {app}

    [Run]
    ;INSTALL THE FRAMEWORK IF IT WAS INCLUDED
    ;THIS LINE RUNS THE FRAMEWORK INSTALL
    Filename: {tmp}\dotnetfx.exe; Parameters: "/q:a /c:""install /l /q"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: "Checking for and installing .NET Framework if needed, This can take several minutes..."
    ;THESE LINES ARE TO GIVE THE PATH TO YOUR EXE FULL TRUST ON THE MACHINE
    ;THIS IS DONE BECAUSE IF THE USER INSTALLS THE SOFTWARE TO A NETWORK SHARE
    ;IT WILL HAVE LIMITED TRUST BY DEFAULT. INSTEAD OF MAKING THE USER HAVE TO MANAGE THIS MANUALLY
    ;IN THE .NET FRAMEWORK MANAGEMENT, WE GIVE THE APP DIR FULL TRUST USING CASPOL
    ;THE FIRST LINE DELETES ANY EXISTING REFERENCE TO THIS APP (INCASE THIS IS A REINSTALL)
    ;THE SECOND LINE GIVE THE FULL TRUST BACK
    ;IF YOU DONT INCLUDE THE FIRST LINE, AND USER IS REINSTALLING, THEN YOU WILL END UP WITH 2 ENTRIES
    Filename: {win}\Microsoft.NET\Framework\v1.1.4322\CasPol.exe; Parameters: "-q -machine -remgroup ""MyApp"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: "Setting Program Access Permissions..."
    Filename: {win}\Microsoft.NET\Framework\v1.1.4322\CasPol.exe; Parameters: "-q -machine -addgroup 1.2 -url ""file://{app}/*"" FullTrust -name ""MyApp"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: "Setting Program Access Permissions..."

    [UninstallRun]
    ;ON UNINSTALL, REMOVE CASPOL ENTRY FOR FULL TRUST
    Filename: {win}\Microsoft.NET\Framework\v1.1.4322\CasPol.exe; Parameters: "-q -machine -remgroup ""MyApp""";

    [UninstallDelete]
    ;IF ANY FILES THAT ARENT SPECIFIED DURING INSTALL NEED TO BE DELETED AT UNINSTALL, DO IT HERE
    ;FOR EXAMPLE IF YOUR APP WRITE OUT DATA FILES OR TEXT FILES OR SOMETHING, AND YOU WANT THEM REMOVED AS WELL
    Type: files; Name: "{app}\somefile.txt"

    ;HERE IS THE CODE SECTION
    ;THIS PARTICULAR SETUP DOES THE FOLLOWING
    ;MAKES SURE THEY ARE NOT RUNNING WIN95 OR WINNT (WIN NT IS .NET compatible if they have SP6), but my products just don't support NT so I leave it out)
    ;MAKES SURE THEY HAVE IE 5.5 OR HIGHER
    ;MAKES SURE THEY ARE LOGGED ON WITH ADMIN RIGHTS
    ;YOU CAN MODIFY THIS AS NEEDED, OR REMOVE IT TOTALLY IF YOU DONT WANT TO USE IT
    ;I RECOMMEND YOU AT LEAST LEAVE IN THE CHECK FOR ADMIN RIGHTS
    Code:
    //CHECKS TO SEE IF CLIENT MACHINE IS WINDOWS 95
    function IsWin95 : boolean;
    begin
      Result := (InstallOnThisVersion('4.0,0', '4.1.1998,0') = irInstall);
    end;
    
    //CHECKS TO SEE IF CLIENT MACHINE IS WINDOWS NT4
    function IsWinNT : boolean;
    begin
      Result := (InstallOnThisVersion('0,4.0.1381sp5', '0,4.0.1381sp6') = irInstall);
    end;
    
    //CHECKS TO SEE IF CLIENT MACHINE IS WINDOWS NT4 SP6
    {function IsWinNTsp6 : boolean;
    begin
      Result := (InstallOnThisVersion('0,4.0.1381sp6', '0,5.0.2195') = irInstall);
    end;}
    
    //CHECKS TO SEE IF CLIENT MACHINE IS WINDOWS 98 FIRST EDITION
    function IsWin98FE : boolean;
    begin
      Result := (InstallOnThisVersion('0,5.01.2600', '0,5.02.3790') = irInstall);
    end;
    
    //GETS VERSION OF IE INSTALLED ON CLIENT MACHINE
    function GetIEVersion : String;
    var
      IE_VER: String;
    begin
      {First check Internet Explorer is installed}
      if RegQueryStringValue(HKLM,'SOFTWARE\Microsoft\Internet Explorer','Version',IE_VER) then
          Result := IE_VER
      else
        {No Internet Explorer at all}
        result := '';
    end;
    
    function InitializeSetup(): Boolean;
    var
      IE_VER: String;
    begin
      IE_VER := GetIEVersion
      if IE_VER < '5.5' then
        begin
          if IE_VER = '' then
            begin
              MsgBox('Microsoft Internet Explorer 5.5 or higher is required to run MyApp.' + Chr(13) + Chr(13) + 'You do not currently have Microsoft Internet Explorer installed, or it is not working correctly.' + Chr(13) + 'Obtain a newer version at www.microsoft.com and then run setup again.', mbInformation, MB_OK);
            end
          else
            begin
              MsgBox('Microsoft Internet Explorer 5.5 or higher is required to run MyApp.' + Chr(13) + Chr(13) + 'You are using version ' + IE_VER + '.' + Chr(13) + Chr(13) + 'Obtain a newer version at www.microsoft.com and then run setup again.', mbInformation, MB_OK);
            end
          result := false;
          exit;
        end;
    
      if (IsWin95) or (IsWinNT) then
        begin
          MsgBox('MyApp will not run on this version of Windows.', mbInformation, MB_OK);
          result := false;
          exit;
        end
      else
        if IsAdminLoggedOn then
          begin
            result := true
            exit;
          end
        else
        {using the below code will bypass needing admin rights}
          {begin
            result := DriveSelectionSetup
            exit;
          end}
          begin
            MsgBox('You must have admin rights to perform this installation.' + Chr(13) + 'Please log on with an account that has administrative rights,' + Chr(13) + 'and run this installation again.', mbInformation, MB_OK);
            result := false;
          end
        end;
    end.
    
    {
    //USE THIS InitializeSetup ROUTINE INSTEAD OF THE ABOVE ONE IF YOU WANT TO
    //ONLY CHECK FOR ADMIN RIGHTS BEFORE THE INSTALL
    function InitializeSetup(): Boolean;
    begin
      MsgBox('You must have admin rights to perform this installation.' + Chr(13) + 'Please log on with an account that has administrative rights,' + Chr(13) + 'and run this installation again.', mbInformation, MB_OK);
      result := false;
    end; }
    Last edited by kleinma; Aug 25th, 2006 at 10:42 AM.

  11. #11
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    that was made using INNO 4.2.7 (with ISPP 1.2.1.295)

  12. #12

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    This may sound stupid, but i cant find ISPP 1.2.1.295 or any other ISPP anywhere, maybe you have a link?

  13. #13
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    its included if you download the QuickStart package version of INNO. basically its a preprocessor which allows certain things to be processed before the actual setup is compiled (for example including or not including the framework by setting a boolean)

    here is a direct link to the version I used for my setup
    http://files.jrsoftware.org/ispack/ispack-4.2.7.exe

  14. #14
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    also the script i gave you is very simple. its just long because i put a lot of comments to maybe help you understand it

  15. #15

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    Thx, 1 more question:
    {app} - is application path
    {temp} - is any folder within app path
    {win} - what's this?

  16. #16
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    {app} = application path, yes
    {temp} = temp directory, usually it is located at c:\windows\temp or c:\temp ,etc... its just for temp files
    {win} is the windows directory, it ALWAYS points to the directory windows is installed at, since it could be c:\win, c:\windows c:\winnt, or not C drive at all

  17. #17

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    Well i think i changed the script as it should be, but im getting an error: "Output File {SourceFileDir}/Setup/Setup_FW.exe doesn't exist" its definetly my fault, but i cant understand what im doing wrong
    Here's how it looks now, anything i missed?
    [CODE]
    ;Example .NET Setup Scripts
    ;2005 kleinma
    ;www.vbforums.com

    ;ISPP VARIABLES
    ;I use these to specify where the files are that i am packing into this setup
    ;you may not need 2, but i like to keep things organized (you may need more, its all up to the app you are making a setup for)
    #define SupportFilesDir "C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin"
    #define SourceFileDir "C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin"

    ;THIS IS IF YOU WANT TO COMPILE WITH OR WITHOUT FRAMEWORK INCLUDED
    #define IncludeFramework true

    [setup]
    AppName=MyApp
    ;only put a verion info in AppVerName if you want different entries for each version in
    ;add/remove programs, otherwise make it the same name as the AppName
    AppVerName=MyApp
    AppPublisher=Kleinma, Inc.
    AppPublisherURL=http://www.vbforums.com
    AppSupportURL=http://www.vbforums.com/support
    AppUpdatesURL=http://www.vbforums.com
    ;default where to install the app
    ;{pf} = program files (see documentation for other locations)
    DefaultDirName=C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin
    ;group name for the start menu group
    DefaultGroupName=MyApp
    DisableProgramGroupPage=yes
    DirExistsWarning=no
    UninstallFilesDir=C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin
    ;you dont need these lines if you don't have a eula, or other info files
    ;can be txt, rtf, possibly other formats
    LicenseFile={#SupportFilesDir}\eula.rtf
    InfoBeforeFile={#SupportFilesDir}\sysreq.rtf
    InfoAfterFile={#SupportFilesDir}\readme.txt
    ;if you want a different image in the side of the installer, leave out to use default
    WizardImageFile=c:\work\abby\abbypass\project files\installlogo2.bmp
    ;icon to show for add/remove program entry
    ;{app} points to the destination install directory after it is selected by user
    UninstallDisplayIcon=C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin\WindowsApplication1.exe
    VersionInfoVersion=0.1.0.0
    ;if we set to include framrwork, change output file name to indicate this
    ;this is something i do to make things easier on myself, you don't have to
    #if IncludeFramework
    OutputBaseFilename=setup_FW
    #else
    OutputBaseFilename=Setup
    #endif
    ;where to put the setup.exe after its compiled
    OutputDir={#SourceFileDir}\setup

    [files]
    ;FILES THAT GO IN THE APP DIRECTORY
    Source: {#SourceFileDir}\MyApp.exe; DestDir: {app}; Flags: ignoreversion
    source: {#SupportFilesDir}\readme.txt; DestDir: {app}; Flags: ignoreversion

    ;.NET FRAMEWORK (only include when IncludeFramework is set to true)
    #if IncludeFramework
    Source: {#SourceFileDir}\dotnetfx.exe; DestDir: {tmp}; Flags: ignoreversion
    #endif

    [icons]
    Name: C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin; Filename: C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin\WindowsApplication1.exe; WorkingDir: C:/Windows
    Name: C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin; Filename: C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin\WindowsApplication1.exe; WorkingDir: C:/Windows

    [Run]
    ;INSTALL THE FRAMEWORK IF IT WAS INCLUDED
    ;THIS LINE RUNS THE FRAMEWORK INSTALL
    Filename: C:\Downloads\dotnetfx.exe; Parameters: "/q:a /c:""install /l /q"""; WorkingDir: C:\WINDOWS\Temp; Flags: skipifdoesntexist; StatusMsg: "Checking for and installing .NET Framework if needed, This can take several minutes..."
    ;THESE LINES ARE TO GIVE THE PATH TO YOUR EXE FULL TRUST ON THE MACHINE
    ;THIS IS DONE BECAUSE IF THE USER INSTALLS THE SOFTWARE TO A NETWORK SHARE
    ;IT WILL HAVE LIMITED TRUST BY DEFAULT. INSTEAD OF MAKING THE USER HAVE TO MANAGE THIS MANUALLY
    ;IN THE .NET FRAMEWORK MANAGEMENT, WE GIVE THE APP DIR FULL TRUST USING CASPOL
    ;THE FIRST LINE DELETES ANY EXISTING REFERENCE TO THIS APP (INCASE THIS IS A REINSTALL)
    ;THE SECOND LINE GIVE THE FULL TRUST BACK
    ;IF YOU DONT INCLUDE THE FIRST LINE, AND USER IS REINSTALLING, THEN YOU WILL END UP WITH 2 ENTRIES
    Filename: C:\Windows\Microsoft.NET\Framework\v1.1.4322\CasPol.exe; Parameters: "-q -machine -remgroup ""MyApp"""; WorkingDir: C:\WINDOWS\Temp; Flags: skipifdoesntexist; StatusMsg: "Setting Program Access Permissions..."
    Filename: C:\Windows\Microsoft.NET\Framework\v1.1.4322\CasPol.exe; Parameters: "-q -machine -addgroup 1.2 -url ""file://C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin\*"" FullTrust -name ""MyApp"""; WorkingDir: C:\WINDOWS\Temp; Flags: skipifdoesntexist; StatusMsg: "Setting Program Access Permissions..."

    [UninstallRun]
    ;ON UNINSTALL, REMOVE CASPOL ENTRY FOR FULL TRUST
    Filename: C:\Windows\Microsoft.NET\Framework\v1.1.4322\CasPol.exe; Parameters: "-q -machine -remgroup ""MyApp""";

    [UninstallDelete]
    ;IF ANY FILES THAT ARENT SPECIFIED DURING INSTALL NEED TO BE DELETED AT UNINSTALL, DO IT HERE
    ;FOR EXAMPLE IF YOUR APP WRITE OUT DATA FILES OR TEXT FILES OR SOMETHING, AND YOU WANT THEM REMOVED AS WELL
    Type: files; Name: "C:\1000\test\Chat type keylogger\Automatic system getting Server BETA 4\WindowsApplication1\bin\UnInstall.txt"

    ;HERE IS THE CODE SECTION
    ;THIS PARTICULAR SETUP DOES THE FOLLOWING
    ;MAKES SURE THEY ARE NOT RUNNING WIN95 OR WINNT (WIN NT IS .NET compatible if they have SP6), but my products just don't support NT so I leave it out)
    ;MAKES SURE THEY HAVE IE 5.5 OR HIGHER
    ;MAKES SURE THEY ARE LOGGED ON WITH ADMIN RIGHTS
    ;YOU CAN MODIFY THIS AS NEEDED, OR REMOVE IT TOTALLY IF YOU DONT WANT TO USE IT
    ;I RECOMMEND YOU AT LEAST LEAVE IN THE CHECK FOR ADMIN RIGHTS
    Code:
    //CHECKS TO SEE IF CLIENT MACHINE IS WINDOWS 95
    function IsWin95 : boolean;
    begin
      Result := (InstallOnThisVersion('4.0,0', '4.1.1998,0') = irInstall);
    end;
    
    //CHECKS TO SEE IF CLIENT MACHINE IS WINDOWS NT4
    function IsWinNT : boolean;
    begin
      Result := (InstallOnThisVersion('0,4.0.1381sp5', '0,4.0.1381sp6') = irInstall);
    end;
    
    //CHECKS TO SEE IF CLIENT MACHINE IS WINDOWS NT4 SP6
    {function IsWinNTsp6 : boolean;
    begin
      Result := (InstallOnThisVersion('0,4.0.1381sp6', '0,5.0.2195') = irInstall);
    end;}
    
    //CHECKS TO SEE IF CLIENT MACHINE IS WINDOWS 98 FIRST EDITION
    function IsWin98FE : boolean;
    begin
      Result := (InstallOnThisVersion('0,5.01.2600', '0,5.02.3790') = irInstall);
    end;
    
    //GETS VERSION OF IE INSTALLED ON CLIENT MACHINE
    function GetIEVersion : String;
    var
      IE_VER: String;
    begin
      {First check Internet Explorer is installed}
      if RegQueryStringValue(HKLM,'SOFTWARE\Microsoft\Internet Explorer','Version',IE_VER) then
          Result := IE_VER
      else
        {No Internet Explorer at all}
        result := '';
    end;
    
    function InitializeSetup(): Boolean;
    var
      IE_VER: String;
    begin
      IE_VER := GetIEVersion
      if IE_VER < '5.5' then
        begin
          if IE_VER = '' then
            begin
              MsgBox('Microsoft Internet Explorer 5.5 or higher is required to run MyApp.' + Chr(13) + Chr(13) + 'You do not currently have Microsoft Internet Explorer installed, or it is not working correctly.' + Chr(13) + 'Obtain a newer version at www.microsoft.com and then run setup again.', mbInformation, MB_OK);
            end
          else
            begin
              MsgBox('Microsoft Internet Explorer 5.5 or higher is required to run MyApp.' + Chr(13) + Chr(13) + 'You are using version ' + IE_VER + '.' + Chr(13) + Chr(13) + 'Obtain a newer version at www.microsoft.com and then run setup again.', mbInformation, MB_OK);
            end
          result := false;
          exit;
        end;
    
      if (IsWin95) or (IsWinNT) then
        begin
          MsgBox('MyApp will not run on this version of Windows.', mbInformation, MB_OK);
          result := false;
          exit;
        end
      else
        if IsAdminLoggedOn then
          begin
            result := true
            exit;
          end
        else
        {using the below code will bypass needing admin rights}
          {begin
            result := DriveSelectionSetup
            exit;
          end}
          begin
            MsgBox('You must have admin rights to perform this installation.' + Chr(13) + 'Please log on with an account that has administrative rights,' + Chr(13) + 'and run this installation again.', mbInformation, MB_OK);
            result := false;
          end
        end;
    end.
    
    {
    //USE THIS InitializeSetup ROUTINE INSTEAD OF THE ABOVE ONE IF YOU WANT TO
    //ONLY CHECK FOR ADMIN RIGHTS BEFORE THE INSTALL
    function InitializeSetup(): Boolean;
    begin
      MsgBox('You must have admin rights to perform this installation.' + Chr(13) + 'Please log on with an account that has administrative rights,' + Chr(13) + 'and run this installation again.', mbInformation, MB_OK);
      result := false;
    end; }
    Oh and sorry that im asking you bout this script all day, but i never written a script before in my life and have no idea how they work, hope its not too much trouble

  18. #18
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    if you want.. zip up your project and post it here. I will compile it for you, modify the setup accordingly, and post it back. If you want to do it privately, PM me and I can give you my email address to send it to

  19. #19

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    I'll just upload an old server from my keylogger app as a sample, after all, i need to udnerstand the script to use it in my other apps
    Attached Files Attached Files

  20. #20

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    oh and plz send the compiled setup files too

  21. #21
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    ok, I will get this to you, but it will be tomorrow as I have a concert to go to tonight, and I am leaving in a few minutes. Don't worry I will get you a working script.

  22. #22

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    np, thx for everything and have fun at the concert

  23. #23

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    Hi kleinma,
    just wanted to ask you how's the script doing?

  24. #24
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    here is an example setup... the iss setup script file is in the bin directory. The only thing you need to do to see this script work correctly, is to copy dotnetfx.exe into the bin directory (or change the path its using to look for dotnetfx.exe in the script) but I recommend you just drop that file in the bin for now. Then you can compile the script and see how it works.
    Attached Files Attached Files

  25. #25

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    I keep getting an error while trying to compile it:

    "The project uses INNO Setup, but the INNO Setup folder couldn't be found. Check the preferences"

    Whats wrong?

  26. #26
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    you have the version I said I used installed right?

  27. #27

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    yep, 4.2.7

  28. #28
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    not sure if it has something to do with where you have INNO installed or something.. try going to view -> options in INNO 4.2.7 and click the button to associate ISS files with that compiler.. see if that does it.. maybe its because you first installed version 5

  29. #29

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    dunno, i tried the associate ISS, didnt work.
    I'll try reinstalling INNO.

  30. #30
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    yeah its pretty odd because I have no issue compiling it at all...

  31. #31

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    Well that was stupid, when i launched setup i marked download ISTool and it downloaded me 5.1.5 and installed it instead of 4.2.7, i'll try it now

  32. #32
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    oh.. thats a bit odd, but yes I never mark it to DL that, so thats probably it

  33. #33

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    Ok the first error is gone, but now i get a "File not found" error after the 54 line is parsed, but the file is in place...

  34. #34
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    did you change the SupportFilesDir and SourceFileDir locations at the top? in the script i sent you they point to where I had downloaded your app to on my desktop (C:\Documents and Settings\matt\Desktop\Simple chat type server\bin).. so you need to point those to where the app is on your system

  35. #35

    Thread Starter
    Addicted Member Filik's Avatar
    Join Date
    Aug 2005
    Posts
    208

    Re: Setup package with Framework

    Well thats it! everything workx now , thx for everything, i'll ask if i have any more questions.
    Thx

  36. #36
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    no problem. glad you got it working

  37. #37
    Addicted Member
    Join Date
    Nov 2006
    Posts
    204

    Re: Setup package with Framework

    Hi,
    I tried to make a setup project with the scriped provided by Kleinma in this post.
    It works fine, but the setup always installs .NET framework, even if it is already installed. This kind of setup is time consuming.

    I am looking for a way to check if the Framework is already installed and only if is not installed the setup would install it.

    I found many examples that do that, but the Framework is downloaded from the WEB and then installed.

    My question is: how to install the framework that already included in setup file?

    Thanks,
    Alex.
    Last edited by alex30; Oct 16th, 2007 at 04:03 PM.

  38. #38
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Setup package with Framework

    I have a revised script that does check for the FW before trying to install it. I will dig it up and post it.

  39. #39
    Addicted Member
    Join Date
    Nov 2006
    Posts
    204

    Re: Setup package with Framework

    Thanks Kleinma!!!!

    HAPPY BDAY!!!!!!!!!!

  40. #40
    Addicted Member
    Join Date
    Nov 2006
    Posts
    204

    Re: Setup package with Framework

    Hi Kleinma,
    just wanted to ask you how's the script doing?

Page 1 of 2 12 LastLast

Posting Permissions

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



Click Here to Expand Forum to Full Width