.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Help writting a VBScript using notepad

Posted By:      Posted Date: September 25, 2010    Points: 0   Category :Windows Application
I need to know how to create a vbscript using notepad ++ that will do the following: Prompt the user for a folder name & a file name

        If the folder does not exist, create the folder & the file.  Let the user know that the folder & the file have been created. 

View Complete Post

More Related Resource Links

Help converting vbscript to vb.net


Can anyone help me convert the below vbscript to vb.net:


On Error Resume Next

Dim sRunTime,sSitupCount,sPushupCount,sRunMin,sRunSec,sRunScore,sCompScore,sBodyComp
Dim iCompositeScore

Set oRE = New RegExp

sRunTime = InputBox("Enter your run time")
oRE.Pattern = "[0-5][0-9]:[0-5][0-9]"

If oRE.Test(sRunTime) = True Then
 WScript.Echo "Pattern Match"
 MsgBox "You must enter a valid run time in the following format: ""mm:ss""." & vbCr & "Please run the application again."
End If

sRunMin = Left(sRunTime,InStr(sRunTime,":")-1)
sRunSec = Right(sRunTime,InStr(sRunTime,":")-1)

sBodyComp = InputBox("Enter your waiste measurement")
oRE.Pattern = "[2-6][0-9].[0,5]"

If Len(sBodyComp) = 2 Then
 sBodyComp = sBodyComp + ".0"
End If

If oRE.Test(sBodyComp) = True Then
 WScript.Echo "Pattern Match"
 MsgBox "You must enter a waiste measurement in the following format: ""nn.n""." & vbCr & "Please run the application again."
End If

sSitupCount = InputBox

Scripting SQL: VBScript Interfaces in SQL Server 2000 Let You Transform Data and Provide Reports to


Application service providers often must send information to clients automatically rather than on-demand. For example, a manufacturer may want to know each day how many of their products were sold by a retail chain. While SQL Server is ideal for maintaining this type of database, you have to write scripts to get the data out in a client-friendly format. Here you will see how you can use Data Transformation Services (DTS), a powerful tool in SQL Server, to automate the retrieval and formatting of data from SQL Server 2000 and make the process of pushing data to your users a lot easier.

Alok Mehta and Daniel Williams

MSDN Magazine August 2002

Building a Custom Data Grid: Performing Ad Hoc Web Reporting with a VBScript 5.0 Class Object


A flexible, customizable grid for displaying data is a useful tool for ASP developers. It allows Web visitors to customize their view of your data. This article takes the data grid presented in "Ad Hoc Web Reporting with ADO 2.0" by John Papa and Charles Caison (MIND, December 1998) and adds handy features such as a finds feature that supports multiple finds and a mode for adding and editing records. This version also improves response time by allowing asynchronous record download and it componentizes the code so it can be used as a standalone VBScript class object that can be reused in other pages.

Randall Kindig

MSDN Magazine July 2000

Need to execute a VBScript from my C# web application

Hi All, I need to execute a VB script file from asp.net web application. The input parameter for the VB script file shud be from my webpage. Please guide me on this to proceed further. If needed i can post you the VB script code. Advance thanks for all on this...

convert client vbscript code to server side

Hi There, we have some .htm pages with client side vbscript,the code is pasted below, we want to get this page run on the server side so that we can access this from a URL, can you please advice how convert this code to be able to run on the server side. Client side code: <HTML><HEAD><TITLE>Select Module</TITLE> <SCRIPT LANGUAGE="VBScript" ><!--     Option Explicit        Dim College    Dim Modules    Dim ModulesArr    Dim counter    Dim MyModules         Set College = Top.App.ActiveCollege    Set Modules = College.Modules     'Sorts the ModulesArr Array by module name.    Sub SortModules(StartPosition, EndPosition)        Dim I, J        Dim CurrName, CurrIndex        For I = StartPosition to EndPosition            J = I            CurrIndex = ModulesArr(J, 0)            CurrName = ModulesArr(J, 1)             'while Mod

Create Partition in AMO - Vbscript


hi all

im having a script that creata a partition in SSIS:

Public Sub Main()

            Dim part_name As String
            Dim dsoPartition As Microsoft.AnalysisServices.Partition
            Dim dsoPartition_exist As Microsoft.AnalysisServices.Partition
            Dim dsoServer As Microsoft.AnalysisServices.Server
            Dim m_dsoCube As Microsoft.AnalysisServices.Cube
            Dim mg As MeasureGroup
            Dim Query_string As String
            Dim shana As String

            'Dim attributeYear As String = " [Calendar_Year].[The Year].&["

            dsoServer = New Microsoft.AnalysisServices.Server()

Log4Net with WCF Service is not writting the Log file.


Hai All,

    I have WCF Service which is hosted in IIS 7.5 and I am using Log4Net for logging errors that are raised in the WCF Service. I have all the setting configured properly in my application as per the Log4Net samples configuration. My application is working when I am using VS 2010 application server. But when I host the same Service in Windows 7 IIS 7.5 the log is being created with out any exception but there is no data in the log file.

One more thing is I have kept the Debugger in the ErrorLogger file of the Log4Net and seen all the values there, every thing is fine and I can see all the values are properly going till the last moment but in the log file nothing is present. I am unable to understand why the service is not able to write the file in the specified path which is mentioned in the web.config file.

The Log4Net settings in the Presentation Layer is as follows.

        <!--    Log4Net Appender for logging to Log file    -->
        <appender name="RollingFile" type="log4net.Appender.FileAppender">
            <file value="D:\_log\EdgeLog.log" />

VBScript ADO Connection In Windows Server 2008



