Results 1 to 13 of 13

Thread: InnoSetup - rename a file During Installation and close an .exe

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    7

    InnoSetup - rename a file During Installation and close an .exe

    Hello, i'm new here and i have three questions about inno setup

    How to rename a file with inno setup during installation please?
    the second question: how to give an other name to a file during an uninstallation please?

    i want to do this:
    installation: "msnmsgr.exe" rename to "msnmsgr_original.exe"
    uninstallation: "msnmsgr_original.exe" rename to "msnmsgr.exe"

    -----------

    And the third question: how to close an .exe during an installation please?

    thanks, Hexa
    Last edited by Hexa; Aug 4th, 2005 at 04:51 AM.

  2. #2

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    7

    Re: InnoSetup - rename a file During Installation and close an .exe

    please somebody can help me...

    thanks

  3. #3
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: InnoSetup - rename a file During Installation and close an .exe

    Hexa,

    You can look into the Code section of Inno Setup to do that if you want to do that at the start or you can do it in the Run section at the end. Check Inno Setup help on more information.

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: InnoSetup - rename a file During Installation and close an .exe

    Hexa,

    looked at Inno Setup help and found this:

    Prototype:

    function RenameFile(const OldName, NewName: string): Boolean;

    Description:

    Attempts to change the name of the file specified by OldFile to NewFile. If the operation succeeds, RenameFile returns True. If it cannot rename the file (for example, if a file called NewName already exists), it returns False.

    Remarks:
    none

    Also take a look at the file that came with Inno Setup as an example named CodeExample1.iss to see how you might employ such a function.

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    7

    Re: InnoSetup - rename a file During Installation and close an .exe

    thanks to you, but...i have aleady look this but if the "msnmsgr.exe" is running the "rename files" doesn't apply...

    and in the doc, i don't find a means to unrun an .exe...


    thanks

  6. #6
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: InnoSetup - rename a file During Installation and close an .exe

    Hexa,

    Search the forum there are plenty of threads with shutting down or closing a running exe or program.

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    7

    Re: InnoSetup - rename a file During Installation and close an .exe

    ok thanks very much

  8. #8

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    7

    Re: InnoSetup - rename a file During Installation and close an .exe

    i find nothing, i will put a message who indicate to the user he must close the application before install my program,

    thanks randem !

  9. #9
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: InnoSetup - rename a file During Installation and close an .exe

    Hexa,

    Search the VB Forum.

  10. #10
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: InnoSetup - rename a file During Installation and close an .exe

    Hexa,

    Search for Terminate exe. There are a lot of threads.

  11. #11

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    7

    Re: InnoSetup - rename a file During Installation and close an .exe

    ok i read a lot of post, who they explain how to terminate an running .EXE but it's with visual basic, and these codes aren't identifie by inno setup, snif



    perhaps i must use inno script to use visual basic code?

  12. #12
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: InnoSetup - rename a file During Installation and close an .exe

    Hexa,

    I would reccommend that you write a small program that will terminate the app in question then run that from within the installation package (Inno Setup).

    And what do you mean use ********** to use VB code?

  13. #13

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    7

    Re: InnoSetup - rename a file During Installation and close an .exe

    a lot of vb function who can terminate an .EXE aren't identifie by inno setup...

    well, thanks to your help, i'm going to sleep (for me it's 1:10 AM...)

    bye bye !

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