diff --git a/src/plugins/projectexplorer/customwizard/customwizard.cpp b/src/plugins/projectexplorer/customwizard/customwizard.cpp
index 7ab2a611be17fb6ecb8a1ea5704ab47414cc25fe..7f4c5107b6169044a4e6b7d573f83837eba988a4 100644
--- a/src/plugins/projectexplorer/customwizard/customwizard.cpp
+++ b/src/plugins/projectexplorer/customwizard/customwizard.cpp
@@ -189,7 +189,7 @@ Core::GeneratedFiles CustomWizard::generateFiles(const QWizard *dialog, QString
     QTC_ASSERT(cwp, return Core::GeneratedFiles())
 
     CustomWizardContextPtr ctx = context();
-    ctx->targetPath = cwp->path();
+    ctx->path = ctx->targetPath = cwp->path();
     ctx->replacements = replacementMap(dialog);
     if (CustomWizardPrivate::verbose) {
         QString logText;
@@ -493,19 +493,14 @@ Core::GeneratedFiles CustomProjectWizard::generateFiles(const QWizard *w, QStrin
     QTC_ASSERT(dialog, return Core::GeneratedFiles())
     // Add project name as macro. Path is here under project directory
     CustomWizardContextPtr ctx = context();
-    ctx->targetPath = dialog->path() + QLatin1Char('/') + dialog->projectName();
+    ctx->path = dialog->path();
+    ctx->targetPath = ctx->path + QLatin1Char('/') + dialog->projectName();
     FieldReplacementMap fieldReplacementMap = replacementMap(dialog);
     fieldReplacementMap.insert(QLatin1String("ProjectName"), dialog->projectName());
     ctx->replacements = fieldReplacementMap;
     if (CustomWizardPrivate::verbose)
         qDebug() << "CustomProjectWizard::generateFiles" << dialog << ctx->targetPath << ctx->replacements;
     const Core::GeneratedFiles generatedFiles = generateWizardFiles(errorMessage);
-    // Find the project file and store in context
-    foreach(const Core::GeneratedFile &f, generatedFiles)
-        if (f.attributes() & Core::GeneratedFile::OpenProjectAttribute) {
-            ctx->projectFilePath = f.path();
-            break;
-        }
     return generatedFiles;
 }
 
diff --git a/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp b/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
index f3d8fe9591f80a79a28a57721a11a2e6aa6bbf53..6efcd8d6ec2f21780d9c788727f646054e692bbb 100644
--- a/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
+++ b/src/plugins/projectexplorer/customwizard/customwizardparameters.cpp
@@ -791,8 +791,8 @@ void CustomWizardContext::reset()
     baseReplacements.insert(QLatin1String("CppHeaderSuffix"),
                             mdb->preferredSuffixByType(QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)));
     replacements.clear();
+    path.clear();
     targetPath.clear();
-    projectFilePath.clear();
 }
 
 QString CustomWizardContext::processFile(const FieldReplacementMap &fm, QString in)
diff --git a/src/plugins/projectexplorer/customwizard/customwizardparameters.h b/src/plugins/projectexplorer/customwizard/customwizardparameters.h
index 5c757e2b835f31ff458620057677c6d008507c4d..59ee8599cccd0d5bb762cca94ea2b76885978e3b 100644
--- a/src/plugins/projectexplorer/customwizard/customwizardparameters.h
+++ b/src/plugins/projectexplorer/customwizard/customwizardparameters.h
@@ -143,10 +143,11 @@ struct CustomWizardContext {
 
     FieldReplacementMap baseReplacements;
     FieldReplacementMap replacements;
-    // Where files should be created, that is, choosen path for simple wizards
-    // or "path/project" for project wizards.
+
+    QString path;
+    // Where files should be created, that is, 'path' for simple wizards
+    // or "path + project" for project wizards.
     QString targetPath;
-    QString projectFilePath;
 };
 
 extern const char customWizardFileOpenEditorAttributeC[];
diff --git a/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.h b/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.h
index 6010a97e1b01a40d7653202a34ba56564f60e850..a3feb6b0b5d95307fcde1f2f6b71e42a86e13592 100644
--- a/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.h
+++ b/src/plugins/projectexplorer/customwizard/customwizardscriptgenerator.h
@@ -48,11 +48,11 @@ struct GeneratorScriptArgument;
  * attribute of the <files> element) which actually creates files.
  * The command line of the script must follow the convention
  *
- * script [--dry-run] [Field1=Value1 [Field2=Value2] [Field3:Filename3]]]...
+ * script [--dry-run] [options]
+ *
+ * Options containing field placeholders are configured in the XML files
+ * and will be passed with them replaced by their values.
  *
- * Multiline texts will be passed on as temporary files using the colon
- * separator.
- * The parameters are the field values from the UI.
  * As Qt Creator needs to know the file names before actually creates them to
  * do overwrite checking etc., this is  2-step process:
  * 1) Determine file names and attributes: The script is called with the