Re: [WiX-users] Patching and Pyro Warning PYRO1110

2012-02-13 Thread Elfe Xu
With someone's help, I figured out the approach.
After CostFinalize action, before InstallValidate action, add a customer
action, say UpdateFeatureChange, which changes the feature's reqire state
accordingly.
In DTF, it is as simple as 
FeatureInfo featureA2= this.Session.Features[FeatureA2];
featureA2.RequestState = InstallState.Absent; // Or
Local/Source/Advertise... according to other conditions
The DTF is using MsiSetFeatureState API to set the state.
The condition is complex, because I need to handle different scenarios like
repair/change/update/uninstall.
However, this is a workable approach.

--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Patching-and-Pyro-Warning-PYRO1110-tp7256794p7282912.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Patching and Pyro Warning PYRO1110

2012-02-09 Thread Elfe Xu
Echo on the question.
I have exactly the same problem:
In my product V1.0, I have
FeatureCommon (always be installed)
  Common.dll
FeatureA (optional)
  A1.dll
FeatureB (optional)
 B1.dll

In my product V1.1 I added A2.dll to feature A
   FeatureCommon (always be installed)
  Common.dll
FeatureA (optional)
  A1.dll
  A2.dll
FeatureB (optional)
 B1.dll

Thus I add ComponentRef Id=cmpA2DLL to the PatchFamily, then I got error of
   Component 'cmpA2DLL' was added to feature FeatureA. If you cannot
guarantee this feature will always be installed, you should consider adding
new components to top-level features to prevent prompts for source when
installing this patch.

Does it mean, if I want to add A2.dll, I must have a new top-level
FeatureA2? Then I could I make sure FeatureA2 will be installed when
patching if and only if FeatureA is installed? Manually write several
pre-check?

Anyone can give me a sample of how to make the patch correct for this
scenario?

Thanks,
-Elfe

--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Patching-and-Pyro-Warning-PYRO1110-tp7256794p7271713.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Question block lower version patch

2011-05-27 Thread Elfe Xu
Hi all,

I have V1.0, V1.1 and V1.2 MSIs.
My requirements are:

1)  patch1.msp, that can upgrade from V1.0 to V1.1

2)  patch2.msp, that can

2.1   upgrade from V1.0 to V1.2,

2.2   from V1.1 to V1.2,

2.3   from (V1.0+patch1) to V1.2

3)  It is blocked to install patch1.msp, V1.2 is already installed on the 
machine (either by v1.2msi, or by v1.0/1.1msi + patch2.msp)

I learnt from this page 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Need-help-with-minor-update-patch-td5981491.html
 that I need to define two target images for patch2, so it can point to 1.0 and 
1.1.
However, The TagetImage is an element used in PatchCreation approach only. I'm 
not sure whether I should how to do this with the pure wix approach 
http://wix.sourceforge.net/manual-wix3/wix_patching.htm .
Should I specify multiple PatchBaseline? Where could I set the target version?
  PatchBaseline Id=RTM
Validate  ProductVersionOperator=LesserOrEqual /
  /PatchBaseline
Which MSIs I should use for the torch command?

Seems to me if I use
torch.exe -p -xi 1.0\product.wixpdb 1.1\product.wixpdb -out patch\diff.wixmst 
for patch1, and
torch.exe -p -xi 1.0\product.wixpdb 1.2\product.wixpdb -out patch\diff.wixmst 
for patch2
I can achieve 1, 2.1, 2.3, but I cannot do 2.2. I will get error The upgrade 
patch cannot be installed by the Windows Installer service because the program 
to be upgraded may be missing,...

How could I specify more than one target?

Thanks,
-Elfe



--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] error PYRO0001: Could not find file ?

2011-05-09 Thread Elfe Xu
Hi all,
I'm following the example 
http://wix.sourceforge.net/manual-wix3/wix_patching.htm to create a patch.
Everything works fine on test binaries built on my local computer.
However, I got error PYRO0001: Could not find file when I changed to use 
released msi file built by team's build machine.

In the patch.proj, I have
OldVersionPath\\rel\Archive\Product\DailyBuilds.1.0.1381.0.110412-2317\Release\Bin\en-us/OldVersionPath
NewVersionPath\\rel\Archive\Product\DailyBuilds.1.0.1383.0.110427-1815\Release\Bin\en-us/NewVersionPathfile:///\\rel\Archive\Product\DailyBuilds.1.0.1383.0.110427-1815\Release\Bin\en-us%3c\NewVersionPath

Exec Command=$(WixToolPath)candle.exe -wx -arch x64 -o 
$(ObjDir)\Bin\x64\Patch.wixobj  Patch.wxs /
Exec Command=$(WixToolPath)light.exe -o $(ObjDir)\Bin\en-us\Patch_x64.wixmsp 
-cultures:en-us -loc Strings_en_US.wxl  $(ObjDir)\Bin\x64\Patch.wixobj   /
Exec Command=$(WixToolPath)torch.exe -p -xi 
$(OldVersionPath)\Setup_x64.wixpdb $(NewVersionPath)\Setup_x64.wixpdb -o 
$(ObjDir)\Bin\en-us\diff_x64.wixmst /
Exec Command=$(WixToolPath)pyro.exe -wx $(ObjDir)\Bin\en-us\Patch_x64.wixmsp 
-o $(OutputPath)\en-us\Patch_x64.msp -t RTM $(ObjDir)\Bin\en-us\diff_x64.wixmst 
 -sa -sf -sh /


The build reports error
pyro.exe : error PYRO0001: Could not find file 'C:\Product\161\Atlanta\DailyBui
lds\Sources.binaries.Release\bin\ClientShared.dll'.
  Exception Type: System.IO.FileNotFoundException
  Stack Trace:
 at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
 at System.IO.FileInfo.get_Length()
 at Microsoft.Tools.WindowsInstallerXml.BinderFileManager.CompareFiles(Stri
  ng targetFile, String updatedFile)
 at Microsoft.Tools.WindowsInstallerXml.Binder.CopyTransformData(Output out
  put, FileRowCollection allFileRows)
 at Microsoft.Tools.WindowsInstallerXml.Binder.BindDatabase(Output output,
  String databaseFile)
 at Microsoft.Tools.WindowsInstallerXml.Binder.Bind(Output output, String f
  ile)
 at Microsoft.Tools.WindowsInstallerXml.Tools.Pyro.Run(String[] args)

Seems it is looking for some files on the build machine  
('C:\Product\161\Atlanta\DailyBuilds\...), but every time we finish the build, 
we copy the outputs to share folders like 
\\rel\archive\file:///\\rel\archive\
Isn't the old and new MSIs/wixpdbs contains all the binaries required? Why it 
still requires the files on build machine? How could I make it look for another 
folder (the shared folder) instead?

Thanks,
-Elfe

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] ProductVersion does not changed after install Patch

2011-04-10 Thread Elfe Xu
Hi,
I'm following the tutorial 
http://wix.sourceforge.net/manual-wix3/wix_patching.htm to create patches by 
WiX.
I have an old MSI with version 0.1.1463.0, and a new MSI with version 
0.2.1468.0, and then using the same approach as the tutorial to create a 
Patch.msp.
I installed old MIS, then install Patch.msp. I found although the files are 
replaced correctly after installing patch, the ProductVersion shown on 
Add/Remove Program panel is still the old one (0.1.1463.0).
And I found I can install the patch again and again.

I use ORCA to check the packages.
For old MSI, it has a property ProductVersion=0.1.1463.0
For new MSI, it has a property ProductVersion=0.2.1468.0
For the Patch, The MsiPatchSequence has the SamplePatchFamily row with 
sequence=0.2.1468.0. However, it does not contain any other version information.
If I use Transform-ViewPatch to view the Patch, in the Property table, I only 
see following properties added, but the ProductVersion property is not changed.

_806DAAD55E60414984A8C6AB43F2E87C.AllowRemoval   1
_806DAAD55E60414984A8C6AB43F2E87C.PatchCode  
{806DAAD5-5E60-4149-84A8-C6AB43F2E87C}
PATCHNEWSUMMARYSUBJECT A test Minor Update
PATCHNEWPACKAGECODE {806DAAD5-5E60-4149-84A8-C6AB43F2E87C}
PATCHNEWSUMMARYCOMMENTS A test Minor Update

What should I do, to make the ProductVersion updated after installing the patch?

