I'm struggling to create a wizard, so all help is SINCERELY appreciated! I started by copying an existing wizard (granted third party, but working) and then reading more to try to understand what is really required... I'm trying to develop wizards for use developing modules for DotNetNuke (DNN), an open source portal system. One of the Core Team members for DNN (VMasanas) published a good set of templates that nest under Visual Studio in folders like:
...\VB7\VBWizards
\DNNModule
\Scripts
\1033
\Templates
\1033
\DNNSQLProvider
\Scripts
\1033
\Templates
\1033
\DNNUserControl
\Scripts
\1033
\Templates
\1033
etc...
But these wizards share a LOT of their templates, so I'd like to centralize the storage of the templates. I would also like to store it all OUTSIDE of the Visual Studio VBWizards folder--with the DNN web solution that they are designed for... This would seem to better provide for upgrades, version co-existence, etc... I'm shooting for: ...
\VB7\VBWizards -- No Additional files
V:\INetPub\DNN31\DesktopModules
\_Templates -- "_" to force this to the top of the dir list & hide from DNN
\ModuleName -- Shared templates, code, forms, zips, etc...
\VSWizardCode
\__Projects
\DNNProjects.VSDIR
\__ProjectItems
\DNNProjectItems.VSDIR
\_DNNModule
\DNNModules.VSZ
\DNNModules.ico
\1033
\Default.js -- Code which pulls items as needed from shared ModuleName folder above
\_DNNSQLProvider
\DDNNSQLProvider.VSZ
\DNNSQLProvider.ico
\1033
\Default.js -- Code which pulls items as needed from shared ModuleName folder above
\_DNNUserControl
\DNNUserControl.VSZ
\DNNUserControl.ico
\1033
\Default.js -- Code which pulls items as needed from shared ModuleName folder above
etc...
Obviously I need to add the Registry keys to HKLM\SOFTWARE\Microsoft\VisualStudio\7.1\NewProjectTemplates\TemplateDirs. I've successfully done that, Add New Project shows my folder. I have a working .VSDIR file, the dialog shows my project icons correctly....and so it did find my .VSZ files in their directories and their icons...
But I keep getting: "Default.js or default.vbs not found in V:\Inetpub\DNN31\DesktopModules\_Templates\VSWizardCode\_DNNModule\1033" ! ! !
I am using the following .VSZ data:
VSWIZARD 6.0 Wizard=VsWizard.VsWizardEngine.7.1 Param="WIZARD_NAME = DNNModule" Param="WIZARD_UI = FALSE" Param="PROJECT_TYPE = VBPROJ" Param="SCRIPT_PATH = "V:\INetPub\DNN31\DesktopModules\_Templates\VSWizardCode\_DNNModule\" Param="TEMPLATES_PATH = "V:\INetPub\DNN31\DesktopModules\_Templates\ModuleName\" |
I AM NOT using dual languages, I'm running all English, so that's two MS kb articles I've eliminated...

Template Wizards -- Does SCRIPT_PATH really work???
Pat Kaeowichien
<Bump/>
Are there no Microsoft coders or MVPs in this forum
I know that everyone's eagerly awaiting the Visual Studio 2005 improvments (including those in template wizards)....but someone HAS to be familiar with the current VS 2003 code...
I don't mean to sound demanding, and I'm open to the possibility that I'm not tryingto use SCRIPT_PATH and TEMPLATES_PATH incorrectly... But I have been unable to find a real sample of using these--and am obviously frustrated enough to consider abandoning this project that I think would help the community...
Are there ANY of the VS team around this "official" Microsoft forum
JM_F
If I add "Param=NoLanguage" to the end of my VSZ file--I get nothing--NADA....no error message anymore, but no output either...
I would in fact EXPECT an error (as my Default.js file is in a \1033 folder)...
Can anyone PLEASE recommend a good sample of a VSZ with these path params specified--one that WORKS
claeys
Did anyone catch the extra set of quotes before the V:\... on the SCRIPT_PATH and TEMPLATES_PATH It should read:
VSWIZARD 6.0 Wizard=VsWizard.VsWizardEngine.7.1
Param="WIZARD_NAME = DNNModule"
Param="WIZARD_UI = FALSE"
Param="PROJECT_TYPE = VBPROJ"
Param="TEMPLATES_PATH = V:\INetPub\DNN31\DesktopModules\_Templates\ModuleName\"
Param="SCRIPT_PATH = V:\INetPub\DNN31\DesktopModules\_Templates\VSWizardCode\_DNNModule\"
Param="SCRIPT_COMMON_PATH = VBWizards\"
I had to add the SCRIPT_COMMON_PATH to get rid of the "Invalid procedure call or argument" error....obviously it was not finding Common.js...
But now I get an "Object expected" error... I'm using the following Default.js (reduced for testing):
function OnFinish(selProj, selObj)
{
var oldSuppressUIValue = true;
try
{
oldSuppressUIValue = dte.SuppressUI;
var bSilent = wizard.FindSymbol("SILENT_WIZARD");
dte.SuppressUI = bSilent;
var strCompanyName = "ABCXYZ";
AddBaseNameToWizard("COMPANY_NAME", strCompanyName, ".");
// Add CreationDate() call
CreationDate();
// Get the Project name from the wizard
var strProjectName = wizard.FindSymbol("PROJECT_NAME");
// Get the Project path from the wizard
var strProjectPath = wizard.FindSymbol("PROJECT_PATH");
// Get the Templates path from the wizard
var strTemplatePath = wizard.FindSymbol("TEMPLATES_PATH");
// Create the project (this call is in common.js)
var strTemplateFile = strTemplatePath + "\\DNNModule.vbproj";
var project = CreateVSProject(strCompanyName + "." + strProjectName, ".vbproj", strProjectPath, strTemplateFile);
if( project )
{
var folder;
var strItemName;
var item;
// Add icon
item = project.ProjectItems.AddFromFileCopy(strTemplatePath + "\\icon_CompanyName.ModuleName_32px.gif");
item.Name = "icon_" + strCompanyName + "." + strProjectName + "_32px.gif";
project.Properties("RootNamespace").Value = "";
project.Properties("AssemblyName").Value = strCompanyName + ".DNN.Modules." + strProjectName;
project.Properties("OptionStrict").Value = 1;
// Save the project
project.Save();
}
return 0;
}
catch(e)
{
switch(e.number)
{
case -2147221492 /* OLE_E_PROMPTSAVECANCELLED */ :
return -2147221492;
case -2147024816 /* FILE_ALREADY_EXISTS */ :
case -2147213313 /* VS_E_WIZARDBACKBUTTONPRESS */ :
return -2147213313;
default:
ReportError(e.description);
return -2147213313;
}
}
finally
{
dte.SuppressUI = oldSuppressUIValue;
}
}
function CreationDate()
{
var Months = new Array("January","February","March","April","May","June", "July","August","September","October","November","December");
var myDate = new Date();
var currentDate = myDate.getFullYear() + "/" + Months[myDate.getMonth()] + "/" + myDate.getDate();
wizard.AddSymbol("CREATION_DATE", currentDate);
return 0;
}
Anyone have any ideas for debuging this It appears to fail on the CreateVSProject call....I could be wrong... All suggestions sincerely appreciated!