2013-01-29 16 views
6

दिखाई नहीं दे रहा है मैं सीखने के उद्देश्यों के लिए वाईएक्स v3.7 (वीएस2012 में सेटअप और तैनाती परियोजनाओं को शामिल नहीं करता है) का उपयोग कर एक विंडोज़ एप्लिकेशन के लिए एक इंस्टॉलर प्रोजेक्ट बनाने की कोशिश कर रहा हूं। विक्स टूलसेट वीएस में प्रवेश किया गया है और मैं एक नया वाईएक्स एकल इंस्टॉलर सेटअप प्रोजेक्ट बना रहा हूं। इंस्टॉलर हमेशा सफलतापूर्वक संकलित किया जाता है (आइकन एक्सटेंशन में चेतावनियों को छोड़कर), यह सही होता है और डेस्कटॉप शॉर्टकट्स को स्थानांतरित करता है, लेकिन विंडोज 7 पेशेवर x64 सर्विस पैक 1 पर उचित स्टार्ट मेनू शॉर्टकट डालने में विफल रहता है। मैंने वेब की खोज की और लगभग कुछ भी मैंने कोशिश की, लेकिन अब तक कोई सफलता नहीं है। उत्पाद.wxs फ़ाइल निम्नानुसार है और "my_guid" तारों को परियोजना में उचित GUIDS द्वारा प्रतिस्थापित किया गया है। जाहिर है, मुझे एक बिंदु याद आ रहा है लेकिन वह कहाँ नहीं देख सकता है। रजिस्ट्री कुंजी भी नहीं बनाई गई है, इसलिए अंतिम खंड संभवतः किसी कारण से निष्पादित नहीं किया गया है। यह कैसे हल किया जा सकता है?Wix इंस्टॉलर प्रारंभ मेनू शॉर्टकट

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <Product Id="guid_here" Name="WixSingleSetupExample" Language="1055" 
      Version="1.0.0.0" Manufacturer="Can Yucel" UpgradeCode="guid_here"> 
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> 

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 
    <MediaTemplate /> 

    <Feature Id="ProductFeature" Title="WixSingleSetupExample" Level="1"> 
     <ComponentGroupRef Id="ProductComponents" /> 
     <ComponentRef Id="ProgramMenuDir"/> 
    </Feature> 
    </Product> 

    <Fragment> 
    <Directory Id="TARGETDIR" Name="SourceDir"> 

     <Directory Id="DesktopFolder" Name="Desktop" /> 

     <Directory Id="ProgramMenuFolder" Name="Programs"> 
     <Directory Id="ApplicationProgramsFolder" Name="WixSingleSetup"> 
      <Component Id="ProgramMenuDir" Guid="guid_here"> 
      <RemoveFolder Id="ProgramMenuDir" On="uninstall"/> 
      <RegistryValue Root="HKCU" Key="Software\[Manufacturer]\WixSetup" 
          Type="integer" Value="1" Name="installed" KeyPath="yes" /> 
      </Component> 
     </Directory> 
     </Directory> 


     <Directory Id="ProgramFilesFolder"> 
     <Directory Id="INSTALLFOLDER" Name="WixSingleSetupExample" /> 
     </Directory> 
    </Directory> 
    </Fragment> 

    <Fragment> 
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> 
     <!-- TODO: Remove the comments around this Component element and the 
      ComponentRef below in order to add resources to this installer. --> 
     <Component Id="ProductTextFile"> 
     <File Source="blankText.txt" KeyPath="yes"> 
      <Shortcut Id="desktopShortcut" Advertise="yes" Directory="DesktopFolder" 
        Name="WixSingleSetup Help" WorkingDirectory="INSTALLFOLDER" 
        Icon="icon1.txt" IconIndex="0"> 
      <Icon Id="icon1.txt" SourceFile="blankText.txt" /> 
      </Shortcut> 
      <Shortcut Id="startMenuShotcut" Directory="ApplicationProgramsFolder" 
        Name="WiXSingleSetup Help" WorkingDirectory="INSTALLFOLDER" 
        Icon="icon2.txt" IconIndex="0" Advertise="yes"> 
      <Icon Id="icon2.txt" SourceFile="blankText.txt"/> 
      </Shortcut> 
     </File>  
     </Component> 
    </ComponentGroup> 
    </Fragment> 
</Wix> 
+5

लॉग 'msiexec/i WixSingleSetupExample.msi/lvoicewarmupx log.txt' और देखो स्थापित नहीं हो रहा है। – BryanJ

+0

मैंने आपके जैसा पूछा था, लेकिन आउटपुट लॉग फ़ाइल 1545 लाइन लंबी है। स्टार्टअप पथ लॉग फ़ाइल में सही है लेकिन मुझे त्रुटियों का कोई संकेत नहीं दिख रहा था। कोई सुझाव जहां देखना है? या यदि आप चाहें तो मैं यहां फ़ाइल लिंक भेज सकता हूं। – mcy

+0

नीचे स्वीकृत उत्तर समस्या हल करता है। लेकिन आपकी टिप्पणी के साथ, मैंने लॉग इन करना सीखा है, इसलिए धन्यवाद। – mcy

उत्तर

16

मैं कोड के रूप में भविष्य में संदर्भ और प्रश्न का सटीक उत्तर के लिए अपेक्षित तरीके से काम है कि द्वारा जोड़ा जा रहा आप हफ्तों के लिए वर्णन करते हैं।