Thanks,
-Elfe

P.S. I'm using following code to create patch:
?xml version=1.0 encoding=UTF-8?
Wix xmlns=http://schemas.microsoft.com/wix/2006/wi;
  ?include ..\..\..\Version.wxi ?

Patch
Id={806DAAD5-5E60-4149-84A8-C6AB43F2E87C}
AllowRemoval=yes
Manufacturer=!(loc.ManufactureName)
MoreInfoURL=!(loc.MoreInfoURL)
DisplayName=!(loc.PatchDisplayName)
Description=!(loc.PatchDescription)
Classification=Hotfix

Media Id=5000 Cabinet=patch.cab
  PatchBaseline Id=RTM
Validate  ProductVersionOperator=Equal /
  /PatchBaseline
/Media
PatchFamilyRef Id=SamplePatchFamily/
/Patch
Fragment
!--TODO: Update this section, to include components that need to be 
updated.--
PatchFamily Id='SamplePatchFamily' Version='$(var.Product_Version)' 
Supersede='yes'
  ComponentRef Id=cmpDB105F4AB1E44437B2CE0502A96019E8/
  ComponentRef Id=cmpEE183C6477823F89D36AFD338130E837/
/PatchFamily
/Fragment
/Wix

And following command:
Exec Command=$(WixToolPath)candle.exe -wx -arch x64 -o 
$(ObjDir)\Bin\x64\Patch.wixobj  Patch.wxs /
Exec Command=$(WixToolPath)light.exe -o 
$(ObjDir)\Bin\en-us\Patch_x64.wixmsp -cultures:en-us -loc Strings_en_US.wxl  
$(ObjDir)\Bin\x64\Patch.wixobj   /
Exec Command=$(WixToolPath)torch.exe -p -xi 
$(EnlistmentRoot)\Public\MU\Previous\en-us\Setup_x64.wixpdb 
$(OutputPath)\en-us\Setup_x64.wixpdb -o $(ObjDir)\Bin\en-us\diff_x64.wixmst /
Exec Command=$(WixToolPath)pyro.exe -sw0227 -sw1079 -wx 
$(ObjDir)\Bin\en-us\Patch_x64.wixmsp -o $(OutputPath)\en-us\Patch_x64.msp -t 
RTM $(ObjDir)\Bin\en-us\diff_x64.wixmst /
Exec Command=makecab.exe $(OutputPath)\en-us\Patch_x64.msp 
$(OutputPath)\en-us\Patch_x64.cab /

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Change/Repair requires the msi with exactly the same name as it is when installed?

2011-01-18 Thread Elfe Xu

Thanks for the reply.
What I want to do, is not updates/upgrades. It’s just change the
installation:
I have FeatureA and FeatureB, previously I’ve installed FeatureA, and now I
want to add FeatureB.

I notice one thing strange: when I try to uninstall my foo application, by
click the Uninstall button in ARP, the UAC pops up, and shows Program:
c:\windows\Installer\245bfd.msi, Publisher: unknown (I think this is because
the msi is not signed). It’s not named foo.msi. (While for other Microsoft
applications I have on my machine, I saw it shows the program with correct
msi name) Not sure if this is related with my problem.

Any idea?

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Change-Repair-requires-the-msi-with-exactly-the-same-name-as-it-is-when-installed-tp5934762p5937576.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Change/Repair requires the msi with exactly the same name as it is when installed?

2011-01-17 Thread Elfe Xu
Hi all,

I have a foo.msi in my temp folder when I install my foo application, with 
feature A.
Then I go to the Add-Remove Program control panel, click Change, and want to 
install a new feature B of foo application.
I got two problems then:
1, the UAC does not popup, when I click Change button and start to install 
feature B. This will cause some custom actions fail because it does not have 
enough privilege.
2, A message dialog pop up ask:
The feature you are trying to use is on a network resource that is unavailable. 
Click OK to try again, or enter an alternate path to a folder containing the 
installation package foo.msi in the box below: ...
I've already deleted my foo.msi in temp folder, so I point to 
c:\windows\installer\245bfd.msi (the copy MSI created during installation), but 
the dialog still shows.

I tried rename the 245bfd.msi to foo.msi, and the UAC pops up, the change 
success.

So the question: why installer requires the MSI with exactly the same name?
Seems change is really a common scenario, and most time customer will not have 
the msi file by hand, but let windows installer use the cached one. How does 
this work? Am I doing anything wrong, that breaks this scenario?

Thanks,
-Elfe
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Question about using custom action to query control table

2010-11-14 Thread Elfe Xu
Hi all,
I want to use custom action (written in C# by DTF) to query and update some 
record in the control table.
Here is the code:
string query = SELECT 'Control' , `Text` , `Property` FROM 
`Control`;
View view = session.Database.OpenView(query);
view.Execute();
while (true)
{
using (Record r = view.Fetch())
{
if (r == null)
{
break;
}

if (string.Equals(r.GetString(1), controlName, 
StringComparison.Ordinal))
{
//...
view.Update(r);
break;
}
}
}

However, I found r.GetString(1) always return the value Control, but never 
the actual control name. I tried Control.Control and get the same result. It 
also happens to columns like Dialog_, Property, Type etc.
So I could I know if the record is the control that I want to update? How could 
I distinguish it with other controls?

Thanks,
-Elfe
--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Question about using custom action to query control table

2010-11-14 Thread Elfe Xu

Oh yes, you are correct. Now I can get the values.
A new problem: seems the control table cannot been updated?
In the code, I have

r.SetString(10, newText);
view.Update(r);

and I got InstallerException 
{Function failed during execution. Database:  Table(s) Update failed.}
with error code 1627

I've already modified the query to select all columns:
SELECT `Dialog_` , `Control`, `Type` , `X` , `Y` , `Width` , `Height` ,
`Attributes` , `Property` , `Text` , `Control_Next` ,`Help` FROM `Control`
And r is a ScrollableText control, field is the Text property.

Any idea of the failure?

Thanks,
-Elfe


-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Question-about-using-custom-action-to-query-control-table-tp5738865p5739007.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to make the custom action run under LocalSystem account?

2010-08-31 Thread Elfe Xu

Yes! After I set ALLUSERS=1, it runs as local system and delete the remote
folder.
When the system account go through network, it is using the computer account
(MachineName$). And my folder is granting permission to MachineName$.

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-make-the-custom-action-run-under-LocalSystem-account-tp5474012p5481429.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] My setup delete a parent registry key which is not created by it

2010-08-30 Thread Elfe Xu

Anyone could help with this question?
Shouldn't the uninstaller only remove the registry key created by itself,
but not the parent key, even the parent key is empty after we remove our
sub-key?

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/My-setup-delete-a-parent-registry-key-which-is-not-created-by-it-tp5435325p5476897.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] My setup delete a parent registry key which is not created by it

2010-08-30 Thread Elfe Xu

From this post 
http://social.msdn.microsoft.com/forums/en-us/winformssetup/thread/2E1FF88B-1955-4AD0-98A2-E306EACFBA5C
http://social.msdn.microsoft.com/forums/en-us/winformssetup/thread/2E1FF88B-1955-4AD0-98A2-E306EACFBA5C
 

I saw:
you need to describe the path to your new registry item (sub-key), not
create a key that belongs to the parent key (not owned by your product)

How could I create a subkey, but not create the parent key?
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/My-setup-delete-a-parent-registry-key-which-is-not-created-by-it-tp5435325p5477167.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] My setup delete a parent registry key which is not created by it

2010-08-30 Thread Elfe Xu

And in this post 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Website-gets-deleted-when-uninstalling-Web-App-td5436443.html
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Website-gets-deleted-when-uninstalling-Web-App-td5436443.html
 
Seems it's the same problem: if the parent key does not have any sub key or
values, the parent key will get deleted we MSI intend to delete the child
key.

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/My-setup-delete-a-parent-registry-key-which-is-not-created-by-it-tp5435325p5480883.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to make the custom action run under LocalSystem account?

2010-08-29 Thread Elfe Xu

The KB says 
If it is necessary to run your custom action when using the local system
security context, set the attributes of the custom action in the
CustomAction table to either 3072 (msidbCustomAction TypeInScript +
msidbCustomAction TypeNoImpersonate)

I've already done this, but seems it's still using the admin user's account,
not the LocalSystem account.
What does using the local system security context mean? It is not equal to
using LocalSystem account?

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-make-the-custom-action-run-under-LocalSystem-account-tp5474012p5476642.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] How to make the custom action run under LocalSystem account?

