Converting from VBScript to VB.NET

Posted on 2007-10-02
Last Modified: 2009-06-09
Does anyone know if there is an application that will convert VBScript to VB.NET or if there is a conversion chart that will show you what namespaces/methods/properties will map over from VBScrtop to VB.NET or vice-versa. I've been programming in VB.NET for around 7 months and have done very little programming in VBScript. I have to convert a bunch of VBScript files someone else has left me to VB.NET. Most of the conversion are around using WScript.Shell, .Network, Scripting.FileSystemObject, winmgmts, Local printer/networ printer stuff, Computers, arrays, etc.

Any help would be appreciated!
Question by:wally_davis
    LVL 12

    Expert Comment

    I think VS2005 has the ability to convert those scripts
    LVL 41

    Accepted Solution

    Sorry, that's probably not a good idea...

    The object model used by scripting is just too crude and is based upon COM standards.  Practically nothing in VB.Net is COM based, so a direct conversion would produce ugly non-managed code.  A conversion from Script to VB.Net that "upgraded" the COM parts to managed parts would be quite a utility, but I rather doubt that exists.
    LVL 12

    Expert Comment

    There are some converters, look at this one for example : (not free though)

    You can take a look at this article as well :
    Hope you'll find a solution to your problem.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now