Wix installer CopyFile move file not working - asp.net

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.

Related

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

how to move Symfony project to an other folder?

I have started a project on Symfony2 and now I would like to change the place where I installed it in my files.
here where it is now:
Application/MAMP/htdocs/symfony/
What is I move the symfony file to
user/myWebSiteProject/...
by the way my composer is in:
user/myWebsitePorject/bin/composer/composer.phar
---------------------------------------------/path/composer.json
Can I do it just like it... move it just like any folder. or should I take into account some things...?
You can move the whole folder without any major issues. What you will need to do is to change any VirtualHosts you may have setup, You will need to update the DocumentRoot property.
You would normally find the file to update on a mac at: /etc/apache2/extra/httpd-vhosts.conf depending on how your system is configured.
I'm presuming that your using Apache, Your VirtualHost should look something like this:
<VirtualHost *:80>
ServerName local.symfony
DocumentRoot "/user/myWebSiteProject/web"
<Directory "/user/myWebSiteProject/web">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog "/private/var/log/apache2/local.symfony-error_log"
CustomLog "/private/var/log/apache2/local.symfony-access_log" common
</VirtualHost>
This guide should help with the configuration.

Only create directory for a certain install (feature) level

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).

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>

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