2010-08-28 Thread Elfe Xu
Hi,
I have a custom action that need to delete a remote sub-folder 
\\servermachine\sharedfolder$\clientIDfile:///\\servermachine\sharedfolder$\clientID
 , the sub-folder's CREATOR OWNER is clientMachine$, it's created by a service 
running on client machine with LocalSystem account, and only the CREATOR OWNER 
has permission to delete it.

Since the Windows Installer is also running under LocalSystem (I checked 
services.msc and confirmed that), if I make the custom action not impersonating 
(CustomAction/@Impersonate=no), shouldn't it using the LocalSystem account?
However, I found it is still running as the user's account 
(clientMachine\Administrator).
If I logon as a non-admin user (clientMachine\testUser), when doing the 
uninstall, it requires me to provide admin credential (I use 
clientMachine\Administrator), then I found the custom action is using the 
administrator's account.

Is there any method to make the CA running under LocalSystem account?
(My CA type is 3072, i.e. msidbCustomActionTypeDll + 
msidbCustomActionTypeBinaryData + msidbCustomActionTypeInScript + 
msidbCustomActionTypeNoImpersonate)

Thanks,
-Elfe

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Question about InstallValidation for uninstall

2010-08-26 Thread Elfe Xu
Hi all,
When uninstall a product, during InstallValidation, MSI will check if need to 
close any dependent applications. If yes, will show a message box:
The following applications should be lcosed before continuing the install:
...
And let user choose

(1)Automatically close applications and attempt to restart them after setup 
is complete.

(2)Do not close applications. (A reboot will be required)

Our product is depends on another windows service, but I don't want to show 
this dialog.
Of course I can schedule an action to close the application before 
installvalidation, but I do not want to do this, because then I need to handle 
the restart for various cases (cancel before/after installinitialize, install 
success/fail etc).

Is there any way that we don't show the dialog, but force to use option (1)?

Thanks,
-Elfe

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Question about InstallValidation for uninstall

2010-08-26 Thread Elfe Xu

Thanks Phil.

My question is: is there anyway for me to hide the MsiRMFilesInUse dialog,
and do the close/restart application automatically? I want to use the
Restart Mananger rather than implement start/stop functions by myself, but I
don't want user to see this dialog.

Thanks,
-Elfe

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Question-about-InstallValidation-for-uninstall-tp5464620p5467912.html
Sent from the wix-users mailing list archive at Nabble.com.

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] My setup delete a parent registry key which is not created by it

2010-08-18 Thread Elfe Xu
Hi all,
I my setup project, I create a sub registry key MyMgmtGroup under 
HKLM\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Agent Management 
Groups

Component Id=CMP_Reg_Software Guid={4578FEE6-4183-4DC8-8E5F-EEC447C6A898}
 RegistryKey Action=createAndRemoveOnUninstall Root=HKLM 
Key=SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Agent Management 
Groups\MyMgmtGroup /
  /Component

I found when uninstall my product, the parent registry key 
HKLM\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Agent Management 
Groups is deleted by my MSI, and it breaks the MOM. (This parent key does not 
have any other sub keys or values)

Why does the MSI have such behavior? And how to fix it?

Thanks,
-Elfe
--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] ReserveCost == the size shown in Add/Remove Panel?

2010-08-17 Thread Elfe Xu
Hi,
In my product MSI, I reserve cost for the data folder with 200M, because later 
when the application running, it's likely that the application will write lots 
of data to the disk.
Directory Id=dirCB80BB8E7C4DF6458FEC42C79CD3833C Name=MyProductData
Component Id=cmpC3EF5D274D0D1EF29832EABC636A3438 
Guid={B9EF5DD2-75CA-4596-A95D-785ECC65E8F5} KeyPath=yes
  !--Reserve 200M for the application.--
  ReserveCost Id=CostForData RunLocal=209715200 
RunFromSource=209715200/
  CreateFolder
util:PermissionEx GenericAll=yes User=[ServiceAccount] /
  /CreateFolder
/Component
/Directory

However, by using this approach, the Add/Remove program panel shows the size of 
my product is 203M, although actually it is only using 3 M current and the 
other 200M is only reserving for future usage.

Is there any way for me to reserve the cost, but showing ARP with the real 
size? Or I should use my own cost-validation to make sure there is enough space 
for my product?

Thanks,
-Elfe

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] The DirProperty in RemoveFile table must be a property name in Directory table?

2010-07-26 Thread Elfe Xu

Hi Pally, 
Sorry if the first example is misleading, but the data created by the
product is not related with any user (actually the product is several
services, and web services, and some of the sub folder need be shared and
allow other machines in LAN to read and write). Would you please give me the
link of Microsoft platform guideline that introduce the usage of
CommonAppData, so I can check if I should use that folder?

But more important, why do you think moving data to that folder would solve
my problem? Is there any difference?

Thanks,
-Elfe



Pally Sandher wrote:
 
 If you read my reply you'll see I never mentioned user accounts
 anywhere. My questions was Why are you storing user specific data under
 the installation directory instead of somewhere like My Documents or
 CommonAppData as per Microsoft's platform guidelines?.
 
 Palbinder Sandher 
 Software Deployment  IT Administrator
 T: +44 (0) 141 945 8500 
 F: +44 (0) 141 945 8501 
 

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/The-DirProperty-in-RemoveFile-table-must-be-a-property-name-in-Directory-table-tp5317922p5340441.html
Sent from the wix-users mailing list archive at Nabble.com.

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] The DirProperty in RemoveFile table must be a property name in Directory table?

2010-07-26 Thread Elfe Xu

Hi, anyone can help me on this? Would you please check if the attached sample
code works, or if I've made any mistake?
I doubt if I should also insert records to Directory table, but it seems to
me is the wrong direction. Since remove entire folder is a common
requirement for uninstall, I would like to here if there are easier
approaches.

Thanks,
-Elfe


Elfe Xu wrote:
 
 
 http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/file/n5334233/WixPlayground.zip
 WixPlayground.zip 
 
 I wrote a small prototype as attached.
 
 Please compile it, run the msi to install it, go to the install location
 folder, execute the CreateFolderAndFiles.cmd, the run uninstall.
 
 In my machine, it shows 2727 error (DirProperty does not exists in
 Directory table), and abort.
 To unintall the product, I have to manually remove the RemoveFolderTest
 root folder, then uninstall again.
 
 Rob, would you please help to check if it can work on your machine?
 
 Thanks,
 -Elfe
 

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/The-DirProperty-in-RemoveFile-table-must-be-a-property-name-in-Directory-table-tp5317922p5340450.html
Sent from the wix-users mailing list archive at Nabble.com.

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] QuietExec in CA

2010-07-26 Thread Elfe Xu

Do you mean QtExec ?

http://wix.sourceforge.net/manual-wix3/qtexec.htm
http://wix.sourceforge.net/manual-wix3/qtexec.htm 

In order to use QtExec, you must include a reference to the WixUtilExtension
when building your MSI. To do this, add the command line argument -ext
WixUtilExtension.dll when calling Light.exe.

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/QuietExec-in-CA-tp5339782p5340458.html
Sent from the wix-users mailing list archive at Nabble.com.

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Error 2318 when specifying C:\ as install location

2010-07-26 Thread Elfe Xu

2318 is file does not exist error.

If you use C: as the INSTALLLOCATION, the application will be installed
under the drive root (c:\), there is no application folder like SecureBridge
been created.
Does your installer tring to access files under the application folder?
You can use /l*v to have the log and find more information then.




-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Error-2318-when-specifying-C-as-install-location-tp5339970p5340539.html
Sent from the wix-users mailing list archive at Nabble.com.

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Questions about showing warning/error message dialog

2010-07-26 Thread Elfe Xu

Are there any document of MSI shows what error is fatal and what can be
ignore?
Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Questions-about-showing-warning-error-message-dialog-tp5328727p5340588.html
Sent from the wix-users mailing list archive at Nabble.com.

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Questions about showing warning/error message dialog

2010-07-24 Thread Elfe Xu

Thanks Blair.
For #1, what do you mean even that can be bypassed?
So it's not possible for me to get the result of actions, then I can add a
custom action after that and execute according to the result?
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Questions-about-showing-warning-error-message-dialog-tp5328727p5334110.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] The DirProperty in RemoveFile table must be a property name in Directory table?

