Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Opening a readme text file


19 replies to this topic

SmartScope

SmartScope
  • Members
  • 5 posts

Posted 01 May 2001 - 20:52

I am using ISWI2 and I have a check box in the SetupCompleteSuccess dialog. If the checkbox is checked then Setup should open the readme file with Notepad when the user clicks on Finish. I have tried several things, all ended in failure. It seems that this should be an easy task. Any help as to how this is done would be appreciated.

Kate

Kate
  • Members
  • 61 posts

Posted 01 May 2001 - 23:05

Create a LaunchReadme Custom Action. Have the checkbox set your property (something like LAUNCHREADME) and then, based on whether or not the property is true, call a DoAction - LaunchReadme  off of your dialog box.

nraina

nraina
  • Members
  • 30 posts

Posted 20 May 2001 - 21:04

I am facing similar situation and have created a CcutomAction, a function in Installscript which calls LaunchApp but it does not work still. It appears that the control does not go to the script at all and setup exits before giving control to the script (though i have called the CustomAction before Cleanup and Exit , in Behavior of Finish button)

Pl help..


Irina

Irina
  • Members
  • 227 posts

Posted 21 May 2001 - 14:28

Hi,
Try to do so:
1. In dialog "SetupCompleteSuccess" select CheckBox  "CheckLaunchReadme" and set:
Property                             LAUNCHREADME
Property is Integer           True
If you check this box LAUNCHREADME will be 1, if not  0.

2. Select Behavior of this dialog and select button OK
Event                        DoAction
Argument                [YoursCustomAction]
Condition                LAUNCHREADME =1

3.  Create [YoursCustomAction] as
Type             Launch an executable
Location     Stored in Binary Table
Source       <SystemFolder> otepad.exe
Target       [YoursReadmeFilePath]
In_script execution          Immediate execution

[YoursReadmeFilePath] looks like [INSTALLDIR]Readme.txt.

If you check this CheckBox and click Finish you 'll see your Readme.txt
If you don't check you'll not see this file.

Best regards,



nraina

nraina
  • Members
  • 30 posts

Posted 21 May 2001 - 21:45

Thanks a lot for your (detailed) guidance, Irina :)
i appreciate it...

so it is working for me now and opening the readme file..
Now, there is one thing:

# We want to hide the checkbox and its text ("Show readme file") after Uninstallation.
if you know something about it, pl do let me know..
(you see, i am new at Installshield)


Irina

Irina
  • Members
  • 227 posts

Posted 21 May 2001 - 21:52

Hi,
Sorry, I don't understand what do you mean "after Uninstallation".
I think after uninstallation your product you don't ever seen this dialog?


Joe Fegan

Joe Fegan
  • Members
  • 38 posts

Posted 22 May 2001 - 10:43

I think what nraina is saying is that the checkbox and associated text should only appear when the user is installing the product.

The ControlCondition table is probably the place to do this with a "Hide" action and a condition involving the "Installed" property.


nraina

nraina
  • Members
  • 30 posts

Posted 22 May 2001 - 18:06

yes you are right, Joe.
I want to hide the text and checkbox on the last dialog box after uninstallation.

But i could not find any 'ControlCondition table'? There is no topic with that name in Help too.

Also, I went to 'Behavior' of SetupCompleteSuccess and choose the CheckLaunchReadme checkbox and searched for Hide/Disable in its events but there was none..
Infact 'Enable' is a property of this Checkbox which can either be set to True/False (and no conditions can be checked here).

Pl help.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 May 2001 - 22:36

In the same screen where you edit the Behaviour of the controls, there are three tabs at the bottom edge: Behaviour, Subscriptions and Conditions. Click on Conditions and you can set conditions to enable, disable, show and hide a control.

nraina

nraina
  • Members
  • 30 posts

Posted 22 May 2001 - 22:55

i could hide the things in uninstall..

Thanks a lot to all of you..
This forum makes life easy :)



suvidha

suvidha
  • Members
  • 72 posts

Posted 14 June 2001 - 04:30

i have done the same procedure stated above (by Irina) and it is working well on all OS except win98.

On win98, if i check the 'Show me Readme File' on the last dialog box it gives an error saying "Msi93a1 this program has performed an illegal operation adn will shut down".
I then compiled the project on the OS (win98) and realised the NOTEPAD.EXE is NOT loaded in <system folder>  but is in 'C:\Windows' ie windows folder!!!!!
And we are writing <systemfolder> otepad.exe as 'Source' of cutom action.

what should i do to get around this problem on win98.
i need to have this functionality on all OS (win98, 95, 2000, NT).

i am using IPWI 2.0.

Please help. it is urgent!


SmartScope

SmartScope
  • Members
  • 5 posts

Posted 14 June 2001 - 16:27

You could have two actions, each conditioned on the OS version. The Win98 action would run notepad from the Windows Folder and the NT/2000 action would run notepad from the System Folder.



