Hi,
I call a vbscript file from my batch file. I need to pass a variable from this vbscript file to batch file. can anyone please let me now how to do this.
batch file looks like this
cmd.bat
------------
@ECHO OFF
cscript "D:\samp.vbs "
isql -S sername -d dbname -U usrname -P %pwd% -q "select * from Table"
vbscript file
---------------
Option Explicit
Dim temp
temp = "hello"
key = "abcd123"
temp = sampfunc(temp,key)
Function sampfunc(str,key)
Dim lenKey, KeyPos, LenStr, x, Newstr
Newstr = ""
lenKey = Len(key)
KeyPos = 1
LenStr = Len(Str)
str=StrReverse(str)
For x = LenStr To 1 Step -1
Newstr = sample statements
KeyPos = KeyPos+1
If KeyPos > lenKey Then KeyPos = 1
Next
Newstr=StrReverse(Newstr)
Decrypt = Newstr
End Function
I need to pass the Newstr string which is my password onto my isql statement in the batch file. Can anyone help me on this
Thanks in advance
Vidya