2010-07-24 Thread Elfe Xu

http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/file/n5334233/WixPlayground.zip
WixPlayground.zip 

I wrote a small prototype as attached.

Please compile it, run the msi to install it, go to the install location
folder, execute the CreateFolderAndFiles.cmd, the run uninstall.

In my machine, it shows 2727 error (DirProperty does not exists in Directory
table), and abort.
To unintall the product, I have to manually remove the RemoveFolderTest root
folder, then uninstall again.

Rob, would you please help to check if it can work on your machine?

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/The-DirProperty-in-RemoveFile-table-must-be-a-property-name-in-Directory-table-tp5317922p5334233.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] The DirProperty in RemoveFile table must be a property name in Directory table?

2010-07-23 Thread Elfe Xu

Thanks. After adding the version resource, add a EnsureTable Id=RemoveFile
/ element, the RemoveFoldersEx action executed successfully.

Action 14:10:30: RemoveFoldersEx. 
Action start 14:10:30: RemoveFoldersEx.
MSI (s) (A8:24) [14:10:30:747]: Invoking remote custom action. DLL:
C:\Windows\Installer\MSI8168.tmp, Entrypoint: RemoveFoldersEx
MSI (s) (A8!60) [14:10:30:747]: PROPERTY CHANGE: Adding
_dirCB80BB8E7C4DF6458FEC42C79CD3833C_0 property. Its value is 'C:\Program
Files\Foo\bar\abc\'.
MSI (s) (A8!60) [14:10:30:762]: PROPERTY CHANGE: Adding
_dirCB80BB8E7C4DF6458FEC42C79CD3833C_1 property. Its value is 'C:\Program
Files\Foo\bar\Logs\'.
MSI (s) (A8!60) [14:10:30:762]: PROPERTY CHANGE: Adding
_dirCB80BB8E7C4DF6458FEC42C79CD3833C_2 property. Its value is 'C:\Program
Files\Foo\bar\'.
Action ended 14:10:30: RemoveFoldersEx. Return value 1.

Then, the installer hit the same fatal 2727 error, as I have by using my own
c# CA:
 
DEBUG: Error 2727:  The directory entry
'_dirCB80BB8E7C4DF6458FEC42C79CD3833C_0' does not exist in the Directory
table
The installer has encountered an unexpected error installing this package.
This may indicate a problem with this package. The error code is 2727. The
arguments are: _dirCB80BB8E7C4DF6458FEC42C79CD3833C_0, , 
MSI (s) (A8:5C) [14:14:36:492]: Product: System Center Atlanta -- The
installer has encountered an unexpected error installing this package. This
may indicate a problem with this package. The error code is 2727. The
arguments are: _dirCB80BB8E7C4DF6458FEC42C79CD3833C_0, , 

Does this approach really work?



-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/The-DirProperty-in-RemoveFile-table-must-be-a-property-name-in-Directory-table-tp5317922p5328465.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] The DirProperty in RemoveFile table must be a property name in Directory table?

2010-07-23 Thread Elfe Xu

Interesting. What is the Windoes Installer version it required?
I'm using Win7, the installer version of the product is 4.0 (Package
InstallerVersion=400 Compressed=yes /), the Windows Installer version
on my machine is 5.0.7600.16385.

I've no idea why my code failed :(
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/The-DirProperty-in-RemoveFile-table-must-be-a-property-name-in-Directory-table-tp5317922p5328531.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] The DirProperty in RemoveFile table must be a property name in Directory table?

2010-07-23 Thread Elfe Xu

Thanks Blair. I've already have the version problem resolved by adding the
version resource. This time it's the 2727 fatal error again.

Because on my machine seems the if I add rows to RemoveFile with normal
property, the installer will fail because the DirProperty is not in
Directory table. However, Rob says he has use this approach successfully
before. So I wander if it's because the platform/WI version that cause the
different behavior.

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/The-DirProperty-in-RemoveFile-table-must-be-a-property-name-in-Directory-table-tp5317922p5328630.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Questions about showing warning/error message dialog

2010-07-23 Thread Elfe Xu
Hi,

Hope you are not get tired with my name, as I've posted sooo many questions.

1. When write registry value fails, an error message dialog will pop up, and 
show Retry/Cancel/Ignore. However, in our product, some registry keys are 
critical, and we don't want allow user to choose Ignore, and rollback if 
fail. How could I change it to show Retry/Cancel only?

2. For CustomActions that call some executables (type2, type34 etc), we can 
have the \...@return set to check/ignore etc. If choose check, the failure will 
cause abort; if choose ignore, the failure will only be logged, but user will 
not be aware of the failure. How could I make it to show a warning dialog? 
Surely I can write some wrapper to run the executable, and then use 
session.Message to show the error. But I wonder if there is an easier way, to 
assign the CustomAction return value to some property, and then show the 
warning/error?

Thanks,
-Elfe
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] The DirProperty in RemoveFile table must be a property name in Directory table?

2010-07-22 Thread Elfe Xu

The folder hierarchy is just a example. My application has nothing to do with
user accounts.

Thanks for the suggestion of using wix-contrib. At first I read the code and
thought it was easy for me to translate it to a C# version CA. 
Anyway, I add version.lib to the projects, and get wix-contrib build
successfuly. However, when I use it in my project, it seems does not work
(still due to the version issue).

In my code, I have
 xmlns:contri=http://wixtoolset.org/wixcontrib/2008;

And for the folders I want to delete completely, 
  Directory Id=dirA51B01A2E638149A2E0381A7B1B1FA0A Name=Foo
Component Id=cmpC736EC12CD6A4FF8C43A5AB7005B0C22
Guid={B6E6C8AF-EC5D-4A0C-B718-0B6823632C92} KeyPath=yes
  CreateFolder /
  contri:RemoveFolderEx On=uninstall /
/Component

The log is:
Action 11:29:04: RemoveFoldersEx. 
Action start 11:29:04: RemoveFoldersEx.
RemoveFoldersEx:  Error 0x80070715: Failed to get file version of custom
action dll
CustomAction RemoveFoldersEx returned actual error code 1603 but will be
translated to success due to continue marking
Action ended 11:29:04: RemoveFoldersEx. Return value 1.

Any idea about the failure?

Thanks,
-Elfe


-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/The-DirProperty-in-RemoveFile-table-must-be-a-property-name-in-Directory-table-tp5317922p5328217.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] It is that complex to remove sub folder and files?

2010-07-20 Thread Elfe Xu

I cannot build wixcontrib because of some link errors like error LNK2019:
unresolved external symbol _getfileversionin...@16 referenced in function
_filevers...@12, not sure if it is because I'm using a different version of
Wix like the wixcontrib project use.

By checking the RemoveFolderEx source code, I found I've missed one thing
about the RemoveFile table:
FileName
This column contains the localizable name of the file to be removed. If this
column is null, then the specified folder will be removed if it is empty.
All of the files that match the wildcard will be removed from the specified
directory.
So the RemoveFile table is actually used for remove files and folders as
well.

I will write my own RemoveFolder CA then.

Thanks for the help!

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/It-is-that-complex-to-remove-sub-folder-and-files-tp5315065p5315465.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] The DirProperty in RemoveFile table must be a property name in Directory table?

2010-07-20 Thread Elfe Xu
Hi,

I've wrote a RemoveWholeFolder custom action, to remove all files and sub 
folders.
Here is the code of addthe record to RemoveFile table.
private static void AddItemToRemoveFileTable(DirectoryInfo folder, 
string componentId, Session session, View view)
{
string fileRecordName = string.Format(CultureInfo.InvariantCulture, 
tempRemoveFileRecord_{0}, folderCount);
string folderRecordName = 
string.Format(CultureInfo.InvariantCulture, tempRemoveFolderRecord_{0}, 
folderCount);
string propertyName = string.Format(CultureInfo.InvariantCulture, 
tempRemoveFolderPropertyName_{0}, folderCount);
folderCount++;

session[propertyName] = folder.FullName;

using (Record record = session.Database.CreateRecord(5))
{
record.SetString(1, fileRecordName);
record.SetString(2, componentId);
// Remove all files under the folder TODO: verify if file 
without extension could be deleted as well
record.SetString(3, *.*);
record.SetString(4, propertyName);
// Install mode: remove on uninstall
record.SetInteger(5, 2);

view.InsertTemporary(record);
}

using (Record record = session.Database.CreateRecord(5))
{
record.SetString(1, folderRecordName);
record.SetString(2, componentId);
// remove the folder
record.SetString(3, null);
record.SetString(4, propertyName);
// Install mode: remove on uninstall
record.SetInteger(5, 2);

view.InsertTemporary(record);
}
}

