inline Shell script code in Visual c++ - visual-studio-2010

I was wondering if it is possible to write inline (embedded) shell script code within a Visual c++ code..
or maybe call a shell script file from visual C++ code..
Thanks!

It's not a shell script but I suspect you could accomplish what you need with T4, all without leaving Visual Studio.
http://msdn.microsoft.com/en-us/library/bb126445.aspx

Related

Run F# script in Visual Studio

I've been looking into running some F# scripts to automate some things. But I can't seem to be able to find a way to run the scripts. I've to an F# file.
Test.fsx
let helloWolrd = "Hello World"
printfn $"{helloWolrd}"
I know I can run it by selecting and running it with Alt+Enter but this just seems unpractical. How can I run an entire F# file in Visual Studio? Not by selecting the part I want to run.
As you noted you can send individual snippets of F# files to F# Interactive by highlighting the lines you wish to send using Alt + Enter keyboard combination in Visual Studio. The same works with VS Code.
You can run entire scripts using dotnet fsi script.fsx from the command line. This works from Developer PowerShell within VS or other CLIs.

How to inspect variables in a FAKE script?

I have a bug in my FAKE script in obscure code were I interface with legacy build infrastructure. I have a bug there and I wanted to debug my script in Visual Studio. I used --break flag to attach Visual Studio 2013 debugger and I could set up a break point. But I cannot inspect any of variables of a FAKE script.
Is there a way to use Visual Studio 2013 debugger to inspect state of FAKE script? There seems to no problems with regular F# programs.
Have you tried using the REPL to invoke your build script a bit at a time?
An example of using VS Code + the ionide plugin to use the FSI interactive Repl
You should be able to highlight and run parts of your script in the REPL.

How To run vb.net with vbs scheduled task

I'm trying to run a windows scheduled task to open a .vb script, but when i run the task, it just opens the .vb script and does nothing else. Is there a .vbs script that will open my .vb script visual studio and run my sub?
I have a .vbs script that will open excel and run macros, just not sure how to do it with visual studio
The sub runs fine when i do it manually in visual studio
Thanks,
Andy
It does have something to do with VB.NET. Although it took me a day to see the real question.
How to run a VB.NET .vb file from vbs.
You have to compile it. Here's an article about how to do that.
appactivate between multiple internet explorer instances
Although the sample given doesn't work 7 and later because of a name conflict. Rename sendmail to something else for 7 and later.
If a limited user you need to manually add the registry entries to hkcu\software\classes. Do this by exporting as a reg file (regasm /reg) and search and replace HKEY_CLASSES_ROOT with HKEY_CURRENT_USER\Software\Classes and merge it with regedit or reg.
Also if you put in extra brackets around statements and subs vbscript code works in VB.NET mostly.
See this for how to run vbscript code in vb.net.
http://social.msdn.microsoft.com/Forums/en-US/adcae113-4758-481a-a367-60d5d14d97d6/this-is-how-to-turn-vbs-and-js-files-into-exe-files-from-the-command-line-without-third-party-tools?forum=scripting

are visual studio macros available in the Command Tool window?

Macros for Build Commands and Properties like $(SolutionDir) and $(ProjectDir) are available as Arguments for External Tools.
Are the same macros available to the Shell Command of the Command Tool Window?
Right now I can resort to using an environment variable, and if I forget to set it before Visual Studio starts, I can remotely inject it. Dynamically Add/Edit Environment Variables of Remote Process
Tools.Shell /c tfpt.exe review %SOLUTIONDIR%
Is there a syntax for the Command Tool Window that will allow me to access the Build Macros?!
Did this syntax somehow escape the design considerations of the Visual Studio team?
Tools.Shell /c tfpt.exe review $(SolutionDir)
Please send any syntax that is known to work, including version of Visual Studio.
If there's already a ticket open on Microsoft Connect for this, I'd accept that as an answer too.
Please no answers that suggest the many optional plugins for Visual Studio that host Powershell, Python or others.
We took a look at the code and it doesn't seem that those macros are available today. I'll file a feature request.

How to invoke built-in commands from Visual Studio macro?

From a Visual Studio macro, how do I (programmatically) invoke one of the built-in commands (say, File.OpenFile)?
Thanks.
Found out by recording a macro and then editing it, instead of creating it from scratch. For the benefit of others, the way to do it is (for example):
DTE.ExecuteCommand("File.OpenFile")

Resources