none
VBscript to VB.net? RRS feed

  • Question

  • Hi, i have a VB script file to export registry key and i invoke it in vb.net button click as process.start("file location.vbs") but now i need to use the vb script directly inside the vb.net code instead of using a separate vb script file. How can i convert vbscript to vb.net? or use vb script inside vb.net? thanks in advance.
    Saturday, March 9, 2013 7:46 PM

Answers

  • Reference Windows Script Host Object Model and write the script using VB.NET syntax.  You can use objects with Option Strict Off, but the code will perform much better with early binding.
    • Proposed as answer by .paul. _ Saturday, March 9, 2013 11:31 PM
    • Marked as answer by Youen ZenModerator Thursday, March 14, 2013 9:58 AM
    Saturday, March 9, 2013 9:05 PM

All replies

  • Reference Windows Script Host Object Model and write the script using VB.NET syntax.  You can use objects with Option Strict Off, but the code will perform much better with early binding.
    • Proposed as answer by .paul. _ Saturday, March 9, 2013 11:31 PM
    • Marked as answer by Youen ZenModerator Thursday, March 14, 2013 9:58 AM
    Saturday, March 9, 2013 9:05 PM
  • Simply create a method, 

    Private Sub MyPreviouwScriptingPart
    'Paste in your script and see what you have to change, some changes are even done automatacally
    
    End Sub

    Call that method and see what happens. 



    Success
    Cor

    Sunday, March 10, 2013 10:32 AM