Re: [WiX-users] CheckBox Value via Custom Action
Is there any update? On Sat, May 19, 2012 at 11:01 AM, Ravi Raj wrote: > Any suggestions??? > > > On Tue, May 15, 2012 at 11:49 AM, Ravi Raj wrote: > >> I have done this thing: >> >> > Id="CA_SetProperty_EV" Property="ENABLEVIRTUALIZATION" Value="0" >> Execute="firstSequence" /> >>> Before="AppSearch">NOT Installed AND NOT >> OLDERVERSIONDETECTED >> NOT Installed AND NOT >> OLDERVERSIONDETECTED >> >> Now when chkbox is disabled, the registry stored value=0 (which is >> correct). Again, when I click Verify button (some action performed) and >> chkbox gets enabled (and its checked by default even in disabled state) but >> still i found registry value to be 0 but actually it should be one. >> why is this strange behavior? >> >> >> On Mon, May 14, 2012 at 7:38 PM, Ravi Raj wrote: >> >>> I need to perform certain action on my checkbox. >>> At the start if the installation the chkbox is disabled. There is a >>> button to call a custom action and verify certain things and assign a value >>> to a variable. >>> This variable will decide whether to enable chkbox or not. I have >>> implemented till this part: >>> >>> >> CheckBoxValue="1"X="35" Y="100"Width="160" Height="20" >>> Disabled="yes"Text="!(loc.Virtual_ChkBox)" >>> Property="ENABLEVIRTUAL"> >>> >>> So as soon as I launch the installer, the chkbox is disabled and >>> unchecked. If Verify is OK then its became enable but still unchecked. >>> Suppose a user does not check this box and proceeds with installation then >>> what vale gets stored in registry (I am storing this value ENABLEVIRTUALto >>> registry). >>> >>> If empty gets stored then it will give error while performing repair or >>> uninstall. How can I store this value? >>> >>> Again, >>> In custom action i have used a string null or empty chk (obtained from >>> previous installer dialog), if not null then verify works else it give >>> throw exception: >>> >>> [CustomAction] >>> public static ActionResult Check(Session mpSession) >>> { >>> mpSession.Log("Begin CustomActions.Check"); >>> >>> String sServerName = >>> GetSetProperties.GetSessionProperty(mpSession, "INSTALLMACHINE", false); >>> >>> if (!String.IsNullOrEmpty(sServerName)) >>> { >>> try >>> { >>>//Something >>> GetSetProperties.SetSessionProperty(mpSession, >>> "INTEGRATED", packs.Count != 1 ? "0" : "1"); >>> } >>> catch (Exception oException) >>> { >>> HandleException(mpSession, oException); >>> return ActionResult.Failure; >>> } >>> } >>> else >>> { >>> throw new Exception("SDK Service Machine cannot be empty."); >>> } >>> >>> return ActionResult.Success; >>> } >>> >>> private static void HandleException(Session mpSession, Exception ex) >>> { >>> string errorMsg = "Exception during custom action execution:" + >>> ex.ToString(); >>> >>> mpSession.Log(errorMsg); >>> >>> mpSession.Message(InstallMessage.Error, new Record { >>> FormatString = errorMsg }); >>> } >>> >>> Here in this code Catch, else and HandleException are not working >>> properly and the installer gets interrupted in between. How can I fix this? >>> >>> Some working code will be very useful as I am new to WiX. >>> -- >>> Thanks and Regards, >>> Ravi Raj >>> >>> >> >> >> -- >> Thanks and Regards, >> Ravi Raj >> >> > > > -- > Thanks and Regards, > Ravi Raj > > -- Thanks and Regards, Ravi Raj -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CheckBox Value via Custom Action
Any suggestions??? On Tue, May 15, 2012 at 11:49 AM, Ravi Raj wrote: > I have done this thing: > > Id="CA_SetProperty_EV" Property="ENABLEVIRTUALIZATION" Value="0" > Execute="firstSequence" /> > Before="AppSearch">NOT Installed AND NOT > OLDERVERSIONDETECTED > NOT Installed AND NOT > OLDERVERSIONDETECTED > > Now when chkbox is disabled, the registry stored value=0 (which is > correct). Again, when I click Verify button (some action performed) and > chkbox gets enabled (and its checked by default even in disabled state) but > still i found registry value to be 0 but actually it should be one. > why is this strange behavior? > > > On Mon, May 14, 2012 at 7:38 PM, Ravi Raj wrote: > >> I need to perform certain action on my checkbox. >> At the start if the installation the chkbox is disabled. There is a >> button to call a custom action and verify certain things and assign a value >> to a variable. >> This variable will decide whether to enable chkbox or not. I have >> implemented till this part: >> >> >X="35" Y="100"Width="160" Height="20"Disabled="yes" >> Text="!(loc.Virtual_ChkBox)" Property="ENABLEVIRTUAL"> > Action="enable"> > Action="disable"> >> >> So as soon as I launch the installer, the chkbox is disabled and >> unchecked. If Verify is OK then its became enable but still unchecked. >> Suppose a user does not check this box and proceeds with installation then >> what vale gets stored in registry (I am storing this value ENABLEVIRTUALto >> registry). >> >> If empty gets stored then it will give error while performing repair or >> uninstall. How can I store this value? >> >> Again, >> In custom action i have used a string null or empty chk (obtained from >> previous installer dialog), if not null then verify works else it give >> throw exception: >> >> [CustomAction] >> public static ActionResult Check(Session mpSession) >> { >> mpSession.Log("Begin CustomActions.Check"); >> >> String sServerName = >> GetSetProperties.GetSessionProperty(mpSession, "INSTALLMACHINE", false); >> >> if (!String.IsNullOrEmpty(sServerName)) >> { >> try >> { >>//Something >> GetSetProperties.SetSessionProperty(mpSession, >> "INTEGRATED", packs.Count != 1 ? "0" : "1"); >> } >> catch (Exception oException) >> { >> HandleException(mpSession, oException); >> return ActionResult.Failure; >> } >> } >> else >> { >> throw new Exception("SDK Service Machine cannot be empty."); >> } >> >> return ActionResult.Success; >> } >> >> private static void HandleException(Session mpSession, Exception ex) >> { >> string errorMsg = "Exception during custom action execution:" + >> ex.ToString(); >> >> mpSession.Log(errorMsg); >> >> mpSession.Message(InstallMessage.Error, new Record { >> FormatString = errorMsg }); >> } >> >> Here in this code Catch, else and HandleException are not working >> properly and the installer gets interrupted in between. How can I fix this? >> >> Some working code will be very useful as I am new to WiX. >> -- >> Thanks and Regards, >> Ravi Raj >> >> > > > -- > Thanks and Regards, > Ravi Raj > > -- Thanks and Regards, Ravi Raj -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CheckBox Value via Custom Action
I have done this thing: NOT Installed AND NOT OLDERVERSIONDETECTED NOT Installed AND NOT OLDERVERSIONDETECTED Now when chkbox is disabled, the registry stored value=0 (which is correct). Again, when I click Verify button (some action performed) and chkbox gets enabled (and its checked by default even in disabled state) but still i found registry value to be 0 but actually it should be one. why is this strange behavior? On Mon, May 14, 2012 at 7:38 PM, Ravi Raj wrote: > I need to perform certain action on my checkbox. > At the start if the installation the chkbox is disabled. There is a button > to call a custom action and verify certain things and assign a value to a > variable. > This variable will decide whether to enable chkbox or not. I have > implemented till this part: > >X="35" Y="100"Width="160" Height="20"Disabled="yes" >Text="!(loc.Virtual_ChkBox)" Property="ENABLEVIRTUAL"> Action="enable"> Action="disable"> > > So as soon as I launch the installer, the chkbox is disabled and > unchecked. If Verify is OK then its became enable but still unchecked. > Suppose a user does not check this box and proceeds with installation then > what vale gets stored in registry (I am storing this value ENABLEVIRTUALto > registry). > > If empty gets stored then it will give error while performing repair or > uninstall. How can I store this value? > > Again, > In custom action i have used a string null or empty chk (obtained from > previous installer dialog), if not null then verify works else it give > throw exception: > > [CustomAction] > public static ActionResult Check(Session mpSession) > { > mpSession.Log("Begin CustomActions.Check"); > > String sServerName = > GetSetProperties.GetSessionProperty(mpSession, "INSTALLMACHINE", false); > > if (!String.IsNullOrEmpty(sServerName)) > { > try > { >//Something > GetSetProperties.SetSessionProperty(mpSession, > "INTEGRATED", packs.Count != 1 ? "0" : "1"); > } > catch (Exception oException) > { > HandleException(mpSession, oException); > return ActionResult.Failure; > } > } > else > { > throw new Exception("SDK Service Machine cannot be empty."); > } > > return ActionResult.Success; > } > > private static void HandleException(Session mpSession, Exception ex) > { > string errorMsg = "Exception during custom action execution:" + > ex.ToString(); > > mpSession.Log(errorMsg); > > mpSession.Message(InstallMessage.Error, new Record { FormatString > = errorMsg }); > } > > Here in this code Catch, else and HandleException are not working properly > and the installer gets interrupted in between. How can I fix this? > > Some working code will be very useful as I am new to WiX. > -- > Thanks and Regards, > Ravi Raj > > -- Thanks and Regards, Ravi Raj -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] CheckBox Value via Custom Action
I need to perform certain action on my checkbox. At the start if the installation the chkbox is disabled. There is a button to call a custom action and verify certain things and assign a value to a variable. This variable will decide whether to enable chkbox or not. I have implemented till this part: So as soon as I launch the installer, the chkbox is disabled and unchecked. If Verify is OK then its became enable but still unchecked. Suppose a user does not check this box and proceeds with installation then what vale gets stored in registry (I am storing this value ENABLEVIRTUAL to registry). If empty gets stored then it will give error while performing repair or uninstall. How can I store this value? Again, In custom action i have used a string null or empty chk (obtained from previous installer dialog), if not null then verify works else it give throw exception: [CustomAction] public static ActionResult Check(Session mpSession) { mpSession.Log("Begin CustomActions.Check"); String sServerName = GetSetProperties.GetSessionProperty(mpSession, "INSTALLMACHINE", false); if (!String.IsNullOrEmpty(sServerName)) { try { //Something GetSetProperties.SetSessionProperty(mpSession, "INTEGRATED", packs.Count != 1 ? "0" : "1"); } catch (Exception oException) { HandleException(mpSession, oException); return ActionResult.Failure; } } else { throw new Exception("SDK Service Machine cannot be empty."); } return ActionResult.Success; } private static void HandleException(Session mpSession, Exception ex) { string errorMsg = "Exception during custom action execution:" + ex.ToString(); mpSession.Log(errorMsg); mpSession.Message(InstallMessage.Error, new Record { FormatString = errorMsg }); } Here in this code Catch, else and HandleException are not working properly and the installer gets interrupted in between. How can I fix this? Some working code will be very useful as I am new to WiX. -- Thanks and Regards, Ravi Raj -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users