WIX

2012-01-16 20 views
6

का उपयोग कर वर्चुअल निर्देशिका के तहत फ़ोल्डर में कनवर्ट करें, WIX का उपयोग करते हुए मैं वर्चुअल निर्देशिका के तहत किसी निर्देशिका में निर्देशिका को कैसे परिवर्तित कर सकता हूं?WIX

WIX आईआईएस में निम्न वर्चुअल निर्देशिका स्थापित करता है, और मैं इसे webservice फ़ोल्डर को किसी एप्लिकेशन में कनवर्ट करना चाहता हूं।

उत्तर

8

मैं WIX या आईआईएस विस्तार के माध्यम से ऐसा करने के लिए एक रास्ता नहीं मिल सकता है, तो मैं एक बाहरी कमांड बुला का सहारा लिया। भविष्य में संदर्भ के लिए, आदेशों हैं:

IIS 5

C:\Inetpub\AdminScripts\mkwebdir.vbs -c Localhost -w "Default Web Site" -v "sentry/webservice","{physical path}" 
C:\Inetpub\AdminScripts\adsutil.vbs appcreateinproc w3svc/1/root/sentry/webservice 

IIS 6

C:\Windows\System32\iisvdir.vbs /create "Default Web Site/Sentry/webservice" webservice "{physical path}" 

IIS 7

C:\Windows\System32\inetsrv\appcmd add app /site.name:"Default Web Site" /path:/Sentry/webservice /physicalPath:"{physical path}" 
+0

क्या आप इस जानकारी का स्रोत पोस्ट कर सकते हैं? विशेष रूप से आईआईएस 6 के लिए। धन्यवाद ! –

1

आप अपने प्रोजेक्ट के लिए WiX IISExtension के लिए एक संदर्भ जोड़ सकते हैं और इस का उपयोग कर बना सकते हैं।

इस का एक अच्छा उदाहरण यहां पाया जा सकता है: Using WiX to create an IIS virtual directory

+0

तरह से मौजूदा संतरी आभासी है कि के लिए, उर्फ ​​में पूरे रास्ते डाल करने के लिए कहते हैं निर्देशिका बनाई गई है, और मौजूदा वर्चुअल निर्देशिका के तहत कोई एप्लिकेशन बनाने के लिए काम नहीं करता है (iis की 'वेबसाइट' प्रॉपर्टी नोट करें: WebVirtualDir) – staterium

2

थी डैनियल मॉरिट के सुझाव के अनुसार, IISExtension के साथ किया जा सकता है। चूंकि इस के लिए नमूना कोड ढूंढना बहुत मुश्किल है, मैंने सोचा कि मैं पोस्ट करूंगा कि मैंने यह कैसे किया।

<!-- Your example uses the default web site. --> 
<iis:WebSite Id="DefaultWebSite" Description="Default Web Site" SiteId="*"> 
    <iis:WebAddress Id="DefaultWebAddress" Port="80"/> 
</iis:WebSite> 

<!-- Web Dir Properties to enable access to a Web Application. --> 
<iis:WebDirProperties Id="AnonymousExecuteAndScript" 
         Read="yes" 
         Write="no" 
         Execute="yes" 
         Script="yes" 
         AnonymousAccess="yes" 
         Index="no" 
         LogVisits="no"/> 

<!-- Assumes the presence of this directory reference. --> 
<DirectoryRef Id="SentryWebServiceDir"> 
    <Component Id="SentryWebServiceComponent" Guid="{GUID-GOES-HERE}"> 

    <iis:WebVirtualDir Id="SentryWebService" 
         DirProperties="AnonymousExecuteAndScript" 
         Alias="Sentry/webservice" 
         Directory="SentryWebServiceDir" 
         WebSite="DefaultWebSite"> 

     <!-- Make this virtual directory a web application --> 
     <iis:WebApplication Id="SentryWebServiceApp" Name="webservice" WebAppPool="DefaultAppPool"/> 
    </iis:WebVirtualDir> 

    <!-- Workaround for the need for a KeyPath for this component. --> 
    <RegistryValue Root="HKLM" 
       Key="SOFTWARE\YourCompany\Sentry\WebService" 
       KeyPath="yes" 
       Value="1" 
       Type="binary" 
       Name="Installed" 
       Id="SentryWebServiceInstalled"/> 
    </Component> 
</DirectoryRef> 
के ऊपर एक <Fragment> तत्व में नेस्ट किया जा सकता है

सभी।

 संबंधित मुद्दे