Execute! II

Happy New Year!

When last we spoke, I’d given you some code that doesn’t work quite right:

Const pi = 3.1416
WScript.Echo Main()
Function Main()
 Const r = 2.5
 Dim result
 Dim str
 str = “result=pi*(r*r)”
 ExecuteGlobal str
 Main = result
End Function

Did you see why? ExecuteGlobal is executing the contents of variable str in the global scope. However, …

Read More

Write Scripts – Win Prizes! Including a pass to TechEd 2007!

ScriptingAnswers.com and SAPIEN Technologies announce the ScriptingAnswers.com Automation Challenge 2007! This is your chance to submit your Windows administrative scripts – in any Windows-based scripting language – and win some great prizes.

All your script needs to do is accomplish some Windows administrative task. Our contest page at www.ScriptingAnswers.com/contest.asp includes some tips for writing the best script possible (one sure …

Read More

More fun with scheduled PowerShell

Earlier, I gave you a VBScript wrapper that you could use to run PowerShell scripts as scheduled tasks and be completely hidden from the user. If you want to run a PowerShell cmdlet expression instead of a .ps1 script, you need to take a slightly different approach.

Read More

Execute!

Jeff Hicks and I have been having some fun with the VBScript Execute() method, as Jeff’s been writing about it for VBScript and WSH Core: TFM? this week. Here’s some sample code:

Const pi = 3.1416
Const r = 2.5
WScript.Echo Main()
Function Main()
 Dim result
 Dim str
 str = “result=pi*(r*r)”
 Execute str
 Main = result
End Function

Do you …

Read More

Blog Followups and Comments

We truly appreciate all the comments and feedback you’ve been giving us on our blog entries. We’ve tried to respond to comments in a timely manner. You are still welcome to leave comments. However, if you have a question that requires an answer or a problem trying something we’ve blogged about, we’re hoping you’ll post something in the forums at ScriptingAnswers.com.

Read More

Schedule Hidden PowerShell Tasks

I’ve had some questions lately about scheduling a PowerShell script. This is something we’ve covered a little bit. In this entry I discuss how to wrap your PowerShell script in a VBScript and schedule it so that it runs completely hidden.

Read More

Order up!

A recurring question I’ve seen over the years in a number of VBScript forums is how to present a menu dialog in a script. Other than InputBox, MsgBox or the WshShell’s Popup Method, there aren’t too many GUI alternatives. And none of them (at least at first glance) looks like it could be used to present a menu. Now, if you want to got all out with fancy formatting and buttons, then you should look to creating an HTA or use an instance of Internet Explorer. But if your needs are simple, I can show you how to accomplish this with a simple InputBox.

Read More

Start Simple

Here’s another quick suggestion, especially for VBScript, that will make script development and debugging a little easier and a lot less stressful. It may seem like common sense, but sometimes we all just need a reminder: Start Simple.

Read More

Convert VBScript to PowerShell!

Here’s an AWESOME resource: http://www.microsoft.com/technet/scriptcenter/topics/winpsh/convert/default.mspx, the Scripting Guys’ complete guide to VBScript functions… or, more specifically, how to do each VBScript function in Windows PowerShell! It’s available online, or you can download the whole thing as a Word document. For each VBScript function or statement, you’ll see a Windows PowerShell version along with a brief explanation. Not that there’s …

Read More

UPDATED: Happy Holidays – Here’s Our Free Scripting Gift To You!

Happy Holidays from SAPIEN Technologies! In celebration of the season, we’d like to offer you a special gift: A free sampler pack of Snippets to add into PrimalScript (or use independently, if you prefer – they’re just text files)! This 47-Snippet sampler pack includes snippets for VBScript, Windows PowerShell, KiXtart, and even HTAs, and normally retails for $50.00. But if …

Read More

Search

Enter any query and press enter
Advanced search operators:
+ ⟶ Term must appear
- ⟶ Term must not appear
"" ⟶ Exact string must appear
How do I use these?

Join our mailing list

Enter your email address to subscribe to our mailing lists for Monthly Blog Digests, Product Announcements and more (you can choose which you receive once you sign-up!)

Tags

Categories

Archives

Dashboard