Click here to Skip to main content
15,909,051 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Questionhow can i get a php mailer Pin
janebama18-Dec-08 1:55
janebama18-Dec-08 1:55 
AnswerRe: how can i get a php mailer Pin
Stuart Dootson19-Dec-08 0:28
professionalStuart Dootson19-Dec-08 0:28 
Questionwhats the advantage in using CComPtr over CComQIPtr? Pin
KASR118-Dec-08 0:33
KASR118-Dec-08 0:33 
AnswerRe: whats the advantage in using CComPtr over CComQIPtr? Pin
Stuart Dootson18-Dec-08 0:50
professionalStuart Dootson18-Dec-08 0:50 
QuestionInstalling WTL on VS2008 Pin
AghaKhan15-Dec-08 8:48
AghaKhan15-Dec-08 8:48 
AnswerRe: Installing WTL on VS2008 Pin
Jonathan Davies17-Dec-08 2:15
Jonathan Davies17-Dec-08 2:15 
GeneralRe: Installing WTL on VS2008 Pin
led mike17-Dec-08 5:42
led mike17-Dec-08 5:42 
GeneralRe: Installing WTL on VS2008 Pin
AghaKhan17-Dec-08 6:57
AghaKhan17-Dec-08 6:57 
I did not change anything in registry but changed js file.
// Windows Template Library - WTL version 8.0
// Copyright (C) Microsoft Corporation. All rights reserved.
//
// This file is a part of the Windows Template Library.
// The use and distribution terms for this software are covered by the
// Microsoft Permissive License (Ms-PL) which can be found in the file
// Ms-PL.txt at the root of this distribution.

// Setup program for the WTL App Wizard for VC++ 8.0 (Whidbey)

main();

function main()
{
// Decode command line arguments
var bDebug = false;
var bElevated = false;
var Args = WScript.Arguments;
for(var i = 0; i < Args.length; i++)
{
if(Args(i) == "/debug")
bDebug = true;
else if(Args(i) == "/elevated")
bElevated = true;
}

// See if UAC is enabled
var Shell = WScript.CreateObject("Shell.Application");
if(!bElevated && Shell.IsRestricted("System", "EnableLUA"))
{
// Check that the script is being run interactively.
if(!WScript.Interactive)
{
WScript.Echo("ERROR: Elevation required.");
return;
}

// Now relaunch the script, using the "RunAs" verb to elevate
var strParams = "\"" + WScript.ScriptFullName + "\"";
if (bDebug)
strParams += " /debug";
strParams += " /elevated";
Shell.ShellExecute(WScript.FullName, strParams, null, "RunAs");
return;
}

// Create shell object
var WSShell = WScript.CreateObject("WScript.Shell");
// Create file system object
var FileSys = WScript.CreateObject("Scripting.FileSystemObject");

// Get the folder containing the script file
var strValue = FileSys.GetParentFolderName(WScript.ScriptFullName);
if(strValue == null || strValue == "")
strValue = ".";

var strSourceFolder = FileSys.BuildPath(strValue, "Files");
if(bDebug)
WScript.Echo("Source: " + strSourceFolder);

if(!FileSys.FolderExists(strSourceFolder))
{
WScript.Echo("ERROR: Cannot find Wizard folder (should be: " + strSourceFolder + ")");
return;
}

try
{
//var strVC8Key = "HKLM\\Software\\Microsoft\\VisualStudio\\8.0\\Setup\\VC\\ProductDir";
var strVC8Key = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir";
strValue = WSShell.RegRead(strVC8Key);
}
catch(e)
{
try
{
var strVC8Key_x64 = "HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir";
strValue = WSShell.RegRead(strVC8Key_x64);
}
catch(e)
{
WScript.Echo("ERROR: Cannot find where Visual Studio 9.0 is installed.");
return;
}
}

var strDestFolder = FileSys.BuildPath(strValue, "vcprojects");
if(bDebug)
WScript.Echo("Destination: " + strDestFolder);
if(!FileSys.FolderExists(strDestFolder))
{
WScript.Echo("ERROR: Cannot find destination folder (should be: " + strDestFolder + ")");
return;
}

// Copy files
try
{
var strSrc = FileSys.BuildPath(strSourceFolder, "WTLAppWiz.ico");
var strDest = FileSys.BuildPath(strDestFolder, "WTLAppWiz.ico");
FileSys.CopyFile(strSrc, strDest);

strSrc = FileSys.BuildPath(strSourceFolder, "WTLAppWiz.vsdir");
strDest = FileSys.BuildPath(strDestFolder, "WTLAppWiz.vsdir");
FileSys.CopyFile(strSrc, strDest);
}
catch(e)
{
var strError = "no info";
if(e.description.length != 0)
strError = e.description;
WScript.Echo("ERROR: Cannot copy file (" + strError + ")");
return;
}

// Read and write WTLAppWiz.vsz, add engine version and replace path when found
try
{
var strSrc = FileSys.BuildPath(strSourceFolder, "WTLAppWiz.vsz");
var strDest = FileSys.BuildPath(strDestFolder, "WTLAppWiz.vsz");

var ForReading = 1;
var fileSrc = FileSys.OpenTextFile(strSrc, ForReading);
if(fileSrc == null)
{
WScript.Echo("ERROR: Cannot open source file " + strSrc);
return;
}

var ForWriting = 2;
var fileDest = FileSys.OpenTextFile(strDest, ForWriting, true);
if(fileDest == null)
{
WScript.Echo("ERROR: Cannot open destination file" + strDest);
return;
}

while(!fileSrc.AtEndOfStream)
{
var strLine = fileSrc.ReadLine();
if(strLine.indexOf("Wizard=VsWizard.VsWizardEngine") != -1)
strLine += ".8.0";
else if(strLine.indexOf("WIZARD_VERSION") != -1)
strLine = "Param=\"WIZARD_VERSION = 8.0\"";
else if(strLine.indexOf("ABSOLUTE_PATH") != -1)
strLine = "Param=\"ABSOLUTE_PATH = " + strSourceFolder + "\"";
fileDest.WriteLine(strLine);
}

fileSrc.Close();
fileDest.Close();
}
catch(e)
{
var strError = "no info";
if(e.description.length != 0)
strError = e.description;
WScript.Echo("ERROR: Cannot read and write WTLAppWiz.vsz (" + strError + ")");
return;
}

// Create WTL folder
var strDestWTLFolder = "";
try
{
strDestWTLFolder = FileSys.BuildPath(strDestFolder, "WTL");
if(!FileSys.FolderExists(strDestWTLFolder))
FileSys.CreateFolder(strDestWTLFolder);
if(bDebug)
WScript.Echo("WTL Folder: " + strDestWTLFolder);
}
catch(e)
{
var strError = "no info";
if(e.description.length != 0)
strError = e.description;
WScript.Echo("ERROR: Cannot create WTL folder (" + strError + ")");
return;
}

// Read and write additional WTLAppWiz.vsdir, add path to the wizard location
try
{
var strSrc = FileSys.BuildPath(strSourceFolder, "WTLAppWiz.vsdir");
var strDest = FileSys.BuildPath(strDestWTLFolder, "WTLAppWiz.vsdir");

var ForReading = 1;
var fileSrc = FileSys.OpenTextFile(strSrc, ForReading);
if(fileSrc == null)
{
WScript.Echo("ERROR: Cannot open source file " + strSrc);
return;
}

var ForWriting = 2;
var fileDest = FileSys.OpenTextFile(strDest, ForWriting, true);
if(fileDest == null)
{
WScript.Echo("ERROR: Cannot open destination file" + strDest);
return;
}

while(!fileSrc.AtEndOfStream)
{
var strLine = fileSrc.ReadLine();
if(strLine.indexOf("WTLAppWiz.vsz|") != -1)
strLine = "..\\" + strLine;
fileDest.WriteLine(strLine);
}

fileSrc.Close();
fileDest.Close();
}
catch(e)
{
var strError = "no info";
if(e.description.length != 0)
strError = e.description;
WScript.Echo("ERROR: Cannot read and write WTL\\WTLAppWiz.vsdir (" + strError + ")");
return;
}

WScript.Echo("App Wizard successfully installed!");
}