private static int folderCount = 0;

The records are added into the RemoveFile table correctly. However, then the 
Windows Installer report a fatal error 2727

DEBUG: Error 2727:  The directory entry 'tempRemoveFolderPropertyName_0' does 
not exist in the Directory table
MSI (s) (E8:F4) [02:13:39:134]: Product: System Center Atlanta -- The installer 
has encountered an unexpected error installing this package. This may indicate 
a problem with this package. The error code is 2727. The arguments are: 
tempRemoveFolderPropertyName_0, ,

There is a property tempRemoveFolderPropertyName_0  but it's not in the 
Directory table.
Property(S): tempRemoveFolderPropertyName_0 = C:\Program Files\Microsoft 
Atlanta\GatewayData\abc
However, according to the document 
http://msdn.microsoft.com/en-us/library/aa371201(VS.85).aspx , the property is 
not required to be in Directory table.
DirProperty
Name of a property whose value is assumed to resolve to the full path to the 
folder of the file to be removed. The property can be the name of a directory 
in the Directory 
tablehttp://msdn.microsoft.com/en-us/library/aa368295(v=VS.85).aspx, a 
property set by the AppSearch 
tablehttp://msdn.microsoft.com/en-us/library/aa367579(v=VS.85).aspx, or any 
other property that represents a full path.

Any idea about why it would fail?

P.S. I checked the code in wix-contrib RemoveFolderEx, and find it's doing the 
same thing as I did.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] The DirProperty in RemoveFile table must be a property name in Directory table?

2010-07-20 Thread Elfe Xu

I've changed the property name to all up cases, but still failed :(
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/The-DirProperty-in-RemoveFile-table-must-be-a-property-name-in-Directory-table-tp5317922p5319532.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] It is that complex to remove sub folder and files?

2010-07-19 Thread Elfe Xu
Hi,

RemoveFolder can only remove empty folders, and RemoveFile can use wildchar, 
but it does not support wildchar for unknown name subfolders like **\*.* .

My installer create a CustomData folder, and each customer will have its own 
subfolder. They can create sub-subfolders and put files under their folder. So 
the folder hierarchy will be like below after the product runs for a few days:
My Product
--CustomData
Alice
---Photo
--1.jpg
--2.jpg
Bob
---Music
--3.mp3
--4.mp3

I read the article 
http://blogs.technet.com/b/alexshev/archive/2008/07/01/from-msi-to-wix-part-19-the-art-of-custom-action-part-1.aspx
 . However, I have some concern:

1)  For the rollback approach, how could I determine what temp folder path 
I should use? If the custom data size is huge, it will require lots of extra 
space for the temp folder which might cause failure, and will also make the 
performance bad.

2)  For the edit MSI table approach, we can put files into the RemoveFile 
table, but what about the sub folders? There is a CreateFolder table, but no 
RemoveFolder path.

Remove subfolder and files created by application seems a very generic 
scenario. I'm surprised if the Windows Installer does not provide an easy way 
to do this.

Thanks,
-Elfe
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to make Edit control readonly?

2010-07-16 Thread Elfe Xu

No, the static text control does not support selection.

Just found the correct control for me:  
http://msdn.microsoft.com/en-us/library/aa371540(VS.85).aspx ScrollableText 
. The only bother thing is I need to change the text into rtf format: 
http://blogs.msdn.com/b/robmen/archive/2006/05/30/610950.aspx
http://blogs.msdn.com/b/robmen/archive/2006/05/30/610950.aspx 
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-make-Edit-control-readonly-tp5300098p5300633.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to make Edit control readonly?

2010-07-16 Thread Elfe Xu

Too bad, the ScrollableText does not support dynamic text, so I cannot use it
to show text defined in properties.

http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Scrollabletext-control-td708321.html#a708321
 
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-make-Edit-control-readonly-tp5300098p5300774.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] bootstrapper for uninstallation?

2010-07-16 Thread Elfe Xu
Hi,

Now I come to the uninstall part.
When install my product, I have a bootstrapper, that install an external 
product first as the prerequisite, and then invoke my own MSI. When uninstall 
my product, I also need to uninstall the external product after uninstall my 
MSI.
The command I used to uninstall the external product is
msiexec.exe /q /i {THE-GUID-OF-EXTERNAL_PRODUCT} param1=blabla param2=blabla 
lotsofparams...
I don't want user to be aware of the external product. If the uninstall of 
external product fails, no need to rollback, show a warning or log the failure 
would be fine but it's not a hard requirement.

I cannot put the command as a CustomAction, even set the 
CustomAction/@Return=asyncNoWait, because my own msi might have not exit yet 
when the new one runs.
I'm thinking about have a script which will install my product first and then 
uninstall the external product (the bootstrapper for uninstallation), but since 
shortcut at start menu for uninstallation is not recommended, how could I let 
user remember to use the script to uninstall? Besides, how could I delete the 
script itself during uninstall?
I cannot change the UninstallString registry value of ARP, because it's 
determined and set by Windows Installer and not opened for customization.

Is the ARPSYSTEMCOMPONENT the only solution for this scenario? Or are there any 
other better approaches?

Thanks,
-Elfe



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] How to make Edit control readonly?

2010-07-15 Thread Elfe Xu
Could we have a read-only edit control, so user can select the text, but cannot 
modify it?

Thanks,
-Elfe
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] FileSharePermission - Change?

2010-07-14 Thread Elfe Xu

WOW!
GenericRead + Traverse really works for Read!
Why it has such an interesting behavior? Is it a bug or by design?
The GenericRead='yes' Traverse='yes' seems to give Read. 
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/FileSharePermission-Change-tp711870p5291311.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Property set in UI Sequence are not recognized in Execute Sequence?

2010-07-10 Thread Elfe Xu
Hi,

I have a dialog with checkboxes to allow user choose the features they want to 
install, and I have several custom actions to prepare data if user want to 
install some feature.
The INSTALL_AGENT public property allows user to choose features by command 
line, and the install_agent private property is bind to the checkbox.

In the code:
!-Pre set the install_agent property according to cmdline input--
SetProperty Id=install_agent Value=1 Before=AppSearch 
Sequence=both![CDATA[INSTALL_AGENT ~= YES]]/SetProperty
!-In the feature select dialog--
Control Id=CheckBoxAgent Type=CheckBox X=25 Y=103 Width=280 
Height=15 CheckBoxValue=1 Property=install_agent
 Text=!(loc.FeatureSelection_AgentTitle)
Control Id=Next Type=PushButton X=236 Y=243 Width=56 Height=17 
Default=yes Text=!(loc.WixUINext)
  Publish Event=Remove Value=ALL1/Publish
  Publish Event=AddLocal Value=FeatureAgentinstall_agent/Publish
/Control
!-In InstallExecuteSequence, the CustomeAction for preparing registry values, 
happens before writeRegistryValues--
Custom Action=CAPrepareAgentRegistryValues Sequence=4960![CDATA[(NOT 
Installed) AND install_agent]]/Custom
WriteRegistryValues Sequence=5000 /


I tought the custom action should be executed, if:

(1)user use INSTALL_AGENT=YES in cmdline.
Or (2) user check the CheckBoxAgent by UI.

However, I found actually it only works on first case. In second case, the 
action is skipped.

Here is the log by execute: msiexec /I setup.msi INSTALL_AGENT=NO


(1)MSI (c) (B8:70) [09:36:50:953]: Skipping action: Setinstall_agent 
(condition is false)

(2)Action 9:36:56: FeatureSelectionDlg. Dialog created

(3)MSI (c) (B8:CC) [09:36:58:628]: PROPERTY CHANGE: Adding install_agent 
property. Its value is '1'.

(4)MSI (s) (98:08) [09:37:11:623]: Skipping action: Setinstall_agent 
(condition is false)

(5)MSI (s) (98:08) [09:37:17:636]: Skipping action: 
CAPrepareAgentRegistryValues (condition is false)

