Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i run c:\mssql7\binn\osql.exe with parameters

Status
Not open for further replies.

alonak

Programmer
Mar 4, 2003
8
IL
How can i run this line in vbs , it's works fine from
the command line.
c:\mssql7\binn\osql.exe /U sa /P /i restore1.txt
Tanks .
 
Hi,

A short way to execute a commando using VBScript is the following:

'====================
Dim WshShell, strCMD

strCMD = "c:\winnt\Notepad.exe"

Set WshShell = Wscript.CreateObject("Wscript.Shell")

WshShell.Run(strCMD)
'====================


Hoping this post helps,

Grtz Hans If smile = vbFalse Then
MsgBox("Smile... Tomorrow will be worse!", ,"Smile...")
End If
 
Is it legal to "execute a commando"? ;-)
BDC.
 
Eeerrmm.... No comment [censored]

How about letting a commando run? ;-)

Grtz Hanz
If smile = vbFalse Then
MsgBox("Smile... Tomorrow will be worse!", ,"Smile...")
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top