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

FeatureGetData not working?


16 replies to this topic

finding_this_difficult

finding_this_difficult
  • Members
  • 21 posts

Posted 29 June 2005 - 17:09

Hi,

I am using FeatureGetData to determine if a feature has been selected by a user. This sort of ties into a previous post I made (rather recently) and it seems that this does not work as I (and the documentation) think.

I have a feature: myFeature
(I am not sure where I can be assured the name is actually "myFeaure" as I am trying to use below)

Here is what I am doing:
FeatureGetData (MEDIA, "myFeature", FEATURE_FIELD_SELECTED, nvResult, svResult)

I have tried about every different "name" I can think of in place of "myFeature", but in the end I get the same result, it cannot find the feature.

My project is Basic MSI.

Thanks for any help,
A

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 04 July 2005 - 14:35

According to the documentation FeatureGetData only work for "InstallScript" and "InstallScript MSI" projects, not for "Basic MSI" projects.

donimoni

donimoni
  • Full Members
  • 13 posts

Posted 18 February 2008 - 08:50

Hi

So how can i read from Basic MSI projects the Feature selected data ???

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 February 2008 - 13:07

If you want to use this as a condition, try something like:
&myFeature=3 Or (!myFeature=3 And &myFeature<>2)

For more details see MSI help topic "Conditional Statement Syntax" at http://msdn2.microso...012(VS.85).aspx

donimoni

donimoni
  • Full Members
  • 13 posts

Posted 19 February 2008 - 13:19

Thank you for the quick response...

and can you tell me how can i acticate a function only when uninstalling?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 February 2008 - 14:01

Condition for uninstall of a feature:
&myFeature=2

Condition for complete uninstall (doesn't work before InstallValidate):
REMOVE~="ALL"

donimoni

donimoni
  • Full Members
  • 13 posts

Posted 06 March 2008 - 08:45

Thanx...

but what is the condition for install only,
now in Maintnance mode - > remove-> all my install script actions are called during uninstall.

i need the install only condition?
and the Maintnance remove + simple msiexex.exe /x remove, condition?

in another issue in basic msi project
when im trying to add Server config->IIS directory from the installation designer,
the setup is always interuptted and fails in the middel. any ideas?

and where is the install log opertion located(how to activate it if needed)?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 March 2008 - 17:35

The condition for a first time install is:
Not Installed

For a complete uninstall:
REMOVE~="ALL"

For any maintenance operation (repair, modify, uninstall, anything except first time install):
Installed

If uninstall was called from the MaintenanceWelcome dialog:
UILevel=5

If uninstall was called from msiexec.exe /x it's a lower value, probaly:
UILevel=2
but you better double check this.

Of course these UILevels apply to install etc. as well.

You can turn on msi logging in InstallShield or useone of the methods described here:
http://www.msifaq.com/a/1022.htm

donimoni

donimoni
  • Full Members
  • 13 posts

Posted 09 March 2008 - 09:28

Thank you for the answers...

i have another 2:

1.The setup build add's this files by itself,probebly from scanning refrences.
(its not coming from my distrib folders)

System.IdentityModel.dll
System.IdentityModel.Selectors.dll
System.Printing.dll
System.Runtime.Serialization.dll
System.ServiceModel.dll
System.Workflow.Activities.dll
System.Workflow.ComponentModel.dll
System.Workflow.Runtime.dll

i don't see these files in the ApplicationData->Files and folders.

so how do i remove them from my build?

2.i'm using the SETUPEXEDIR property to get to the Disk1 files,
but if the setup is started from the MSI file, this property is empty.
any idea?

thank you



donimoni

donimoni
  • Full Members
  • 13 posts

Posted 09 March 2008 - 11:15

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield Uninstall Information\{840ED82B-C177-4A3C-AB06-B244A7DD5F3C}]
"CLIENT_FOLDER_NAME"="PcimClient"

this information has been added to my registry,
where as CLIENT_FOLDER_NAME is one of the properties i use.
from some reason it has been added somtime ago and now it doesn't get the true value i set into it during the setup proccess.

so how can i control extra informtion writen into regsitry under this product code installation(for uninstall purpose)?



donimoni

donimoni
  • Full Members
  • 13 posts

Posted 09 March 2008 - 16:51

UILevel
is set to value 5 when i'm in maintnance mode,
for modify repair,remove.

all i need is a condition that would be called for
1.Install,Repair,Modify:
(Not Installed) OR (Installed AND UILevel <>5)
this doesn't work cause in modify the UILevel =5.

can you give me the complete condition syntax?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 March 2008 - 15:07

QUOTE
i don't see these files in the ApplicationData->Files and folders.

Turn off dependency scanning (for your components, switch .NET scan to "proeprties only").

QUOTE
i'm using the SETUPEXEDIR property to get to the Disk1 files,
but if the setup is started from the MSI file, this property is empty.
any idea?
Try the SourceDir property instead.

QUOTE
so how can i control extra informtion writen into regsitry under this product code installation(for uninstall purpose)?
Check the Registry view.

QUOTE
all i need is a condition that would be called for 1.Install,Repair,Modify:
I don't understand the question.

donimoni

donimoni
  • Full Members
  • 13 posts

Posted 10 March 2008 - 16:35

what is the condition syntax that will activate my action only for :Install,repair?

and i have a checkbox that is connected to a property(with value 0)
and its always shown as checked,
(i also tryied to configure Use property as integer with no help)
what am i doing wrong?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 March 2008 - 16:48

I guess to differentiate between repair and modify, you'd have to look at the properties REINSTALL and ADDLOCAL, ADDSOURCE, ADDDEFAULT.

To un-check a check box you must un-define (un-set) the property. You could do this in a control event by setting the property to:
{}
which means: clear the property.

donimoni

donimoni
  • Full Members
  • 13 posts

Posted 11 March 2008 - 14:37

setting the property to: {} is not working also i tried from the startup to set it to blank or "0" and the checkbox is checked all the time!??

in another issue
i have a feature with property Required=Yes.
i'm working on Basic Msi project,
in Custom Setup ->my feature has 3 menu to configure
the 3 one is "this feature will be installed when required"
and if selected all the feature's component's are not installed.

how can i prevent this option???

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 12 March 2008 - 15:04

Where are you trying to un-set the property? {} will only work on a control event.
Remove (drop) the property from Property manager.

Not sure about the other problem, but maybe this article will help:
Custom Setup Options in Windows Installer

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 12 March 2008 - 17:25

QUOTE (donimoni @ 2008-03-11 14:37)
setting the property to: {} is not working also i tried from the startup to set it to blank or "0" and the checkbox is checked all the time!??

Might there be a Custom Action setting the property? Run the project in the debugger (or use DebugView if your auhtoring tool has no debug option) to watch properties changing. Equally, a verbose log wil show property changes and, by proximity, which action changed it.

Edited by VBScab, 12 March 2008 - 17:26.

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.