मुझे अतिरिक्त घटक जोड़ने (मेनू फ़ोल्डरों को हटाने के लिए) और लक्ष्य मशीन रजिस्ट्री पर हॉट-कुंजी बनाने के बिना स्टार्ट मेनू शॉर्टकट जोड़ने का एक और तरीका मिला।

यह परिभाषा <Component Id="ProductTextFile" ...> तत्व में ले जाकर किया जा सकता है। संशोधित काम कर स्क्रिप्ट इसके बाद: अगर लॉग फ़ाइल _log.txt_ क्यों घटक 'isn के लिए किसी भी संकेत देता है निम्न आदेश के साथ स्थापित करके

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <Product Id="{GUID HERE}" Name="WixSingleSetupExample" Language="1055" 
      Version="1.0.0.0" Manufacturer="Can Yucel" UpgradeCode="{GUID HERE}"> 
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> 

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 
    <MediaTemplate /> 

    <Icon Id="ICON1.ICO" SourceFile="icon1.ico" /> 
    <Icon Id="ICON2.ICO" SourceFile="icon2.ico" /> 

    <Feature Id="ProductFeature" Title="WixSingleSetupExample" Level="1"> 
     <ComponentRef Id="ProductTextFile" /> 
    </Feature> 
    </Product> 

    <Fragment> 
    <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="DesktopFolder" Name="Desktop" /> 

     <Directory Id="ProgramMenuFolder" Name="Programs"> 
     <Directory Id="ApplicationProgramsFolder" Name="WixSingleSetup" /> 
     </Directory> 

     <Directory Id="ProgramFilesFolder"> 
     <Directory Id="INSTALLFOLDER" Name="WixSingleSetupExample" /> 
     </Directory> 
    </Directory> 
    </Fragment> 

    <Fragment> 
     <Component Id="ProductTextFile" Directory="INSTALLFOLDER" Guid="{GUID HERE}"> 
     <File Source="blankText.txt" KeyPath="yes"> 
      <Shortcut Id="desktopShortcut" Advertise="yes" Directory="DesktopFolder" 
        Name="WixSingleSetup Help" WorkingDirectory="INSTALLFOLDER" 
        Icon="ICON1.ICO" IconIndex="0" /> 

      <Shortcut Id="startMenuShotcut" Directory="ApplicationProgramsFolder" 
        Name="WiXSingleSetup Help" WorkingDirectory="INSTALLFOLDER" 
        Icon="ICON2.ICO" IconIndex="0" Advertise="yes" /> 
     </File> 

     <RemoveFolder Id="ProgramMenuDir" Directory="ApplicationProgramsFolder" On="uninstall"/> 
     </Component> 
    </Fragment> 
</Wix> 
+1

+1 के लिए खोजें मैंने अधिक समय बिताया है कि मैं ऐसा करने की कोशिश करना स्वीकार करना चाहता हूं! धन्यवाद यह पूरी तरह से काम करता है। –

+0

@mcy तो आप किस मुद्दे को हल कर चुके थे? – nam

0

मैं हाल ही में Wix का उपयोग कर शुरू किया और किया है मैं इस समस्या के साथ अटक गया है:

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <Product Id="my_guid" Name="WixSingleSetupExample" Language="1055" Version="1.0.0.0" Manufacturer="Can Yucel" UpgradeCode="my_guid"> 
     <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> 

     <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 
     <MediaTemplate /> 

     <Feature Id="ProductFeature" Title="WixSingleSetupExample" Level="1"> 
      <ComponentGroupRef Id="ProductComponents" /> 
      <ComponentRef Id="ApplicationShortcut" /> 
     </Feature> 
    </Product> 

    <Fragment> 
     <Directory Id="TARGETDIR" Name="SourceDir"> 
      <Directory Id="DesktopFolder" Name="Desktop" /> 
      <Directory Id="ProgramMenuFolder"> 
       <Directory Id="ApplicationProgramsFolder" Name="WixSingleSetup"/> 
      </Directory> 
      <Directory Id="ProgramFilesFolder"> 
       <Directory Id="INSTALLFOLDER" Name="WixSingleSetupExample" /> 
      </Directory> 
     </Directory> 
    </Fragment> 

    <Fragment> 
     <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> 
      <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. --> 
      <Component Id="ProductTextFile"> 
       <File Source="blankText.txt" KeyPath="yes"> 
        <Shortcut Id="desktopShortcut" Advertise="yes" Directory="DesktopFolder" Name="WixSingleSetup Help" WorkingDirectory="INSTALLFOLDER" Icon="icon1.txt" IconIndex="0"> 
         <Icon Id="icon1.txt" SourceFile="blankText.txt"/> 
        </Shortcut> 
       </File>  
      </Component> 
     </ComponentGroup> 
    </Fragment> 

    <Fragment> 
    <DirectoryRef Id="ApplicationProgramsFolder"> 
     <Component Id="ApplicationShortcut" Guid="my_guid"> 
     <Shortcut Id="ApplicationStartMenuShortcut" 
        Name="WixSingleSetup Help" 
        Description="Setup Example" 
        Target="blankText.txt" 
        WorkingDirectory="INSTALLFOLDER" 
        Icon="icon2.txt" 
        IconIndex="0"> 
      <Icon Id="icon2.txt" SourceFile="blankText.txt"/> 
     </Shortcut> 
     <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/> 
     <RegistryValue Root="HKCU" Key="Software/Microsoft/WixSingleSetup" Name="installed" Type="integer" Value="1" KeyPath="yes" /> 
     </Component> 
    </DirectoryRef> 
    </Fragment> 
</Wix> 
संबंधित मुद्दे