Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. Installing WTL on VS2008

Installing WTL on VS2008

Scheduled Pinned Locked Moved ATL / WTL / STL
c++javascript
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AghaKhan
    wrote on last edited by
    #1

    I am using Vista and VS2008. I have changed setup80.js and it gives the message App Wizard successfully installed! Now when I want to create a project it goes through all the dialog boxes but at the end no project is created. What I am missing.

    J 1 Reply Last reply
    0
    • A AghaKhan

      I am using Vista and VS2008. I have changed setup80.js and it gives the message App Wizard successfully installed! Now when I want to create a project it goes through all the dialog boxes but at the end no project is created. What I am missing.

      J Offline
      J Offline
      Jonathan Davies
      wrote on last edited by
      #2

      Yesterday I installed VS2008, downloaded WTL and added the WTL include directory to VS settings but had not run the .js file. So after seeing you mail I tried it only to have it say it couldn't find Visual Studio. You said you changed setup80.js; but not what you changed which would have helped. Anyway, a quick look in the registry showed that it 9.0 was needed, presumably this is what you meant. I did a search and replace in setup80.js for '8.0' and changed it to '9.0' in about four places. I saved the file as setup90.js and ran it with it completing successfuly. On starting a new VS2008 project I now get the option of a WTL project. Selecting this and the defaults on the wizard gave me a WTL project, files and all. I realise this doesn't tell you what you are doing wrong, but it does tell you what I did to get it to work.

      L A 3 Replies Last reply
      0
      • J Jonathan Davies

        Yesterday I installed VS2008, downloaded WTL and added the WTL include directory to VS settings but had not run the .js file. So after seeing you mail I tried it only to have it say it couldn't find Visual Studio. You said you changed setup80.js; but not what you changed which would have helped. Anyway, a quick look in the registry showed that it 9.0 was needed, presumably this is what you meant. I did a search and replace in setup80.js for '8.0' and changed it to '9.0' in about four places. I saved the file as setup90.js and ran it with it completing successfuly. On starting a new VS2008 project I now get the option of a WTL project. Selecting this and the defaults on the wizard gave me a WTL project, files and all. I realise this doesn't tell you what you are doing wrong, but it does tell you what I did to get it to work.

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Nice post. I have not yet used WTL in VS2008 so this information will be great when I do, thanks.

        led mike

        1 Reply Last reply
        0
        • J Jonathan Davies

          Yesterday I installed VS2008, downloaded WTL and added the WTL include directory to VS settings but had not run the .js file. So after seeing you mail I tried it only to have it say it couldn't find Visual Studio. You said you changed setup80.js; but not what you changed which would have helped. Anyway, a quick look in the registry showed that it 9.0 was needed, presumably this is what you meant. I did a search and replace in setup80.js for '8.0' and changed it to '9.0' in about four places. I saved the file as setup90.js and ran it with it completing successfuly. On starting a new VS2008 project I now get the option of a WTL project. Selecting this and the defaults on the wizard gave me a WTL project, files and all. I realise this doesn't tell you what you are doing wrong, but it does tell you what I did to get it to work.

          A Offline
          A Offline
          AghaKhan
          wrote on last edited by
          #4

          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;

          1 Reply Last reply
          0
          • J Jonathan Davies

            Yesterday I installed VS2008, downloaded WTL and added the WTL include directory to VS settings but had not run the .js file. So after seeing you mail I tried it only to have it say it couldn't find Visual Studio. You said you changed setup80.js; but not what you changed which would have helped. Anyway, a quick look in the registry showed that it 9.0 was needed, presumably this is what you meant. I did a search and replace in setup80.js for '8.0' and changed it to '9.0' in about four places. I saved the file as setup90.js and ran it with it completing successfuly. On starting a new VS2008 project I now get the option of a WTL project. Selecting this and the defaults on the wizard gave me a WTL project, files and all. I realise this doesn't tell you what you are doing wrong, but it does tell you what I did to get it to work.

            A Offline
            A Offline
            AghaKhan
            wrote on last edited by
            #5

            I I just realized I also have to change from strLine += ".8.0" to strLine += ".9.0"; It works. Thanks for reply. Best regards Agha Khan (UMIST) 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); } To while(!fileSrc.AtEndOfStream) { var strLine = fileSrc.ReadLine(); if(strLine.indexOf("Wizard=VsWizard.VsWizardEngine") != -1) strLine += ".9.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);

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups