Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / August 2007

Tip: Looking for answers? Try searching our database.

Setting VCDebugSettings.ApplicationCommand from JScript

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keith A. Lewis - 30 Jul 2007 17:43 GMT
I've created a Visual C++ Custom Wizard project for a custom Add\New
Project...

In the default.js file, I'm able to set compiler and linker flags, but don't
know how
to programmatically specify the application to be run when starting the
debugger.
I recorded a macro that launches the Property Pages dialog, selects the
Debugging
configuration property, then specifies an application for the Command entry,
but
the only thing that gets recorded is the launching of the Properties Pages.
The
application that I specify does not show up in the macro.

My guess is that I need to set the VCDebugSettings.ApplicationCommand
property to a string that specifies the application, but don't know the
magic JScript incantations. Does anyone here know how to do this?

Thanks,
Keith A. Lewis
Keith A. Lewis - 01 Aug 2007 21:09 GMT
> I've created a Visual C++ Custom Wizard project for a custom Add\New
> Project...
[quoted text clipped - 17 lines]
> Thanks,
> Keith A. Lewis

Figured it out. Below is the relevant portion of default.js. I set
the debug command to start Excel 2003 and give it some handy
arguments. It is possible to debug the script by inserting the
"debugger" keyword. The object browser does not indicate that
the DebugSettings property is available, but evidently it is.

function AddConfig(proj, strProjectName)
{
try
{
 var config = proj.Object.Configurations('Debug');
 config.IntermediateDirectory = 'Debug';
 config.OutputDirectory = 'Debug';
 config.CharacterSet = charSetMBCS;

 // get full path to Excel
 var shell = new ActiveXObject("WScript.Shell");
 var root =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Office\\11.0\\Excel\\InstallRoot\\Path";
 var excel = shell.RegRead(root);
 config.DebugSettings.Command = excel + '\\Excel.exe';
 config.DebugSettings.CommandArguments = '"$(TargetPath)" /p
"$(ProjectDir)"';
...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.