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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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.
Answered 03/08/2012 by: henrik80
Second Degree Blue Belt

Please log in to comment
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.
Answered 03/08/2012 by: Valiante
Yellow Belt

Please log in to comment
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
Answered 03/08/2012 by: pjgeutjens
Red Belt

Please log in to comment
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.
Answered 03/08/2012 by: Valiante
Yellow Belt

Please log in to comment
0
|/|
|/|
|/|
|/|
|/|
|/|
|/| /¯)
|/|/\/
|/|\/
(¯¯¯)
(¯¯¯)
(¯¯¯)
(¯¯¯)
(¯¯¯)
/¯¯/\
/ ,^./\
/ / \/\
/ / \/\
( ( )/)
| | |/|
| | |/|
| | |/|
( ( )/)
\ \ / /
\ `---' /
`-----'
Answered 03/08/2012 by: VBScab
Red Belt

Please log in to comment
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
Answered 03/08/2012 by: pjgeutjens
Red Belt

Please log in to comment
0
VB Scab, you beauty!
Answered 03/08/2012 by: SnowLyric
Second Degree Brown Belt

Please log in to comment
Answer this question or Comment on this question for clarity