I only changed 2 places. At first it looks it is working and go through all the dialog Boxes where you can change options for your project, but at the end nothing is generated. No project no file. I am not sure what I am doing wrong. Thank you for your reply.
Best regards
Agha Khan
Sleepy | :zzz:
GeneralRe: Installing WTL on VS2008 Pin
AghaKhan17-Dec-08 7:06
AghaKhan17-Dec-08 7:06 
QuestionDefining struct in IDL file Pin
KASR114-Dec-08 21:50
KASR114-Dec-08 21:50 
AnswerRe: Defining struct in IDL file Pin
Stuart Dootson15-Dec-08 12:24
professionalStuart Dootson15-Dec-08 12:24 
AnswerRe: Defining struct in IDL file Pin
Jonathan Davies17-Dec-08 3:03
Jonathan Davies17-Dec-08 3:03 
QuestionCCommand and CAccessor binding question Pin
forcewill14-Dec-08 13:12
forcewill14-Dec-08 13:12 
QuestionVS 2008 and ATL Web Service / Server Pin
Hadi Rezaee12-Dec-08 5:53
Hadi Rezaee12-Dec-08 5:53 
AnswerRe: VS 2008 and ATL Web Service / Server Pin
Stuart Dootson12-Dec-08 8:40
professionalStuart Dootson12-Dec-08 8:40 
GeneralRe: VS 2008 and ATL Web Service / Server Pin
Hadi Rezaee13-Dec-08 0:16
Hadi Rezaee13-Dec-08 0:16 
GeneralRe: VS 2008 and ATL Web Service / Server Pin
Stuart Dootson13-Dec-08 1:07
professionalStuart Dootson13-Dec-08 1:07 
QuestionSet in Visual Studio 2005! Pin
SanjaySMK11-Dec-08 23:22
SanjaySMK11-Dec-08 23:22 
AnswerRe: Set in Visual Studio 2005! Pin
Stuart Dootson12-Dec-08 8:32
professionalStuart Dootson12-Dec-08 8:32 
QuestionWhy COM Pin
Varghese Paul M10-Dec-08 22:49
Varghese Paul M10-Dec-08 22:49 
AnswerRe: Why COM Pin
Stuart Dootson11-Dec-08 2:20
professionalStuart Dootson11-Dec-08 2:20 
QuestionRe: Why COM Pin
led mike11-Dec-08 5:03
led mike11-Dec-08 5:03 
QuestionPowerpoint Addin Using ATL (How do I deal with Events?) Pin
kalukaley10-Dec-08 8:14
kalukaley10-Dec-08 8:14 
QuestionHow to search elements in vector Pin
krishnakumartm10-Dec-08 0:12
krishnakumartm10-Dec-08 0:12 
AnswerRe: How to search elements in vector Pin
Michael Dunn10-Dec-08 9:22
sitebuilderMichael Dunn10-Dec-08 9:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.