suvidha

suvidha
  • Members
  • 72 posts

Posted 14 June 2001 - 17:26

but how should i check the OS in Dialog Behavior of this dialog box (namely, SetupCompleteSuccess).

I know the condition should be put for the 'Finish' button of this dialog box by clicking on 'Condition tab' but what should i write to check the OS.

i want to do something like:
Make two custom actions and make the condition of one custom action as:
GetSystemInfo(OS,...) == win2000 OR winNT

and make 'Condition of second custom action as:
GetSystemInfo(OS,...) == win95 OR win98
   

   


suvidha

suvidha
  • Members
  • 72 posts

Posted 14 June 2001 - 22:58

i tried putting SYSINFO.WINNT.bWinNT in condition tab of the OK button , now i have:
DoAction   read_file
        LAUNCHREADME And  SYSINFO.WINNT.bWinNT

for the OK button. I compiled on win 98 and it gives error " c:\windows\system otepad.exe" not found!!
(this is coz it is not finding it in system folder while compiling the project. i then copied the notepad.exe in system folder and it compiled but gave errors when i ran the setup!!!.

Please help


SmartScope

SmartScope
  • Members
  • 5 posts

Posted 14 June 2001 - 23:20

You need two custom actions to open the readme.

One action opens a file using notepad.exe found in the windows folder.
Another action opens a file using notepad.exe found in the system folder.

Create a property that defines the OS. Something like OS_IS_NT.

Earlier in the sequence call a custom action that detects the OS and sets the above property appropriately.

Use the property as a condition for the two custom actions mentioned on top.


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 15 June 2001 - 09:04

This is probably a silly idea but have you tried executing Readme.txt and letting the shell find notepad or whatever?

suvidha

suvidha
  • Members
  • 72 posts

Posted 16 June 2001 - 16:48

i made a property OS_IS in property table, then in script
used MsiSetproperty ( ) to set the value and
if i compile the project on win98 and then run setup, it works fine and opens the readmefile but if i compile the project on winNT and then run that setup on win98, it gives eror "This program has performed an illegal operation". On winNT it runs fine.

I have made 2 cutom actions and in OK button behavior:-
DoAction readme_win98 LAUNCHREADME AND Not Installed AND OS_IS = "IS_WIN9X"

DoAction readme_winnt LAUNCHREADME AND Not Installed AND OS_IS = "IS_WINNT"

and earlier in the script i am checking the OS using GetSystemInfo(OS,n,s) and setting the value of "OS_IS"
===========

As per your suggestion, Ian, ichecked the registry and strangely: there was no value for this key!!! Are you sure that this key must alays have a value assigned to it , in the registry? is it possible that win98 has not been installed properly on my machine (Infact, the hard disk has been pastitioned and one drive is win98 and other is winNT)?
The key that i am seeing is
HKEY_CLASS_ROOT-->txtfile-->shell-->open--->command

The value of 'Default' is nothing ""

please help


suvidha

suvidha
  • Members
  • 72 posts

Posted 16 June 2001 - 16:51

i made a property OS_IS in property table, then in script
used MsiSetproperty ( ) to set the value and
if i compile the project on win98 and then run setup, it works fine and opens the readmefile but if i compile the project on winNT and then run that setup on win98, it gives eror "This program has performed an illegal operation". On winNT it runs fine.

I have made 2 cutom actions and in OK button behavior:-
DoAction readme_win98 LAUNCHREADME AND Not Installed AND OS_IS = "IS_WIN9X"

DoAction readme_winnt LAUNCHREADME AND Not Installed AND OS_IS = "IS_WINNT"

and earlier in the script i am checking the OS using GetSystemInfo(OS,n,s) and setting the value of "OS_IS"
===========

As per your suggestion, Ian, ichecked the registry and strangely: there was no value for this key!!! Are you sure that this key must alays have a value assigned to it , in the registry? is it possible that win98 has not been installed properly on my machine (Infact, the hard disk has been pastitioned and one drive is win98 and other is winNT)?
The key that i am seeing is
HKEY_CLASS_ROOT-->txtfile-->shell-->open--->command

The value of 'Default' is nothing ""

please help


kris

kris
  • Members
  • 77 posts

Posted 12 September 2001 - 21:51

Is there a way to run a file, for example the readme you discuss in this post, no matter what, without having the user check a box?  I disabled this checkbox and would prefer to run a certain file once installation is completed every time.  

Any thoughts?


Irina

Irina
  • Members
  • 227 posts

Posted 12 September 2001 - 22:52

Hi kris,
1. Create a custom action to launch your file.
2. Go to the dialog SetupCompleteSuccess to Behaivor  and set on the button OK (this is a button Finish) your custom action:
Event            DoAction
Argument    YourCustomActionName
Condition    1
Good luck!