Discussion:
[WiX-users] Creating MSI for non admin user
Sanjay Poria
2010-04-13 13:11:21 UTC
Permalink
I have been tasked with writing a installer for an .NET application (consisting of a few DLLs and an exe) such that I can install it for a user that does not have admin rights. Presumably this means doing a per-user install of the application. I simply need to install the application files and create a desktop/start menu shortcuts for the user. In addition, the application is based on .NET 3.5 so I will need to detect if it already installed on the machine, and if not, install it (or tell the user how to do it).

Does anyone see any potential problems/issues here?
Are there any guidelines about how to do a per user install (eg, things like “Install app files to location X”, create shortcuts in location ‘Y’ etc.)?
What is the easiest/standard way to deal with the .NET framework installation issue? Do I need admin rights to even detect whether the correct version is already installed?

I did try googling around for answers to some of these (there is a load of stuff out there) but I couldn’t find anything that answers my basic questions. I apologise if these questions come up again and again.

Thanks
sanjay
Pally Sandher
2010-04-13 13:57:54 UTC
Permalink
You can use a LaunchCondition with the NETFRAMEWORK35 Property in
WixNetfxExtension to check for .NET 3.5 Framework
(http://wix.sourceforge.net/manual-wix3/wixnetfxextension.htm)

Non-administrator users can't write to ProgramFilesFolder so author your
installer to default to LocalAppDataFolder
(http://msdn.microsoft.com/en-us/library/aa369768.aspx).
Make sure you set the InstallPrivileges & InstallScope Elements on your
Package appropriately
(http://wix.sourceforge.net/manual-wix3/wix_xsd_package.htm).

I'm not sure if you need to do anything special for Shortcuts. I think
as long as ALLUSERS is not set they should be per-user rather than
per-machine but I can't be sure without testing. The How-To for
shortcuts
(http://wix.sourceforge.net/manual-wix3/create_start_menu_shortcut.htm)
uses a HKCU RegistryValue for it's KeyPath so I think it's fair to
assume that's the case.

Good Luck.

Palbinder Sandher
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500
F: +44 (0) 141 945 8501

http://www.iesve.com
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer


-----Original Message-----
From: Sanjay Poria [mailto:***@xanalys.com]
Sent: 13 April 2010 14:11
To: wix-***@lists.sourceforge.net
Subject: [WiX-users] Creating MSI for non admin user

I have been tasked with writing a installer for an .NET application
(consisting of a few DLLs and an exe) such that I can install it for a
user that does not have admin rights. Presumably this means doing a
per-user install of the application. I simply need to install the
application files and create a desktop/start menu shortcuts for the
user. In addition, the application is based on .NET 3.5 so I will need
to detect if it already installed on the machine, and if not, install it
(or tell the user how to do it).

Does anyone see any potential problems/issues here?
Are there any guidelines about how to do a per user install (eg, things
like "Install app files to location X", create shortcuts in location 'Y'
etc.)?
What is the easiest/standard way to deal with the .NET framework
installation issue? Do I need admin rights to even detect whether the
correct version is already installed?

I did try googling around for answers to some of these (there is a load
of stuff out there) but I couldn't find anything that answers my basic
questions. I apologise if these questions come up again and again.

Thanks
sanjay

------------------------------------------------------------------------
------
Download Intel&#174; Parallel Studio Eval Try the new software tools for
yourself. Speed compiling, find bugs proactively, and fine-tune
applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Phil Sayers
2010-04-13 14:30:55 UTC
Permalink
If you need something per-user and you can live with the limitations about
what icons/shortcuts you can place, you may want to look at ClickOnce.


-----Original Message-----
From: Sanjay Poria [mailto:***@xanalys.com]
Sent: Tuesday, April 13, 2010 9:11 AM
To: wix-***@lists.sourceforge.net
Subject: [WiX-users] Creating MSI for non admin user

I have been tasked with writing a installer for an .NET application
(consisting of a few DLLs and an exe) such that I can install it for a user
that does not have admin rights. Presumably this means doing a per-user
install of the application. I simply need to install the application files
and create a desktop/start menu shortcuts for the user. In addition, the
application is based on .NET 3.5 so I will need to detect if it already
installed on the machine, and if not, install it (or tell the user how to do
it).

Does anyone see any potential problems/issues here?
Are there any guidelines about how to do a per user install (eg, things like
"Install app files to location X", create shortcuts in location 'Y' etc.)?
What is the easiest/standard way to deal with the .NET framework
installation issue? Do I need admin rights to even detect whether the
correct version is already installed?

I did try googling around for answers to some of these (there is a load of
stuff out there) but I couldn't find anything that answers my basic
questions. I apologise if these questions come up again and again.

Thanks
sanjay

----------------------------------------------------------------------------
--
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Sanjay Poria
2010-04-13 15:24:26 UTC
Permalink
Thanks for the detailed response. That's a great help.

sanjay
Post by Pally Sandher
-----Original Message-----
Sent: 13 April 2010 14:58
Subject: Re: [WiX-users] Creating MSI for non admin user
You can use a LaunchCondition with the NETFRAMEWORK35 Property in
WixNetfxExtension to check for .NET 3.5 Framework
(http://wix.sourceforge.net/manual-wix3/wixnetfxextension.htm)
Non-administrator users can't write to ProgramFilesFolder so author
your
installer to default to LocalAppDataFolder
(http://msdn.microsoft.com/en-us/library/aa369768.aspx).
Make sure you set the InstallPrivileges & InstallScope Elements on your
Package appropriately
(http://wix.sourceforge.net/manual-wix3/wix_xsd_package.htm).
I'm not sure if you need to do anything special for Shortcuts. I think
as long as ALLUSERS is not set they should be per-user rather than
per-machine but I can't be sure without testing. The How-To for
shortcuts
(http://wix.sourceforge.net/manual-wix3/create_start_menu_shortcut.htm)
uses a HKCU RegistryValue for it's KeyPath so I think it's fair to
assume that's the case.
Good Luck.
Palbinder Sandher
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500
F: +44 (0) 141 945 8501
http://www.iesve.com
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer
-----Original Message-----
Sent: 13 April 2010 14:11
Subject: [WiX-users] Creating MSI for non admin user
I have been tasked with writing a installer for an .NET application
(consisting of a few DLLs and an exe) such that I can install it for a
user that does not have admin rights. Presumably this means doing a
per-user install of the application. I simply need to install the
application files and create a desktop/start menu shortcuts for the
user. In addition, the application is based on .NET 3.5 so I will need
to detect if it already installed on the machine, and if not, install
it
(or tell the user how to do it).
Does anyone see any potential problems/issues here?
Are there any guidelines about how to do a per user install (eg, things
like "Install app files to location X", create shortcuts in location
'Y'
etc.)?
What is the easiest/standard way to deal with the .NET framework
installation issue? Do I need admin rights to even detect whether the
correct version is already installed?
I did try googling around for answers to some of these (there is a load
of stuff out there) but I couldn't find anything that answers my basic
questions. I apologise if these questions come up again and again.
Thanks
sanjay
-----------------------------------------------------------------------
-
------
Download Intel&#174; Parallel Studio Eval Try the new software tools
for
yourself. Speed compiling, find bugs proactively, and fine-tune
applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.net/lists/listinfo/wix-users
Loading...