Action (1) (2) (3) are in UI sequence, and (4) (5) are in execute sequence.
Action (5) is skipped, but shouldn't the condition be true since install_agent 
is 1 after action (3)?
Seems the action in UI has no effect to condition in execute sequence?

If I run msiexec /I setup.msi INSTALL_AGENT=YES, then it works fine.

I know that change the condition to
![CDATA[(NOT Installed) AND FeatureAgent = 3]]
would solve my problem, but I would like to understand why use install_agent 
here would fail.

The properties used in UI and Execute sequence are separated and do not 
influence the other? It is quite different from what I had expected.

Thanks,
-Elfe
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] How to shwo Error Dialog without Ignore button for WriteRegistryValues failure

2010-07-10 Thread Elfe Xu
Hi,

I found when WriteRegistryValues action failed, an error message box pops up, 
with Cancel/Retry/Ignore buttons.
In our product, some registry value are very important, and we don't want the 
installer report as success if the write failes.
How could I customize the error message box, to remove the Ignore button? 
(while still leverage the default implementation as much as possible, to avoid 
too much my own code.)

Thanks,
-Elfe
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Inherit permissions on a folder in WiX 3

2010-07-06 Thread Elfe Xu

Emmm... Just took a look at the WixUtilExtension code, and find it's really
complex and is hard for me to modify in short time.
I will write my own CustomAction instead.

More questions:
(1) where would you put this CA? After CreateFolder of course. It must has
the virtual account, so will after install service. Are there any other
dependences?
(2) should I leverage the PermissionEx's ability, to have it do what it can
do, and add the CA for those it cannot do; or should I just use CA to do all
the granting permission stuff? If the first case, what the execute sequence
should be?
(3) I'm assigning permissions to folder/reigstrykey created by the
installer. Seems to me there is no need of corresponding CAs for
uninstalling/rollback? Since the folder/key will be deleted anyway.

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Inherit-permissions-on-a-folder-in-WiX-3-tp707219p5260679.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Inherit permissions on a folder in WiX 3

2010-07-05 Thread Elfe Xu

Then how to make the permission not inheritable?
I have to use PermissionEx because I'm using virtual account of a service
which is added during installation, so the granting permission action has to
be executed after install service.

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Inherit-permissions-on-a-folder-in-WiX-3-tp707219p5254988.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to run Managed Custom Action (Wix 3.0) in dotNet 4.0 only machine?

2010-07-05 Thread Elfe Xu

Is there any risk if we use set useLegacyV2RuntimeActivationPolicy=true? Is
there any known compatibility issues we should avoid? Do our tester need to
spend extra attention on some certain items because of this?

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-run-Managed-Custom-Action-Wix-3-0-in-dotNet-4-0-only-machine-tp5235311p5255218.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Unable to add permission for virtual account

2010-07-02 Thread Elfe Xu
Hi,

My target machine is Win2k8 R2 or Win7, which supports virtual account.

In my setup code, I have a ServiceInstall and the account is set to virtual 
account NT Service\MyService
And I have a CreateFolder, which I want to grant permissions to the virtual 
account
The code is like:
  Component Id=cmpEE183C6477823F89D36AFD338130E837 
Guid={76799486-FB33-42F6-87EB-D644C400886A}
File Id=filCFE915781A5270051FB2412A7EA21D9E KeyPath=yes 
Source=$(var.BinDirRoot)\MyService.exe /
ServiceInstall Name=MyService
DisplayName=My Service
Start=auto
Type=ownProcess
ErrorControl=normal
Account=NT Service\MyService
/
ServiceControl Id=SCMyService Stop=uninstall Remove=uninstall 
Name=MyService /
  /Component
  Component Id=cmp79309F0996E4D40CAEC1389FB7D7E8F8 
Guid={0A016CE5-8629-4990-B91D-A80008818F4E} KeyPath=yes
CreateFolder
  Permission GenericAll=yes User=NT Service\MyService  /
/CreateFolder
  /Component

I got error NT Service\MyService is not a valid user or group.
I thought it was because the CreateFolder and grant permission happens before 
install service, so I change the InstallExecuteSequence, set
  InstallServices Sequence=3650 /
  CreateFolders Sequence=3700 /
Now from the log, the InstallServices do happen before CreateFolders. However, 
I still got the same error when grant permission.

If I don't set the permission, the installation will success, and the service 
is logon NT Service\MyService correctly.
I can successfully grant permission of NT Service\MyService to the folder 
manually.

Any idea of the failure?


Thanks,
-Elfe
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] How to uninstall the program if I made such mistake

2010-07-01 Thread Elfe Xu
Hi,

I'm working on some setup project.
I built my project, run the msi, and get the product installed.
I made some change on the code, rebuilt it again, run the msi, and got error 
another version is already installed, please use ARP ...
I went to the ARP in control panel, find my product, click Uninstall...
The, the terrible error message box comes out:
Windows Server 2008 is required. Blablabla...
This is the error message I defined and used in launchcondition, the bad thing 
is I've forgot to add  Installed OR in the condition expression!
Condition Message=!(loc.Error_Prereq_OSVersion)
  ![CDATA[(IGNORE_PRE_CHECK  0) OR (OS_SUPPORTE_UI AND VersionNT = 600 
AND WindowsBuild = 6001 AND MsiNTProductType =3)]]
/Condition
IGNORE_PRE_CHECK is a property I used temporally, to make the setup work in my 
dev machine (it's win7).
So I can install/uninstall it by
Msiexec /i (/x) setup.msi IGNORE_PRE_CHECK=1

But now, I don't have the original msi anymore and can only remove it from ARP. 
What should I do?

Thanks,
-Elfe


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to uninstall the program if I made such mistake

2010-07-01 Thread Elfe Xu

SUPER!
This works! Thanks!
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-uninstall-the-program-if-I-made-such-mistake-tp5242524p5244519.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] ServiceInstall and ServiceControl question

2010-07-01 Thread Elfe Xu

Hi Blair,
Would you please help me to understand why I need to make the CA as deferred
without impersonation?

Since I want the install to success no matter whether the service started
successfully or failed, I just run StartMyService CA after InstallFinalize.
Do you see any problem of doing so?

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/ServiceInstall-and-ServiceControl-question-tp3814416p5246178.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Quesionts about CustomAction with failure

2010-06-29 Thread Elfe Xu
Hi,

I wrote a custom action to validate user inputs:
[CustomAction]
public static ActionResult ValidateInputs(Session session)
{
//...
If(invalid)
{ session[invalid_input]=1;}
Return ActionResult.Success.
}
The in the Wix file I check for invalid_input property.

Although this works fine, I would like to know:

1)  Should I use ActionResult.Failure if the input is invalid? The 
ActionResult enum gives me the feeling that I should do this. But the problem 
is if it returns Failure, the installer will abort immediately. I didn't find a 
way to customize the behavior according to ActionResult.Failure.

2)  I saw a post 
http://www.lostechies.com/blogs/gabrielschenker/archive/2010/05/19/wix-and-custom-actions.aspx
 say the new property need to be all up-case, to make it as global variables. 
What is global variable? I only saw private/public/restricted public 
properties, and I feel I should use private property here, so user cannot set 
it via command. (I don't know how to add a restricted public property by 
session object.) Am I doing right?

Thanks,
-Elfe

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Weird behavior of Checkbox control and SetProperty

2010-06-26 Thread Elfe Xu

I found the reason.

MSI can only set the property to NULL (aka Not set) when a checkbox is
unselected. 


So remove the line Property Id=USE_PROXY Value=0 /  (which actually
make the checkbox checked), and everything works fine.

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Weird-behavior-of-Checkbox-control-and-SetProperty-tp5220430p5224689.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Is this the right way to use Fragment?

2010-06-26 Thread Elfe Xu
Hi,

I have some SetProperty code need to be executed after LaunchCondition, e.g.
SetProperty Id=use_proxy Value=1 After=LaunchConditions 
Sequence=ui![CDATA[PROXY_SERVER  ]]/SetProperty
To make the Product.wxs file clean, I added a new file Prepare.wxs, and move 
the SetProperty code into that file, under the Fragment element.

However, I found the SetProperty does not get executed when I put it in 
Prepare.wxs, but it works when in Product.wxs.

I checked the document, and found: The contents of a Fragment element can be 
linked into a product by utilizing one of the many *Ref elements.
So I add a CustomeAction Id=Foo ... to Prepare.wxs, and in the Product.wxs, 
use CustomActionRef Id=Foo

