VB Script Code Not Running
I am unable to execute below line of code which was running perfectly before
Set gobjFso = CreateObject("Scripting.FileSystemObject")
gstrRelativePath = gobjFso.GetParentFolderName(WScript.ScriptFullName)
showing error as Object required for WScript.ScriptFullName
Re: VB Script Code Not Running
gobjFso.GetParentFolderName(WScript.ScriptFullName) --- current code
gobjFso.GetParentFolderName(FullPath) ---- should be code
if you want to get the fullpath using wscript, you should create that wscript object and then get the path. You have used wscript as is and thus it is throwing the error.
set wshShell = CreateObject("WScript.Shell").. and then get the path using the object and pass that value for fullpath.
GoScriptLESS, Create test in seconds using UFT, View Demo and more info at scriptlessautomation.com