This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to set path for public properties in InstallScript MSI project.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 25, 2009
07:02 AM
How to set path for public properties in InstallScript MSI project.
Hi all,
I'm working on a InstallScript MSI project.
I want to set path for some public properties.
Ex: Properties "ProgramFilesFolder" have default value:
ProgramFilesFolder = C:\ProgramFiles.
I want to set new value for this property: ProgramFilesFolder = C:\abc.
So I do:
FeatureSetTarget(MEDIA, "", "C:\\abc");
MessageBox("ProgramFilesFolder = " + ProgramFilesFolder , INFORMATION);
But after that I see the result: ProgramFilesFolder = C:\ProgramFiles.
That means I can't set new path for ProgramFilesFolder property.
But with "INSTALLDIR" property:
Default value: INSTALLDIR = C:\WINDOWS\system32.
After I do:
FeatureSetTarget(MEDIA, "", "C:\\abc");
MessageBox("INSTALLDIR= " + INSTALLDIR, INFORMATION);
The result is: INSTALLDIR = C:\abc.
I wonder: Can't "FeatureSetTarget" function set new path for public properties ? (ProgramFilesFolder, CommonAppDataFolder...).
If it can't, why I can set new path for "INSTALLDIR" property ?
I'm so confused >"<
Pls help me if u can..
I'm appreciated.
I'm working on a InstallScript MSI project.
I want to set path for some public properties.
Ex: Properties "ProgramFilesFolder" have default value:
ProgramFilesFolder = C:\ProgramFiles.
I want to set new value for this property: ProgramFilesFolder = C:\abc.
So I do:
FeatureSetTarget(MEDIA, "
MessageBox("ProgramFilesFolder = " + ProgramFilesFolder , INFORMATION);
But after that I see the result: ProgramFilesFolder = C:\ProgramFiles.
That means I can't set new path for ProgramFilesFolder property.
But with "INSTALLDIR" property:
Default value: INSTALLDIR = C:\WINDOWS\system32.
After I do:
FeatureSetTarget(MEDIA, "
MessageBox("INSTALLDIR= " + INSTALLDIR, INFORMATION);
The result is: INSTALLDIR = C:\abc.
I wonder: Can't "FeatureSetTarget" function set new path for public properties ? (ProgramFilesFolder, CommonAppDataFolder...).
If it can't, why I can set new path for "INSTALLDIR" property ?
I'm so confused >"<
Pls help me if u can..
I'm appreciated.
(16) Replies
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 25, 2009
09:36 AM
[ProgramFilesFolder] is System Folder Properties. This is not a public property, we can’t change this value.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 25, 2009
09:41 PM
Hi lambertpandian,
Thanks u so much for ur response 🙂 .
But when I looked up in Directory Table (Additional Tools/Direct Editor), I saw [ProgramFilesFolder] property have Directory_Parent is "TARGETDIR", and [INSTALLDIR] property have Directory_Parent is "SystemFolder" (In my others InstallScript MSI project, [INSTALLDIR] property have Directory_Parent is "ISMyProductDir" or "My_Product_Name"...).
That means [ProgramFilesFolder] isn't a System Folder Property, is it ? And how can I set new path for this property ?
Pls suggest ur idea.
I'm appreciated.
Thanks u so much for ur response 🙂 .
But when I looked up in Directory Table (Additional Tools/Direct Editor), I saw [ProgramFilesFolder] property have Directory_Parent is "TARGETDIR", and [INSTALLDIR] property have Directory_Parent is "SystemFolder" (In my others InstallScript MSI project, [INSTALLDIR] property have Directory_Parent is "ISMyProductDir" or "My_Product_Name"...).
That means [ProgramFilesFolder] isn't a System Folder Property, is it ? And how can I set new path for this property ?
Pls suggest ur idea.
I'm appreciated.
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 26, 2009
02:50 AM
It is possible. As per MSDN the CA should be included in UI and execute sequence, the below snippet is from MSDN. I tried a sample it worked for me, but “system folder properties” are predefined values to ease our work. Why can’t you define and use your own property?
MSDN snippet:
Custom actions that change one of the System Folder Properties should be included in both the execution sequence tables (InstallExecuteSequence Table or AdminExecuteSequence Table), and the user interface sequence tables (InstallUISequence Table and AdminUISequence Table) so that the folder is changed during both full UI and basic UI installations.
MSDN snippet:
Custom actions that change one of the System Folder Properties should be included in both the execution sequence tables (InstallExecuteSequence Table or AdminExecuteSequence Table), and the user interface sequence tables (InstallUISequence Table and AdminUISequence Table) so that the folder is changed during both full UI and basic UI installations.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 29, 2009
08:47 PM
Hi lambertpandian,
Thanks u again for ur answer. I'm appreciated.
I want to ask sth. As ur suggestion, I defined a new component and used my own property follow this description (http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q104964&sliceId=).
It worked fine. After I run my program, I can set path for my property. Due to that, I can have InstallShield copy folders and files into my property.
But the size of my product in Add/Remove Program Files (Control Panel) isn't correct. Perhaps it's the size of the folders and files in public properties ([INSTALLDIR]...), not include the size of the folders and files of my property.
How can I control the size of my product in Control Panel ?
And perhaps If I can't find the method to control the size of my product in Control Panel (include the size of the folders and files in my own properties), I ought to come back to my first way as I ask u above: How can I set path for InstallShield's properties ? ([ProgramFilesFolder], [CommonAppDataFolder]...). ( I tried to insert CA as u suggest above and similar this link (http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q105723&sliceId=) but it's still not work ). Cauz I think when I add folders, files into these properties, InstallShield can control the size of my product in Control Panel.
Pls help me. It's urgent.
And ur suggestion's very useful for me. Can I have ur e-mail to ask about many others aspects of InstallShield ?
Regards.
Thanks u again for ur answer. I'm appreciated.
I want to ask sth. As ur suggestion, I defined a new component and used my own property follow this description (http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q104964&sliceId=).
It worked fine. After I run my program, I can set path for my property. Due to that, I can have InstallShield copy folders and files into my property.
But the size of my product in Add/Remove Program Files (Control Panel) isn't correct. Perhaps it's the size of the folders and files in public properties ([INSTALLDIR]...), not include the size of the folders and files of my property.
How can I control the size of my product in Control Panel ?
And perhaps If I can't find the method to control the size of my product in Control Panel (include the size of the folders and files in my own properties), I ought to come back to my first way as I ask u above: How can I set path for InstallShield's properties ? ([ProgramFilesFolder], [CommonAppDataFolder]...). ( I tried to insert CA as u suggest above and similar this link (http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q105723&sliceId=) but it's still not work ). Cauz I think when I add folders, files into these properties, InstallShield can control the size of my product in Control Panel.
Pls help me. It's urgent.
And ur suggestion's very useful for me. Can I have ur e-mail to ask about many others aspects of InstallShield ?
Regards.
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 30, 2009
09:06 AM
As per windows “size in ARP is just estimation not appropriate”.
Try overwrite the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{PRODUCTGUID}
Keyname - > EstimatedSize(DWORD) Value -> Your size in hexadecimal.
Install creates this key automatically, try to overwrite the key after the publish product…
i didnt find time today. i will work this out tomorrow and let you know.
Try overwrite the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{PRODUCTGUID}
Keyname - > EstimatedSize(DWORD) Value -> Your size in hexadecimal.
Install creates this key automatically, try to overwrite the key after the publish product…
i didnt find time today. i will work this out tomorrow and let you know.
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 01, 2009
12:14 AM
Hi,
OK. I tried this. It is working for me.
As I said above, create a custom action to create a registry, call the custom action at last.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{PRODUCTGUID}
Keyname - > EstimatedSize(DWORD) Value -> Actual SIZE (no need hexadecimal).
OK. I tried this. It is working for me.
As I said above, create a custom action to create a registry, call the custom action at last.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{PRODUCTGUID}
Keyname - > EstimatedSize(DWORD) Value -> Actual SIZE (no need hexadecimal).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 02, 2009
05:11 AM
Hi lambertpandian,
I did as ur method. I set value for "EstimatedSize" key. It's OK. I saw the new size I have set in registry. But after installtion, the size of my product in Control Panel isn't changed.
What should I do to apply the size I set in registry for Control Panel ?
Plz help me again. Thanks u....
I did as ur method. I set value for "EstimatedSize" key. It's OK. I saw the new size I have set in registry. But after installtion, the size of my product in Control Panel isn't changed.
What should I do to apply the size I set in registry for Control Panel ?
Plz help me again. Thanks u....
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 02, 2009
07:43 AM
Where are you calling the custom action? You should call this at last, otherwise install will overwrite the registry.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 02, 2009
09:00 PM
Ya, I called this CA at last as ur description. After the installation's completed, I saw the size I set for "EstimatedSize" in registry. That means the value of "EstimatedSize" key was'nt overwritten. But the size in Control Panel isn't changed.
Do u see my problem ?
Plz help me again....
Regards.
Do u see my problem ?
Plz help me again....
Regards.
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 03, 2009
12:24 AM
I called the custom action “After ISSelfRegisterFinalize”.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 03, 2009
06:06 AM
Oh, "ISSelfRegisterFinalize” is in Basic MSI project, not in InstallScript MSI project..
How can I do that in InstallScript MSI project ?
How can I do that in InstallScript MSI project ?
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 03, 2009
09:25 AM
OnEnd( ) can help.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 06, 2009
08:21 PM
Hi,
I've tried. And it's not effective.
Any suggestion for me ?
Help me..
I've tried. And it's not effective.
Any suggestion for me ?
Help me..
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 06, 2009
08:53 PM
Hi there,
You should modify this key for InstallScript MSI project types -
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{PRODUCTGUID}.
Thanks,
Alpesh
You should modify this key for InstallScript MSI project types -
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{PRODUCTGUID}.
Thanks,
Alpesh
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 06, 2009
10:57 PM
Hi,
I set the value for "EstimatedSize" key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{PRODUCTGUID}.
After installation's completed, I saw the value I set in registry. But the size of my product isn't changed. It's the value of "EstimatedSize" key before I set.
How can I apply the value of "EstimatedSize" key for the size of my product in Control Panel ?
Thanks u..
I set the value for "EstimatedSize" key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{PRODUCTGUID}.
After installation's completed, I saw the value I set in registry. But the size of my product isn't changed. It's the value of "EstimatedSize" key before I set.
How can I apply the value of "EstimatedSize" key for the size of my product in Control Panel ?
Thanks u..
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 09, 2009
03:55 AM
Or suggest me a way to count the size of the folders, files in my own property (I created this property - not public properties of InstallShield). Cauz the size of my application in Control Panel is the size of folders, files in property of IS (Ex: INSTALLDIR property..). It's not included the size of my own property.
Any suggestions'll be appreciated.
Here's a reply to keep this thread alive.
Help me..
Any suggestions'll be appreciated.
Here's a reply to keep this thread alive.
Help me..