Everything works fine now, but I have little concern, because it seems strange 
to me that the final result is based on some cheating element.
Am I doing right, or there is some recommended way for this?

Thanks,
-Elfe
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Edit Control, trap textchanged possible?

2010-06-26 Thread Elfe Xu

Are there any workarounds?
Seems to me this is a very common scenario.

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Edit-Control-trap-textchanged-possible-tp2907541p5224744.html
Sent from the wix-users mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] No OpenFileDialog or something like that?

2010-06-24 Thread Elfe Xu
Hi,

During my product setup, I need to let user to specify the path of a 
certificate file on his local driver. I searched for something like the 
OpenFileDialog in Wix/WI for a while, but could not find things for this 
purpose. The DirectoryCombo and DirectoryList seems only for folders, but 
cannot be used for a specific type (e.g. .cert) of files.
Do I have to use CustomAction, to invoke the OpenFileDialog?

B.T.W. is there any place that I can find lots of Wix samples? The Wix document 
does not have samples, and search on the internet always costs lots of time 
with little result. Currently I'm mostly refer to the UIExtension in Wix 
source, but it's very limited.

Thanks,
-Elfe
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] No OpenFileDialog or something like that?

2010-06-24 Thread Elfe Xu

@Johannes
Thanks for the link to wixwiki. But these samples are too simple and do not
show the complex usage for me to refer :(

I tried to write a custom action to use OpenFileDialog class. However, the
CA gets exceptions Current thread must be set to single thread apartment
(STA) mode before OLE calls can be made. Ensure that your Main function has
STAThreadAttribute marked on it. This exception is only raised if a debugger
is attached to the process.

I found an old post
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Detecting-IA64-bit-architecture-td1381532.html#a1383764
here  say that I need to create a new thread to invoke the function. Since
it is a old post (2008) and Joson had suggest to submit a feature requrest
for this requirement, I would like to know if there is any easy way to
achieve this now.
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/No-OpenFileDialog-or-something-like-that-tp5216565p5219318.html
Sent from the wix-users mailing list archive at Nabble.com.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Weird behavior of Checkbox control and SetProperty

2010-06-24 Thread Elfe Xu
Hi,

Hope you are not getting tired with my name, since I've posted so many 
questions these days :P

This time is about a strange behavior when I use Checkbox and the SetProperty 
control.

On the UI, I have

[] Use proxy:
Address: __  Port:

([] is checkbox, and  is Edit)

In my dialog, I have

Control Id=CheckboxUseProxy Type=CheckBox X=25 Y=133 
Width=280 Height=15 CheckBoxValue=1 Property=USE_PROXY
 Text=!(loc.GatewaySettings_UseProxy) /
Control Id=LabelAddress Type=Text X=40 Y=154 Width=35 
Height=15 Transparent=yes NoPrefix=yes
 Text=!(loc.GatewaySettings_Address) /
Control Id=EditAddress Type=Edit X=80 Y=151 Width=165 
Height=18
 Property=PROXY_SERVER
  Condition Action=disable![CDATA[ USE_PROXY  1]]/Condition
  Condition Action=enable![CDATA[ USE_PROXY = 1]]/Condition
/Control
Control Id=LabelPort Type=Text X=255 Y=154 Width=25 
Height=15 Transparent=yes NoPrefix=yes
 Text=!(loc.GatewaySettings_Port) /
Control Id=EditPort Type=Edit X=280 Y=151 Width=30 
Height=18
 Property=PROXY_PORT
  Condition Action=disable![CDATA[ USE_PROXY  1]]/Condition
  Condition Action=enable![CDATA[ USE_PROXY = 1]]/Condition

And in the Produce.wxs, I have
Property Id=USE_PROXY Value=0 /
SetProperty Id=USE_PROXY Value=1 After=LaunchConditions 
Sequence=ui![CDATA[PROXY_SERVER = ]]/SetProperty

I add the SetProperty code, wish to let user only need to specify PROXY_SERVER 
and PROXY_PORT when launch the setup by msiexec, but no need to specify 
USE_PROXY.

But I found the behavior is not what I want.
When I run msiexec  with PROXY_SERVER=123.4.5.6
The checkbox is checked, the address is filled, but the address and port edit 
are DISABLED.
When I run msiexec without PROXY_SERVER value
The checkbox is STILL checked, the address is empty, and it is enabled.

Seems to me there is something make the checkbox to be checked when it is 
shown, and by default the two Edits are disabled.
So if SetProperty executed, then when dialog show, the value is not changed, 
and the Edits keeps disabled.
If SetProperty is not executed, then when dialog show, the value is changed 
to 1, and the Edits become enabled.

I've tried change the SetProperty's Sequence and Before/After, but still don't 
work.

Why the checkbox does not respect USE_PROXY value, and always been checked? I 
didn't find any attribute for the default value.

Thanks,
-Elfe


--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Questions about the Edit control

2010-06-23 Thread Elfe Xu
Hi,

Here is what I want:
In MySettingDlg, I have a Edit control allow user to input a sting, the Next 
button will only be enabled when the string is not empty.
I thought it should be easy, but I've searched the document for long and still 
didn't find solutions.

The code :
Control Id=EditServer Type=Edit X=40 Y=66 Width=280 Height=18 
Property=SERVER_NAME
Control Id=Next Type=PushButton X=236 Y=243 Width=56 Height=17 
Default=yes Text=!(loc.WixUINext)
  Condition Action=disable
![CDATA[SERVER_NAME=]]
  /Condition
  Condition Action=enable
![CDATA[NOT (SERVER_NAME=)]]
  /Condition
/Control

There are two problems:

1)  The enable/disable status of the Next pushbutton only get updated when 
the Edit control lost focus. I wish it could get updated when text changed.

2)  How to trim the string?  I want to have condition like 
trim(SERVER_NAME)=, but it just don't work.

Thanks,
-Elfe
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Undefined preprocessor variable error

2010-06-22 Thread Elfe Xu
In MyProj.WIX.Targets, I have
  PropertyGroup
DefineConstantsBinDirRoot=$(BranchBinDirRoot)/DefineConstants
  /PropertyGroup
And in Components.wxs, I have
File Id=fil1DE3D614CB174A2DA7F5012F10EAC14B KeyPath=yes 
Source=$(var.BinDirRoot)\abc.dll /
So far so good.

Then I want to add a file from the source,
File Id=filD8FD88128EAAAC90D4BE23E362C39F64 KeyPath=yes 
Source=$(var.SourceDirRoot)\setup\Relnotes.rtf /
Surely I will get error of Undefined preprocessor variable $(var.SourceDirRoot)

Then I modify the MyProj.WIX.Targets, add this line:
  PropertyGroup
DefineConstantsBinDirRoot=$(BranchBinDirRoot)/DefineConstants
DefineConstantsSourceDirRoot=$(BranchSourceDirRoot)/DefineConstants
  /PropertyGroup
Compile again, still has the error Undefined preprocessor variable 
$(var.SourceDirRoot)

I know that seems the VS has some cache and so I close the VS, re-open it, 
and complie again.
This time, I got the error of Undefined preprocessor variable $(var.BinDirRoot)

I've no idea what's wrong here. Obviously the BinDirRoot is defined and should 
work as before.
Any thoughts?

Thanks,
-Elfe
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Undefined preprocessor variable error

2010-06-22 Thread Elfe Xu

Interesting. Why is the DefineConstants different with other element suche as
Property?
I have a file MyProj.WIX.targets, which is used by Setupx64.wixproj and
Setupx86.wixproj. So I could not have my constants definitation partially in
the WIX.targets and partially in the wixproj files, according to whether
they are shared or not. Because one of them will get overwritten.
Althought currently I don't have such a scenario, but this limitation seems
unfriendly to me:(
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Undefined-preprocessor-variable-error-tp5209950p5211321.html
Sent from the wix-users mailing list archive at Nabble.com.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] using a variable for Component Win64 attribute value still generating generic warning not uniquely suppressible in wixproj | build | suppress specific warnings field

2010-06-17 Thread Elfe Xu

Hi Bob,

I have the same problem and found this very old post.

Would you please give me more detail on how to 
have the compiler supply the default value for the Win64 attribute when
the InstallerPlatform .wixproj property is x64 or ia64/intel64  ?

Thanks!
-Elfe



