Visualizzazione dei risultati da 1 a 6 su 6

Discussione: innosetup

  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2002
    Messaggi
    233

    innosetup

    Ciao a tutti, vorrei fare un'installer con innosetup ma non mi č molto chiaro come si possa controllare se un determinato programma č giā installato sul computer dove viene eseguita l'installazione.
    Se vā verificato se esite una chiave di registro e come sia possibile ricavare la varsione per decidere se continuare o meno l'installazione.
    Grazie
    HW

  2. #2
    Utente di HTML.it
    Registrato dal
    Jul 2002
    Messaggi
    233
    Nessun consiglio?
    GRAZIE!!
    HW

  3. #3
    Utente di HTML.it
    Registrato dal
    Dec 2002
    Messaggi
    1,315
    ciao,

    io uso innosetup non in una maniera sofisticata..... nel senso che mi limito a creare una semplice installazione del mio programma....

    tuttavia nell'help di innosetup, e' descritto l'utilizzo dei flags. dovresti vedere queli di questi fa al caso tuo....


    [code]
    This optional section defines any files Setup is to install on the user's system.

    Here is an example of a [Files] section:

    [Files]
    Source: "CTL3DV2.DLL"; DestDir: "{sys}"; Flags: onlyifdoesntexist uninsneveruninstall
    Source: "MYPROG.EXE"; DestDir: "{app}"
    Source: "MYPROG.CHM"; DestDir: "{app}"
    Source: "README.TXT"; DestDir: "{app}"; Flags: isreadme
    See the Remarks section at the bottom of this topic for some important notes.

    The following is a list of the supported parameters:

    Source (Required)
    The name of the source file. The compiler will prepend the path of your installation's source directory if you do not specify a fully qualified pathname.

    This can be a wildcard to specify a group of files in a single entry. When a wildcard is used, all files matching it use the same options.

    When the flag external is specified, Source must be the full pathname of an existing file (or wildcard) on the distribution media or the user's system (e.g. "{src}\license.ini").

    Constants may only be used when the external flag is specified, because the compiler does not do any constant translating itself.

    Examples:
    Source: "MYPROG.EXE"
    Source: "Files\*"

    DestDir (Required)
    The directory where the file is to be installed on the user's system. The will almost always begin with one of the directory constants. If the specified path does not already exist on the user's system, it will be created automatically, and removed automatically during uninstallation if empty.

    Examples:
    DestDir: "{app}"
    DestDir: "{app}\subdir"

    DestName
    This parameter specifies a new name for the file when it is installed on the user's system. By default, Setup uses the name from the Source parameter, so in most cases it's not necessary to specify this parameter.

    Example:
    DestName: "MYPROG2.EXE"
    Excludes
    Specifies a list of patterns to exclude, separated by commas. This parameter cannot be combined with the external flag.

    Patterns may include wildcard characters ("*" and "?"). Note that unlike the Source parameter, a simple Unix-style pattern matching routine is used for Excludes. Dots in the pattern are always significant, thus "*.*" will not exclude a file with no extension (instead, use just "*"). Also, question marks always match exactly one character, thus "?????" will not exclude files with names less than five characters long.

    If a pattern starts with a backslash ("\") it is matched against the start of a path name, otherwise it is matched against the end of a path name. Thus "\foo" will only exclude a file named "foo" at the base of the tree. On the other hand, "foo" will exclude any file named "foo" anywhere in the tree.

    The patterns may include backslashes. "foo\bar" will exclude both "foo\bar" and "subdir\foo\bar". "\foo\bar" will only exclude "foo\bar".

    Examples:
    Source: "*"; Excludes: "*.~*"
    Source: "*"; Excludes: "*.~*,\Temp\*"; Flags: recursesubdirs

    CopyMode
    You should not use this parameter in any new scripts. This parameter was deprecated and replaced by flags in Inno Setup 3.0.5:

    CopyMode: normal -> Flags: promptifolder
    CopyMode: alwaysskipifsameorolder -> no flags
    CopyMode: onlyifdoesntexist -> Flags: onlyifdoesntexist
    CopyMode: alwaysoverwrite -> Flags: ignoreversion
    CopyMode: dontcopy -> Flags: dontcopy

    What was CopyMode: alwaysskipifsameorolder is now the default behavior. (The previous default was CopyMode: normal.)

    Attribs
    Specifies additional attributes for the file. This can include one or more of the following: readonly, hidden, system. If this parameter is not specified, Setup does not assign any special attributes to the file.

    Example:
    Attribs: hidden system
    Permissions
    Specifies additional permissions to grant in the file's ACL (access control list). It is not recommended that you use this parameter if you aren't familiar with ACLs or why you would need to change them, because misusing it could negatively impact system security.

    For this parameter to have an effect the user must be running Windows 2000 or later (NT 4.0 is not supported due to API bugs), the file must be located on a partition that supports ACLs (such as NTFS), and the current user must be able to change the permissions on the file. In the event these conditions are not met, no error message will be displayed, and the permissions will not be set.

    This parameter should only be used on files private to your application. Never change the ACLs on shared system files, otherwise you can open up security holes on your users' systems.

    The specified permissions are set regardless of whether the file existed prior to installation.

    This parameter can include one or more space separated values in the format:

    <user or group identifier>-<access type>

    The following access types are supported for the [Files] section:

    full
    Grants "Full Control" permission, which is the same as modify (see below), but additionally allows the specified user/group to take ownership of the file and change its permissions. Use sparingly; generally, modify is sufficient.

    modify
    Grants "Modify" permission, which allows the specified user/group to read, execute, modify, and delete the file.

    readexec
    Grants "Read & Execute" permission, which allows the specified user/group to read and execute the file.

    Example:
    Permissions: authusers-modify
    FontInstall
    Tells Setup the file is a font that needs to be installed. The value of this parameter is the name of the font as stored in the registry or WIN.INI. This must be exactly the same name as you see when you double-click the font file in Explorer. Note that Setup will automatically append " (TrueType)" to the end of the name.

    If the file is not a TrueType font, you must specify the flag fontisnttruetype in the Flags parameter.

    It's recommended that you use the flags onlyifdoesntexist and uninsneveruninstall when installing fonts to the {fonts} directory.

    To successfully install a font on Windows 2000 and later, the user must be a member of the Power Users or Administrators groups. On Windows NT 4.0 and earlier, anyone can install a font.

    For compatibility with 64-bit Windows, fonts should not be installed to the {sys} directory. Use {fonts} as the destination directory instead.

    Example:
    Source: "OZHANDIN.TTF"; DestDir: "{fonts}"; FontInstall: "Oz Handicraft BT"; Flags: onlyifdoesntexist uninsneveruninstall
    Flags
    This parameter is a set of extra options. Multiple options may be used by separating them by spaces. The following options are supported:

    32bit
    Causes the {sys} constant to map to the 32-bit System directory when used in the Source and DestDir parameters, the regserver and regtypelib flags to treat the file as 32-bit, and the sharedfile flag to update the 32-bit SharedDLLs registry key. This is the default behavior in a 32-bit mode install.

    64bit
    Causes the {sys} constant to map to the 64-bit System directory when used in the Source and DestDir parameters, the regserver and regtypelib flags to treat the file as 64-bit, and the sharedfile flag to update the 64-bit SharedDLLs registry key. This is the default behavior in a 64-bit mode install.

    allowunsafefiles
    Disables the compiler's automatic checking for unsafe files. It is strongly recommended that you DO NOT use this flag, unless you are absolutely sure you know what you're doing.

    comparetimestamp
    (Not recommended; see below)
    Instructs Setup to proceed to comparing time stamps if the file being installed already exists on the user's system, and at least one of the following conditions is true:

    Neither the existing file nor the file being installed has version info.
    The ignoreversion flag is also used on the entry.
    The replacesameversion flag isn't used, and the existing file and the file being installed have the same version number (as determined by the files' version info).
    If the existing file has an older time stamp than the file being installed, the existing file will replaced. Otherwise, it will not be replaced.

    Use of this flag is not recommended except as a last resort, because there is an inherent issue with it: NTFS partitions store time stamps in UTC (unlike FAT partitions), which causes local time stamps -- what Inno Setup works with by default -- to shift whenever a user changes their system's time zone or when daylight saving time goes into or out of effect. This can create a situation where files are replaced when the user doesn't expect them to be, or not replaced when the user expects them to be.

    confirmoverwrite
    Always ask the user to confirm before replacing an existing file.

    createallsubdirs
    By default the compiler skips empty directories when it recurses subdirectories searching for the Source filename/wildcard. This flag causes these directories to be created at install time (just like if you created [Dirs] entries for them).

    Must be combined with recursesubdirs.

    deleteafterinstall
    Instructs Setup to install the file as usual, but then delete it once the installation is completed (or aborted). This can be useful for extracting temporary data needed by a program executed in the script's [Run] section.

    This flag will not cause existing files that weren't replaced during installation to be deleted.

    This flag cannot be combined with the isreadme, regserver, regtypelib, restartreplace, sharedfile, or uninsneveruninstall flags.

    dontcopy
    Don't copy the file to the user's system. This flag is useful if the file is handled by the [Code] section exclusively.

    dontverifychecksum
    Prevents Setup from verifying the file checksum after extraction. Use this flag on files you wish to modify while already compiled into Setup.

    Must be combined with nocompression.

    external
    This flag instructs Inno Setup not to statically compile the file specified by the Source parameter into the installation files, but instead copy from an existing file on the distribution media or the user's system. See the Source parameter description for more information.

    fontisnttruetype
    Specify this flag if the entry is installing a non-TrueType font with the FontInstall parameter.

    ignoreversion
    Don't compare version info at all; replace existing files regardless of their version number.

    This flag should only be used on files private to your application, never on shared system files.

    isreadme
    File is the "README" file. Only one file in an installation can have this flag. When a file has this flag, the user will asked if he/she would like to view the README file after the installation has completed. If Yes is chosen, Setup will open the file, using the default program for the file type. For this reason, the README file should always end with an extension like .txt, .wri, or .doc.

    Note that if Setup has to restart the user's computer (as a result of installing a file with the flag restartreplace or if the AlwaysRestart [Setup] section directive is yes), the user will not be given an option to view the README file.

    nocompression
    Prevents the compiler from attempting to compress the file. Use this flag on file types that you know can't benefit from compression (for example, JPEG images) to speed up the compilation process and save a few bytes in the resulting installation.

    noencryption
    Prevents the file from being stored encrypted. Use this flag if you have enabled encryption (using the [Setup] section directive Encryption) but want to be able to extract the file using the
    codice:
     section support function ExtractTemporaryFile before the user has entered the correct password.
    
    noregerror 
    When combined with either the regserver or regtypelib flags, Setup will not display any error message if the registration fails.
    
    onlyifdestfileexists 
    Only install the file if a file of the same name already exists on the user's system. This flag may be useful if your installation is a patch to an existing installation, and you don't want files to be installed that the user didn't already have.
    
    onlyifdoesntexist 
    Only install the file if it doesn't already exist on the user's system.
    
    overwritereadonly 
    Always overwrite a read-only file. Without this flag, Setup will ask the user if an existing read-only file should be overwritten.
    
    promptifolder 
    %

  4. #4
    Utente di HTML.it
    Registrato dal
    Jul 2002
    Messaggi
    233
    Grazie 123delphi321 per la tua gentile risposta.

    Ho visto che con il Flags: onlyifdoesntexist potrei controllare se esiste in una specifica directory se l'eseguibile esiste.

    Io in particolare vorrei fare questa cosa
    Controllare se un programma esiste ed č installato
    - Basta controllare se esiste .exe in determinata cartella o č necessario controllare se č regitrato nel registo ?

    Determinare la versione di questo programma installato.

    Ma non mi sono chiari i passaggi da fare non ho mai fatto molti setup se non quelli automatici di visual basic senza nessuna opzione.

    Grazie!
    HW

  5. #5
    Utente di HTML.it
    Registrato dal
    Dec 2002
    Messaggi
    1,315
    io di solito non controllo nulla, nel senso che il mio setup.exe installa l'applicazione sovrascrivendo la precedente....

    al limite controllo solo l'esistenza del database....


    pero tieni presente che le applicazioni che io faccio in delphi hanno bisogno solo di 2 files: programma.exe e database.gdb. adesso non so se i tuoi programmi (come quelli di VB) necessitano l'installazione di diversi file anche nelle cartelle di sistema


    ciao

  6. #6
    Utente di HTML.it
    Registrato dal
    Jul 2002
    Messaggi
    233
    Grazie 123delphi321.

    Io dovrei principalmente controllare che sia installato un programma e capire quale versione č per decidere se andare avanti o meno e quindi copiare i file sul pc locale.

    Grazie!
    HW

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.