/build/static/layout/Breadcrumb_cap_w.png

Can I use private property [ProductName] as a DefaultDir value?

This may not be at all possible, but I tried to set an INSTALLDIR key in the Directory table as follows;

Directory_____Directory_Parent____DefaultDir
INSTALLDIR_____VendorDir____________[ProductName]

But I got an ICE03 error saying that the DefaultDir string is invalid - which I kind of expected.

The only reason I'd like to do this is because I need to create a number of very similar packages and it's just simpler to change the ProductName property than have to change it everywhere. But this really is just a would-be-nice. If it's not possible, it's no great difficulty.. it just got me wondering if it was..

Any thoughts?

0 Comments   [ + ] Show comments

Answers (7)

Posted by: henrik80 12 years ago
Second Degree Blue Belt
0
I think the ICE error is because it expects a shortname|longname path in DefaultDir (LONGF~1|Long FolderName). My guess is that the ProductName string is to long.
Posted by: Valiante 12 years ago
Senior Yellow Belt
0
I thought that too, but I tried adding a shortname, to no avail. Sorry, should have mentioned that in my first post.

I'm now of the mind that it can't be done this way, so I'm working on a custom action to set INSTALLDIR to [ProgramFilesFolder]VendorName\[ProductName] before the costing actions. Initial tests look promising but I'm now struggling with the shortcut name, as I'd also like to use [ProductName] here - so I think another custom action is needed.

I'll reply to my own thread if I (ever) get it to work, but I have other tasks/projects taking priority, so it's a case of when I can spare 5 minutes here or there.

Thanks for your reply though.
Posted by: pjgeutjens 12 years ago
Red Belt
0
Hi Marc,

first of all, you're on the right track for changing the INSTALLDIR property at runtime through a custom action. The shortcut name however is another matter, since the Name field in the Shortcuts table is not Formatted Text, so it does not allow for property substitution in the contents...

It can be done programatically by rewriting the MSI table entries on the fly before actually starting the installation, but that's a whole-nother proposition... I found this thread on the Flexera forums that goes into it (with some very nasty code), but you'll notice it's no cakewalk.

PJ
Posted by: Valiante 12 years ago
Senior Yellow Belt
0
Hi PJ,

Thanks for that - nice to know I'm not barking up the wrong tree. As for the shortcut CA, I'm a little more comfortable with it than you might think, as thankfully I'm a better scripter than I am packager, so I'll certainly give that a whirl - although I'd hope to write some slightly more elegant looking code than that. VBScab would string me up! [:D]

Cheers.
Posted by: anonymous_9363 12 years ago
Red Belt
0
|/|
|/|
|/|
|/|
|/|
|/|
|/| /¯)
|/|/\/
|/|\/
(¯¯¯)
(¯¯¯)
(¯¯¯)
(¯¯¯)
(¯¯¯)
/¯¯/\
/ ,^./\
/ / \/\
/ / \/\
( ( )/)
| | |/|
| | |/|
| | |/|
( ( )/)
\ \ / /
\ `---' /
`-----'
Posted by: pjgeutjens 12 years ago
Red Belt
0
Marc,

good to hear you're comfortable scripting.. I suppose if all you want to do is rewrite the Shortcuts Table's Name field with the value of (something +)ProductName, it should be easy enough to accomplish... I doubt if you can do it from a customaction inside said MSI though while it is running.

I've never tried it though. Be sure to keep me posted if you get it to work (elegantly ;))

PJ
Posted by: SnowLyric 12 years ago
Second Degree Brown Belt
0
VB Scab, you beauty!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