-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/using-a-variable-for-Component-Win64-attribute-value-still-generating-generic-warning-not-uniquely-sd-tp1515820p5189865.html
Sent from the wix-users mailing list archive at Nabble.com.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] using a variable for Component Win64 attribute value still generating generic warning not uniquely suppressible in wixproj | build | suppress specific warnings field

2010-06-17 Thread Elfe Xu

Yeah, set the INSTALLPLATFORM property works.

I had thought the build platform set by configuration means the
INSTALLPLATFORM. It's interesting that if I didn't set this property, the
sys.BUILDARCH is still correct (as I'm using Debug | x64), but the win64 is
no. 

Is there any reason that:
(1) the build platform need to be different with the INSTALLPLATFORM?
(2) there are cases that the BUILDARCH is x64 but the win64 need to be false
(by default) for package, components, ca, registrykey...

Thanks,
-Elfe
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/using-a-variable-for-Component-Win64-attribute-value-still-generating-generic-warning-not-uniquely-sd-tp1515820p5193501.html
Sent from the wix-users mailing list archive at Nabble.com.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Question about register .net COM object

2010-06-12 Thread Elfe Xu
Hi,

I'm trying a CA
CustomAction Id=RegT  ExeCommand=blablabla\RegAsm.exe T.dll 
Execute=immediate /
and found it can only success if I make the CA run after InstallFinalized. 
Otherwise, it will fail.

I think the right way is to use Class element, but I just cannot make the 
result the same as I execute regasm.exe.
Here is my trying:
  Component Id =TestComponent 
Guid=D75C79A1-83C9-467D-89FB-4B7E081401CE Win64=$(var.USEWIN64) 
File  Id=TestCOM Assembly=.net Name=Test.dll DiskId=1 
Source=..\..\TestCOM.dll KeyPath=yes
  Class Id=CE13T9EC-3BE1-4292-89C4-243ERF42967B
 Description=test com
 ThreadingModel=both
 Context=InprocServer32
ProgId Id=MyTestCOM /
  /Class
/File
  /Component
I just cannot find way to set lots of other stuffs, like
Implemented Categories with value {62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}
The Assembly, Class, RuntimeVersion under InprocServer32.
I want to set the ForeignServer with mscoree.dll, but wix says it cannot be 
used under File.

I guess I might doing totally wrong. Anyone can give me a sample of how to do 
the register?

Another question is: when I want to add the .net assembly into wix project 
reference, why I get the error of Test.dll could not be added. Please make 
sure that the file is accessible, and that it is a valid WiX reference. 
Because of this failure, I can only add the file by the relevant path. Not sure 
if it is a cause of the register failure.

Thanks,
-Elfe
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How to integrate into TFS if the wix project has managed CA written with DTF?

2010-06-12 Thread Elfe Xu

Thanks Blair.
I checked the wix.ca.targets. Seems when using this in our TFS build
environment, I need to do a little change of the path values, because the
wix on build machine is not installed, but by copying files into the public
folder.

@Rob: yes, the articles in wix document are very clear and helps me to
integrate wix project into tfs. What it doesn't have, is for C# CA projects.
I guess it's better for the DTF document to add this.
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-integrate-into-TFS-if-the-wix-project-has-managed-CA-written-with-DTF-tp5170887p5173308.html
Sent from the wix-users mailing list archive at Nabble.com.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Question about register .net COM object

2010-06-12 Thread Elfe Xu

Yeah, the heat.exe works fine! thanks!
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Question-about-register-net-COM-object-tp5172220p5173310.html
Sent from the wix-users mailing list archive at Nabble.com.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Custom Action call get InvalidHandleException when use session.GetProductProperty

2010-06-11 Thread Elfe Xu
Hi,

I'm using the C# custome action template in VS to create my first custom 
action, but it failed.

Here is my code:
In Product.wxs
Binary Id=CustomActions.dll  
SourceFile=$(var.CustomActions.TargetDir)$(var.CustomActions.TargetName).CA.dll
 /
CustomAction Id=CustomAction1 BinaryKey=CustomActions.dll  
DllEntry=CustomAction1 Execute=immediate /

InstallExecuteSequence
  Custom Action='CustomAction1' After='InstallFinalize'NOT 
Installed/Custom
/InstallExecuteSequence

In CustomActions project, CustomAction.cs,
namespace CustomActions
{
public class CustomActions
{
[CustomAction]
public static ActionResult CustomAction1(Session session)
{
session.Log(Begin CustomAction1);
session.Log(session.GetProductProperty(AGENT_SERVER));
return ActionResult.Success;
}
}
}

And here is the log:

Action ended 3:50:57: InstallFinalize. Return value 1.
Action 3:50:57: CustomAction1.
Action start 3:50:57: CustomAction1.
SFXCA: Extracting custom action to temporary directory: 
C:\Users\elfexu\AppData\Local\Temp\MSICE39.tmp-\
SFXCA: Binding to CLR version v2.0.50727
Calling custom action CustomActions!CustomActions.CustomActions.CustomAction1
Begin CustomAction1
Exception thrown by custom action:
System.Reflection.TargetInvocationException: Exception has been thrown by the 
target of an invocation. --- 
Microsoft.Deployment.WindowsInstaller.InvalidHandleException: The handle is 
invalid.
   at Microsoft.Deployment.WindowsInstaller.Session.GetProductProperty(String 
property)
   at CustomActions.CustomActions.CustomAction1(Session session)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object 
arguments, SignatureStruct sig, MethodAttributes methodAttributes, 
RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object 
arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle 
typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags 
invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean 
skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags 
invokeAttr, Binder binder, Object parameters, CultureInfo culture)
   at 
Microsoft.Deployment.WindowsInstaller.CustomActionProxy.InvokeCustomAction(Int32
 sessionHandle, String entryPoint, IntPtr remotingDelegatePtr)
CustomAction CustomAction1 returned actual error code 1603 (note this may not 
be 100% accurate if translation happened inside sandbox)
Action ended 3:51:55: CustomAction1. Return value 3.
Action ended 3:51:55: INSTALL. Return value 3.


Any idea about the failure?

Thanks,
-Elfe
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Custom Action call get InvalidHandleException when use session.GetProductProperty

2010-06-11 Thread Elfe Xu

What a silly question I've posted -_-! I only thought about the .net
framework version issue (because previously I got a problem with .net4), but
forgot to check the document.

Thanks Blair!
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Custom-Action-call-get-InvalidHandleException-when-use-session-GetProductProperty-tp5169564p5170849.html
Sent from the wix-users mailing list archive at Nabble.com.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] How to integrate into TFS if the wix project has managed CA written with DTF?

2010-06-11 Thread Elfe Xu
Hi all,

I've learnt that to make a wix project work with TFS, I need to edit the 
.wixproj file, and also the TFSBuild project by adding ConfigurationToBuild to 
Mixed Platforms.
I also learnt that if I have a C# library project, and I want to use it as 
custom action library, I need to run MakeSfxCA to package the binary. Now my 
question is: how to put them together? What should I do to integrate my wix 
project into TFS, if it has CustomAction that refer to a C# library project?

I tried to write a CA project with the C# CA template in VS, and find it does 
the package automatically. I checked for the wix and cs project files, but find 
nothing. Seems it has some magic inside.

Anyone can provide some instructions for me to follow?

Thanks!
-Elfe
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Which one to use? WIX3 or WIX3.5beta?

2010-06-09 Thread Elfe Xu
Hi,

Our team is about to use WIX to create installer for our product, and we need 
to decide which version of wix to choose. Although the wix s...@codeplex 
recommend to download wix3.0, I also saw this from 
tfsbuild.comhttp://tfsbuild.com/(X(1)S(ujhgrq45mqeedjqdcfaqtt55))/Default.aspx?Page=WiX%20MSI%20Setup%20PackageAspxAutoDetectCookieSupport=1:
Where do I get WiX from?
I suggest downloading one of the recent weekly releases from here: 
http://wix.sourceforge.net/releases/

This is because the 'official' releases 
herehttp://wix.sourceforge.net/downloadv3.html are quite stale and you miss 
out on important bugfixes.

I prefer WIX3.5 because our team is using VSTS2010 and only 3.5 can make the 
votive work on 2010. If the 3.5beta is stable enough or even more stable than 
3.0, then surely we will choose 3.5beta.

Which one would you suggest me to choose, based on your previous experience?

Thanks,
-Elfe

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users