Skip to content

OSD\_UpdateCustomMessage

VB Scripting Library > OSD Scripting Library > OSD functions (OSD)

Allows for setting a custom message that will display in the OSD Gui progress dialog.
This is useful for informing the end user if starting a long running process in script.

ARGUMENTDESCRIPTIONTYPE
sMessageThe message to display. Use a blank "" value to remove the message.String

Boolean, TRUE if function completed successfully.

Only use this function if starting long processes. The OSD GUI process checks for this text at fixed intervals, so your script might have completed before the message is shown.

The following code will set a message in the OSD Gui progress dialog, stating that the second har drive is being formated, once done the message is removed.

Private Function IncludeScript(sScriptFile)
'...
End Function
'Begin
bStatus=True
If bStatus Then bStatus=IncludeScript("customlib.cis")
If bStatus Then bStatus=IncludeLibrary("Capalib.cin")
If bStatus Then bStatus=IncludeLibrary("Osdlib.cin")
If bStatus Then bStatus=Job_Start("WS","Script Name","1.0","ScriptName.log","INSTALL")
If bStatus Then bStatus=OSD_Initialize()
If bStatus Then bStatus=OSD_UpdateCustomMessage("Formatting 2nd Hard Drive, please wait...")
'code to format 2nd harddrive here
If bStatus Then bStatus=OSD_UpdateCustomMessage("")
Job_End(bStatus)
'End main

Scripting Guidelines