如何将字符串从一个Vb脚本传递到另一个? [英] How Do I Pass A String From One Vb Script To Another?

查看:129
本文介绍了如何将字符串从一个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 [< a href =http://bit.ly/1d4ZVRHtarget =_ blanktitle =New Window> ^ ]。



第一个结果带有例子。
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.


这篇关于如何将字符串从一个Vb脚本传递到另一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