Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   problem in running a file in remote machines mapped drive (http://www.go4expert.com/forums/running-file-remote-machines-mapped-t22468/)

DivyaTheja 17Jun2010 23:21

problem in running a file in remote machines mapped drive
 
hi

I am facing problem when running a vbscript file in local machine which starts a program in remote machine (program located in mapped drives).
I tried win32Scheduledjob and AT commands. but these are working when a file is in harddisk drives but not in mapped drives. With ScheduledJob and win32_process its running in background. I want a program to run interatively in remote machine.

Please help me out.

Code i wrote was:
strCommand = "wscript.exe L:\UITest\Utilities\Auto\AutoInstallRun.vbs "+strComputer
strComputer = "nbhyddpachipu"

Const INTERVAL = "n"
Const MINUTES = 1


Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objScheduledJob = objWMIService.Get("Win32_ScheduledJob")
Set objSWbemDateTime = CreateObject("WbemScripting.SWbemDateTime")


objSWbemDateTime.SetVarDate(DateAdd(INTERVAL, MINUTES, Now()))
errReturn = objScheduledJob.Create(strCommand, objSWbemDateTime.Value, False, 0, 0, True, intJobID)


All times are GMT +5.5. The time now is 11:50.