Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfigureSmbUninstall fails when Description is longer than 72 chars #5331

Closed
phillHgl opened this issue Jun 24, 2016 · 2 comments
Closed

ConfigureSmbUninstall fails when Description is longer than 72 chars #5331

phillHgl opened this issue Jun 24, 2016 · 2 comments

Comments

@phillHgl
Copy link

phillHgl commented Jun 24, 2016

If this issue is a bug:

  • Which version of WiX are you building with?
    v3.10.3.3007

  • Which version of Visual Studio are you building with (if any)?
    VS2015 Enterprise Update 2, but the actual build is an MSBuild InstallTools='14.0' .proj script.

  • Which version of .NET are you building with?
    mba targets NetFx 4.5.2, but configed to support on NetFx4.5 or later
    Dev PC Win10 x64 with NetFx4.5.2 SDK and NetFx 4.6.1
    Production Build Server is Win 8.1 Ent. x64 with NetFx 4.5.2 and 4.6.1 SDKs and VS2015

    (.NET version)

  • If the problem occurs when installing your packages built with WiX, what is the version of Windows the package is running on?
    Issue has been observed on Win 10 x64 and Win 7 x86, when default language settings are all for fr-FN or es-ES. Not observed when default language settings are: EN, DE, IT, JP, ChineseSimplified, or KO.

  • Describe the problem and the steps to reproduce it.
    The root issue seems to be that zwDescription in SCA_SMB struct in scasmb.h is defined using MAX_DARWIN_KEY rather than MAX_DARWIN_COLUMN (as is a similar struct (SCA_WEB) in scaweb.h), per Bob's suggestion in wix-users forum on 6/22/2016. Jacob also suggested that there should be some compile time warning of the string length.

The following snippets are from the wix-users thread:..............................................
The log indicates:
Début de l'action 14:52:00 : ConfigureSmbUninstall.
ConfigureSmbUninstall: Error 0x8007007a: Failed to copy description string to smb object
ConfigureSmbUninstall: Error 0x8007007a: failed to read FileShare table CustomAction ConfigureSmbUninstall returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

So it is tripping on this code in ScaSmbRead() of scasmbsched.cpp:

     hr = WcaGetRecordFormattedString(hRec, ssqDescription, &pwzData);
     ExitOnFailure1(hr, "Failed to get Share Description for FileShare: '%ls'", pss->wzShareName);
     hr = ::StringCchCopyW(pss->wzDescription, countof(pss->wzDescription), pwzData);
     ExitOnFailure(hr, "Failed to copy description string to smb object");

My wxl is authored as:

   <Component Id="shareMyFolder" Directory="MYFOLDER">
     <RegistryValue Root="HKMU" Key="!(wix.PropertiesRegKey)" Name="shareMyFolder_Ver" Value="[ProductVersion]" Type="string" KeyPath="yes" />
     <util:FileShare Id="shareMyFolder" Name="MyFolder" Description="!(loc.MyFolder_Description)">
       <util:FileSharePermission GenericAll="yes" User="Everyone" />
     </util:FileShare>
   </Component>

When I look at the FR MSI with orca the entries are the same for each MSI, except that the Description is a French string.

"Le dossier du système MyFolder est utilisé par les systèmes Company et les clients."
............................................................................... end wix-users snippet

Initially our FR string was about 80 chars long. When I shortened only the FR and ES strings, rebuilt on the DEV pc, the problem still happened on a clean test system. Efforts to build a debug build of wix v3.10 and then build the project to those binaries and attach a debugger were not successful, so I shortened the string for all languages and built a production build, which then tested successfully for both FR and ES.

  • Describe the behavior you expected and how it differed from the actual behavior.
    Expect setup to run on FR and ES creating the network share without failing on ConfigureSmbUninstall (during a clean install).
  • Describe the scenario and benefits that the feature supports.
    It was suggested that it would be an enhancement to allow a longer description string. It looks to me like the similar structures and the related Table are authored to support a 255 char Description but I think the SCA_SMB simply has a cut and paste error.
  • Describe how you're accomplishing the feature today (if possible).
    It seems to be necessary to shorten all of the instances of this string ID in each wxl file. The boss often says I am too verbose, so succinct is good.
@barnson barnson added this to the v3.11 milestone Jul 5, 2016
@barnson
Copy link
Member

barnson commented Jul 16, 2016

d7ab6854dbf7a8d35b9d37b11ef6fa1b50f1d2d6

@barnson barnson modified the milestones: v4.0, v3.11 Jul 16, 2016
@rseanhall
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants