如何将字符串从一个Vb脚本传递到另一个?

问题描述:

function schedule(date,time,Filename)
	 
		strComputer = "."
			Set objWMIService = GetObject("winmgmts:" _
    				& "{impersonationLevel=impersonate}!\\" _
  					& strComputer & "\root\cimv2") 
		JobID = "Test"
		Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
		errJobCreate = objNewJob.Create _
    			("cmd /c cscript D:\New Folder\To send the Mail\Mail.vbs",time, _
        		false , ,date,True, JobId) 
		If errJobCreate = 0 Then
			objfilelog.writeline( Name  & vbtab &  vbtab & vbtab & "success"  & vbtab & vbtab &  now() & vbtab & JobId )
    			
		Else
    			
			objfilelog.writeline( Name  & vbtab & vbtab & "Failed" & vbtab & errJobCreate  )
		End If

	end function









Mail.vbs内容



'**************************发送SFTP状态的脚本服务**************







Mail.vbs content

'**************************Script to send the status of the SFTP Service**************

Dim sBlat,oExecObject,oshell

 	Set oShell = CreateObject("WScript.Shell")
		
		'sBlat="C:\IST\Utils\Blat """ & "FIlename"" to ""mail id"""
	 
		sBlat="C:\IST\Utils\Blat """ & "Filename"" -to ""mail id"""
		
		sBlat=sBlat & " -s ""Test "

		'sBlat=sBlat & """ -cc ""mail id"
		sBlat=sBlat & """ -p psupport"
		'msgbox (sBlat)
				'Alert sBlat
				Set oExecObject = oShell.Exec(sBlat)
				Set oshell=Nothing
				Set oExecObject = Nothing

查看链接这里:



一个小的谷歌搜索寻找:从vbscript调用vbscript参数已经成功。



现在说你应该试着去搜索它。点击此链接可直接通过让我为您发布Google来直接进入谷歌搜索: http://bit.ly/1d4ZVRH [ ^ ]。



第一个结果带有例子。
Take a look at the links here:

A small google search looking for: call a vbscript from vbscript with parameters has made it.

Now seriously you should have tried to search for it. Clicking this link will take you directly to the google search through Let Me Google That For You: http://bit.ly/1d4ZVRH[^].

The first results come with examples.