Hoping someone can help me with this one...apologies if I am in the wrong forum.

I have a small VBScript snippet that I can run on my desktop (Win XP 32bit) without any issue.

I'm now ready to put this code on our Win 2008 R2 server that runs scheduled jobs.

Here is a small piece of the code I am trying to get to work:


strConOracle = "DSN=test;Uid=test;Pwd=test;"

Set oConOracle = CreateObject("ADODB.Connection")
oConOracle.ConnectionString = strConOracle

msgbox (oConOracle.connectionstring)


msgbox "State:" & oConOracle.state


msgbox "State:" & oConOracle.state

Set oConOracle = Nothing


I've used the odbcad32.exe under C:\Windows\SysWOW64 to create my data source which connects to an Oracle DB.

I've tested an Oracle connection from both the odbcad32.exe and from sqlplus. Both connections are successful.


However, when I use the odbcad32.exe under C:\Windows\System32, I only see 1 driver "Sql Server". I don't see any other ODBC, OLE DB, Oracle drivers.

I've tried changing my connection string to a DNS-Less string, but I always get one of the 2 errors below:


Error: "

Problem with VBScript in the form.


I got a sample form with VBScript to make my project, but I can't run the sample. Can anyone help? It came with an .asp file, I couldn't run it on the server, so I changed it name to .aspx and it worked. But, I get a few warnings and then an error when I execute. It came with 2 .dlls and I referenced them.

This is the code:



<script type="text/javascript">

var hexTemplate1;

var hexTemplate2;

var hexTemplate1Valid=0;

var hexTemplate2Valid=0;


var Template1Mask;

var Template2Mask;

function BeginRegistration()


var regCtl = document.getElementById("DPBioControl");

regCtl.AttachSensorEvent(this, "controlEventHandler", "JScript");



var verCtl= document.getElementById("DPVerControl");




if((hexTemplate1Valid!=true) || (hexTemplate2Valid!=true))








function HideControl(id)



how to convert file with .tvr extension to notepad then read the file



            My text file consist of following data.In the below file i have to read dates( for example 9/13/2010 and corresponding Time 1300-2100) and empname Abbott,Luis insert into databse. similraly remaining dates.I have to ignore first 15 lines





-------------------- ----------- ----------- ----------- ----------- ----------- ----------- ----------- -------------
 Monday Tuesday Wednesday Thursday Friday Saturday Sunday 
 9/13/2010 9/14/2010 

how to get Notepad all Item in sql server database table field



I have one asp.net application using Sql server as back end.. in sql server database i have one table which consist two fields.. ItemName and Rate

I have one notepad file which consist around 700 ItemName with Rate.. 

So how to get this ItemName and Rate in my Table...

run system.dioganistic.process to open notepad not work on production server


Hi I have try to open notepad from local machine test code thats work fine, but when I try the code in production server my code not open the note pad.

this is the code I am using


I have change .netframework >> config >> machine.config file <processModel to username="System" and password"Autogenerate"

even though this is not working then i create a individual application pool for this application , and set identity tab Predefine value to "Network service" value to "local service" and then "local system" non of these not run the process from vb.net code.

how do I solve this. I have seen one article says need to change IIS  logon tab to allow interact with desktop, but i cannot find this feature in IIS.

anybody to help me please......


Excel new document template opens in Notepad


I have a document library with a custom document template. The template is an .XLTX file that I created using Excel 2010. It is associated to the library via a custom content type.

The template worked without any problems for at least a couple of weeks. Then, about a week ago, SharePoint started issuing the following warning when trying to create a new document using the template:

"The document could not be created. The required application may not be installed properly, or the template for this document library cannot be opened. Please try the following:

  1. Check the General Settings for this document library for the name of the template, and install the application necessary for opening the template. If the application was set to install on first use, run the application and then try creating a new document again.

  2. If you have permission to modifyu this document library, go to General Settings for the library and configure a new template."

This issue happens for myself, and some of my colleagues but not everyone. It happens on both SharePoint 2007, and 2010. We all have MS Office 2010 (32-bit) installed on our client machines. I have already tried changing the file extension application association for .XLS, .XLSX, .XLTX and .XLT to make extra sure that they are all pointing to Excel 2010. It didn't

jQuery and ASP VBSCRIPT codes


 Hi, I am wondering how is it possible to add html codes into an asp vbscript page. Because currently I just copy and paste the codes into the asp page, and the jQUery(html codes) do not work. And I also want to incorporate a Grid view into the pop up box that I am developing with the jQuery codes. Any codes are needed to merge these two together? And also the Grid View reads data from a database. Thanks alot for any help.

Microsoft VBScript runtime (0x800A01AD)



When I tried to log in to the page in localhost, it pop out error as below: 

Microsoft VBScript runtime (0x800A01AD)

ActiveX component can't create object: 'Ag.CLGAgentMapping'


How to solve it?






Rendering Issues when embedding Notepad inside a WPF Window


My end goal is not to embed Notepad inside of a WPF window. I am using Notepad to demonstrate this issue because I am having the same problems with Notepad that I do when I attempt to embed a Labview Virtual Instrument into a WPF window.

The primary problem I am having is that there are rendering problems with the embedded Notepad window whenever I move or maximize the window. I am looking for advice on how I can make it so that the embedded window will not have these rendering issues.

My second problem is that I would like the embedded window to take up the full size of the form whenever the form is resized. If this is not possible, I'll just prevent resizing of the WPF window.

You can download my VS2010 C# 4.0 WPF solution from here: http://rapidshare.com/files/426808705/Win32Fun.zip

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend