VB Script not calling the bat file through Autosys

82 views
Skip to first unread message

MCA

unread,
Jul 29, 2012, 6:58:40 AM7/29/12
to aut...@googlegroups.com
Hi,

I am calling the bat file from Autosys, the bat file will call the vb script file.
and that vb script file will call other bat file.
when i am calling the bat file from autosys, the bat file is calling the vb script file, but the vb script file is not calling the other bat file.
In VB Script file, i am using "runas" to change the user and i have provided the credentials in the vb script itself.
after runas, it calls the other bat file, but it is not calling.
what might be the reason?

Pradeep Agarwal

unread,
Oct 13, 2016, 1:51:05 PM10/13/16
to AutoSys
Please try below code.

3down voteaccepted
Try
    Dim procInfo As New ProcessStartInfo()
    procInfo.UseShellExecute = True
    procInfo.FileName = (FileLocation)
    procInfo.WorkingDirectory = ""
    procInfo.Verb = "runas"
    Process.Start(procInfo)
Catch ex As Exception
    MessageBox.Show(ex.Message.ToString())
End Try
Reply all
Reply to author
Forward
0 new messages