[wix-users] RegAsm commands running in Install.bat as Current User

Christopher Painter chrpai at iswix.com
Wed Feb 15 11:27:14 PST 2017


FWIW,  if you read the help topic on regasm /regfile you'll see a caveat that "user code"  isn't processed.   Very often I find I have to build and deploy my MSI to a VM snapshot and do my harvesting there in-situ then pull the reg keys back to my dev environment followed by a rinse and repeat.



________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Hoover, Jacob <Jacob.Hoover at greenheck.com>
Sent: Wednesday, February 15, 2017 11:05 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] RegAsm commands running in Install.bat as Current User

Using RegAsm in a MSI is highly frowned upon.  I would never deploy and use it.  Instead, Do the harvesting of RegAsm on your machine and explicitly author the reg keys.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of rajesh keshri
Sent: Wednesday, February 15, 2017 8:45 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] RegAsm commands running in Install.bat as Current User

Hi,

I am trying create a wix installer that is UI based and has option of peruser and permachince installation. When i tried to run installer in Admin console, it is running perfectly and registering the dll using RegAsm(commands in install.bat) when i run wixcustom action to run the install.bat.
.

*But same thing i am trying as current user and it not registering*. It is giving below error.

RegAsm : error RA0000 : An error occurred while writing the registration informa tion to the registry. Administrator permissions are needed to use the selected o ptions. Use an administrator command prompt to complete these tasks.

I have used below custom action:

 <CustomAction Id="InstallBatPerUser"
ExeCommand="[Datastream_DFO_Addin_1]Install.bat
"[Datastream_DFO_Addin_1]\*" "[$(var.Product_Version)]"
"[INSTALLCASPOLMODEPERUSER]" "[OFFICEVERSION]" "[OSARCHITECTURE]"" Directory="Datastream_DFO_Addin_1"
Execute="deferred" Return="asyncNoWait" Impersonate="yes"/>

    <CustomAction Id="InstallBatPerMachine"
ExeCommand="[Datastream_DFO_Addin_1]Install.bat
"[Datastream_DFO_Addin_1]\*" "[$(var.Product_Version)]"
"[INSTALLCASPOLMODEPERMACHINE]" "[OFFICEVERSION]" "[OSARCHITECTURE]"" Directory="Datastream_DFO_Addin_1"
Execute="deferred" Return="asyncNoWait" Impersonate="yes"/>

Can we run the RegAsm without admin rights?



Thanks,
Rajesh

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list