Only create directory for a certain install (feature) level - directory

I am creating an msi with WiX. I only want to create certain directories if the install level is higher than 1. Here is my Directory structure:
<!--DIRECTORIES-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Product" />
<Directory Id="Documents" Name="Documents">
<Directory Id="Help" Name="Help" />
<Directory Id="Other" Name="Other" />
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="Shortcuts" Name="Product">
<Directory Id="DocumentShortcuts" Name="Documents">
<Directory Id="HelpShortcut" Name="Help"/>
<Directory Id="OtherShortcut" Name="Other"/>
</Directory>
</Directory>
</Directory>
</Directory>
I only want the "DocumentShortcuts" directory to be created on the start menu if the install level is above 1. Any suggestions would be greatly appreciated!

Directory elements only define directory structure not any instructions that they should be created. Windows Installer only creates directories when needed:
A file is being installed to a directory (Component and File elements)
The installer is explicitly told to create the directory (Component and CreateFolder elements)
A sub directory needs to be created for reasons 1 and/or 2.
The component elements that contain said resources then needs to be linked to Feature elements using the ComponentRef element ( or indirectly through ComponentGroup and ComponentGroupRef elements).

Related

Wix installer CopyFile move file not working

I want to move a file from one Directory to another and it simply does nothing.
Here is the part from my Product.wxs:
<Feature Id="ProductFeature" Title="$(var.ProductName)" Level="1">
<ComponentRef Id="testCopy"/>
</Feature>
<DirectoryRef Id="dirConfigs">
<Component Id="web.config" Guid="8736259D-4FEE-4826-B109-76DD3B0EDAE7">
<CopyFile Id="CopyWebConfig"
SourceProperty="dirProject"
SourceName="Web.config"
DestinationProperty="dirConfigs"
DestinationName="Web.config"
/>
</Component>
</DirectoryRef>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="dirParent" Name="$(var.CustomerName)">
<Directory Id="dirProject" Name="$(var.ProductName)">
<Directory Id="dirConfigs" Name="$(var.ConfigFolderName)">
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
Edit
I also tried with Source/DestinationDirectory instead of Source/DestinationProperty
Any ideas?
Thanks in advance!
I would rely on a deferred CustomAction invoking the command line "copy" command rather than using CopyFile and execute it, like in this SO question.
You'll need admin permissions if you are going to write the file in a protected folder or a folder requiring administrative access (on Windows Vista+, anything outside the %USER% folder.

editing httpd.conf on apache

I'm trying to make my apache visible on my local network for being able to acces my wordpress site hosted there, by editing httpd.conf file on /bin/apache/conf/ and im getting a Permision Error, but I can't find any clear content on the Internet.
Im using UWAMP 3.1.0 and It must be something related with this part of the code:
<VirtualHost *:80>
#UWAMP Generate Virtual Host
DocumentRoot "F:/UwAmp/www/"
ServerName "main-serveur"
Alias "/mysql/" "F:/UwAmp/phpapps/phpmyadmin/"
Alias "/mysql" "F:/UwAmp/phpapps/phpmyadmin/"
Alias "/uwamp/" "F:/UwAmp/phpapps/uwamp/"
Alias "/uwamp" "F:/UwAmp/phpapps/uwamp/"
<Directory "F:/UwAmp/phpapps/phpmyadmin/">
AllowOverride All
Options FollowSymLinks Includes Indexes
Require local
</Directory>
<Directory "F:/UwAmp/phpapps/uwamp/">
AllowOverride All
Options FollowSymLinks Includes Indexes
Require local
</Directory>
<Directory "F:/UwAmp/www/">
AllowOverride All
Options FollowSymLinks Indexes
Require local
</Directory>
more concretely at the end:
<Directory "F:/UwAmp/www/">
AllowOverride All
Options FollowSymLinks Indexes
Require local
</Directory>
This is what I get after entering the IP where the site is hosted.
sorry for asking something so simple but I'm learning
Thank you in advance
{ONLINE_MODE}
If UwAmp is on Online mode, your website is available for all.
{ONLINE_MODE} will be replaced by :
Order allow,deny
Allow from all
If UwAmp is on Offline mode, your website is available only for your computer.
{ONLINE_MODE} will be replaced by :
Order deny,allow
Allow from 127.0.0.1 localhost

Change default directory in wix

How do I change the default installation directory (such as D:/ or E:/) in a WiX installer where the components have auto generated guid?
I have found the solution. It works for me.
Add the following property inside the product tag
<Property Id="ROOTDRIVE"><![CDATA[D:\]]></Property>
Inside your directory tag add the 'ComponentGuidGenerationSeed' attribute and give a initial guid.
Sample of the directory structure
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="Folder1" Name="Folder1">
<Directory Id="INSTALLFOLDER" Name="Folder2" ComponentGuidGenerationSeed="PUT-YOUR-GUID"/>
</Directory>
</Directory>

Drupal vhost file not displaying website content

I have used virtualhost file in drupal to create multiple sites under one server. Also to remove /drupal from the url.
ex: 202.45.198.98/drupal this is how my URL looks like when ever I visit my website
After creating new Virtual host file for my website, I can see my website without /drupal in url.
Now the problem only the first page is loaded I mean some matter but not images, drupal template or any other links.
<VirtualHost *:80>
ServerAdmin webmaster#localhost
ServerName mysite
DocumentRoot /var/www/drupal
<Directory /var/www/drupal/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www/drupal/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin/">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
You should check the settings.php inside sites/default folder. You will see a line something like --
# $base_url = 'http://www.example.com'; // NO trailing slash!
Remove the hash at the start & update the URL with the current URL you have for the drupal instance. Most probably you will solve your problem if your connection setting is correct at the same settings.php file (DB name, server name, username & password).
If you find problem due to clean URL in logging in then you may have to put manual path for logging in as admin, which will be --
YOUR_BASE_URL/?q=user/login
If you want to disable clean URL then you can write a extra line in your settings.php --
$conf = array(
'clean_url' => 0,
);
Have nice drupling :)

Getting WordPress permalinks working on a MAMP install

I've got a local MAMP install of WordPress and am trying to get permalinks working. But when I click my links after setting permalink setting to 'Day and name' http://localhost/wordpress_1/2011/01/12/sample-post/
I get 404ed
Not Found: The requested URL
/wordpress_1/2011/01/05/hello-world/
was not found on this server.
Is this a mod_rewrite issue? mod_rewrite is listed in the 'loaded modules' section of my phpinfo. Do I need to do something else to enable it?
Thanks
UPDATE:
From my httpd.conf:
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
Changed my httpd.conf from
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
To
<Directory />
Options Indexes FollowSymLinks
AllowOverride All
</Directory>
And it works.
Follow symlinks needs to be turned on in MAMP.
Open your httpd.conf file in /Applications/MAMP/conf/apache/
Look for <Directory />
Make sure that you have the following Options set:
Options Indexes FollowSymLinks
You can also setup a local virtual host for better testing of your WordPress site. It's beyond the scope of this question/topic, but if you'd like I can create an example config file and instructions on how to do that.

Resources