Jump to content

Inno setup Scripting


 Share

Recommended Posts

=====Post Nº1=====

Hi,

i use Inno setup compiler to install my programs and I'm face this issues

1. How can i kill/end a Process(app) in the [Run] section ?

2. How can i delete some files in the [Run] section also ?

any suggestions please

=====Post Nº2=====

Please any help guys

=====Post Nº3=====

Still have a hope . Someone will help me soon :rolleyes:

Edited by Yzöwl
Link to comment
Share on other sites


Try ISTool:

ISTool helps you create scripts for Jordan Russell's Inno Setup compiler. Inno Setup is a great compiler for very professional looking setups, and the only disadvantage is that you have to create fairly complex scripts by hand.

This is where ISTool comes in. With this application you can edit these scripts in a visual environment, and creating these setup scripts becomes much easier.

http://www.istool.org/

Link to comment
Share on other sites

This test script demonstrates using the CMD interpreter to del a file in the [Run] section. With closing a process depends on having something like TaskKill.exe available for use on your Windows OS as not all have it.


[Setup]
AppName=Test
AppVersion=1.0
VersionInfoVersion=1.0
AppVerName=Test 1.0
OutputBaseFilename=Test 1.0
UninstallDisplayName=Test
VersionInfoDescription=Test Setup
DefaultDirName={pf}\Test
DefaultGroupName=Test
SolidCompression=true
AllowRootDirectory=true
DirExistsWarning=no
AllowNoIcons=true
AlwaysShowDirOnReadyPage=true
AlwaysShowGroupOnReadyPage=true
WizardImageFile=compiler:wizmodernimage.bmp
WizardSmallImageFile=compiler:wizmodernsmallimage.bmp

[Files]
Source: C:\WINDOWS\NOTEPAD.EXE; DestDir: {app}

[Run]
Filename: cmd; Parameters: /c del notepad.exe; WorkingDir: {app}; StatusMsg: Deleting files...; Flags: runhidden postinstall; Description: "Run CMD to delete notepad.exe in the ""{app}"" directory"

:)

Link to comment
Share on other sites

=====Post Nº1=====

Its very simple script to install yohoo messenger.

I want use a command to end the process instead of run a .cmd file

=====Post Nº2=====

Thanks MHz

Working very well to delete the file :thumbup

So i can use this in the [Run] section to kill a process

Filename: cmd; parameters: /c taskkill /f /im notepad.exe;Flags: runhidden

and work with me. Thanks MHz

YahooSetup.iss

Link to comment
Share on other sites

So i can use this in the [Run] section to kill a process

It looks OK to me. TaskKill is a standalone file so you should be able to run it without using CMD to do it.

Example script


AppName=Test
AppVersion=1.0
VersionInfoVersion=1.0
AppVerName=Test 1.0
OutputBaseFilename=Test 1.0
UninstallDisplayName=Test
VersionInfoDescription=Test Setup
DefaultDirName={pf}\Test
DefaultGroupName=Test
SolidCompression=true
AllowRootDirectory=true
DirExistsWarning=no
AllowNoIcons=true
AlwaysShowDirOnReadyPage=true
AlwaysShowGroupOnReadyPage=true
WizardImageFile=compiler:wizmodernimage.bmp
WizardSmallImageFile=compiler:wizmodernsmallimage.bmp

[Files]
Source: C:\WINDOWS\NOTEPAD.EXE; DestDir: {app}

[Run]
Filename: {app}\NOTEPAD.EXE; Flags: nowait
Filename: taskkill; Parameters: /f /im notepad.exe; WorkingDir: {sys}; Flags: runhidden postinstall; Description: Close Notepad

:)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...