Groups | Blog | Home
all groups > dotnet setup > january 2004 >

dotnet setup : Get Primary Output property or value


Darren Green
1/31/2004 4:55:54 PM
I want to write my own registry string value that contains the filename
of my Primary Output. I can use the "Registry" screen in my setup
project to create the keys and the string value, but to get the actual
filename I am thinking there must be a property I can use, similar to
the way I can user [TARGETDIR] to get the folder, but in this case I
want both the folder and the filename for the primary output.

Make sense?

Thanks
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
Phil Wilson
2/2/2004 10:36:16 AM
Have you tried just using [TARGETDIR]programname.exe in a registry value?
--
Phil Wilson [MVP Windows Installer]
----
[quoted text, click to view]

Phil Wilson
2/4/2004 1:54:55 PM
It can be done, but I'm pretty sure Visual Studio doesn't expose that particular
Windows Installer capability in the IDE. If you look at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/formatted.asp
and the [#filekey] part, that's what does it. The filekey for your exe isn't
visible in the VS IDE for Setup projects, so using it would be a manual process
using a MSI editor like Orca, and you probably couldn't rely on VS to keep that
filekey unchanged - it's just a private implementation detail to VS.
--
Phil Wilson [MVP Windows Installer]
----
[quoted text, click to view]

Darren Green
2/4/2004 6:16:34 PM
In message <eAC6ytb6DHA.2392@TK2MSFTNGP11.phx.gbl>, Phil Wilson
<phil.wilson@unisys.spamcom> writes
[quoted text, click to view]

Phil,

That is what I am using now. What happens if programname.exe changes?
Since the installer appears to reference the Primary Output of my
project, not a specific file I assume it keeps going, but any values
that I have coded programname.exe in are now obsolete. I thought that
there may be a better way of doing it that didn't rely on hard coding.

Cheers
--
Darren Green (SQL Server MVP)
Darren Green
2/4/2004 10:41:12 PM
In message <OUVRHm26DHA.2572@TK2MSFTNGP09.phx.gbl>, Phil Wilson
<phil.wilson@unisys.spamcom> writes
[quoted text, click to view]


I think I'll stick with coding it, I'd never remember to check that sort
of thing, and Orca just scares me! Thanks for trying.

Cheers

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
AddThis Social Bookmark Button