Devuelve la ruta de acceso completa de la secuencia de comandos que se está ejecutando.
objeto.ScriptFullName
La propiedad ScriptFullName es una cadena de sólo lectura.
El ejemplo siguiente muestra el uso de la propiedad ScriptFullName.
<package>
<job id="vbs">
<script language="VBScript">
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "\Acceso directo a secuencia de comandos.lnk")
oShellLink.TargetPath = WScript.ScriptFullName
oShellLink.WindowStyle = 1
oShellLink.Hotkey = "Ctrl+Alt+e"
oShellLink.IconLocation = "notepad.exe, 0"
oShellLink.Description = "Acceso directo a secuencia de comandos"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save
set oUrlLink = WshShell.CreateShortcut(strDesktop & "\Sitio Web de Microsoft.url")
oUrlLink.TargetPath = "http://www.microsoft.com/spanish/"
oUrlLink.Save
</script>
</job>
<job id="js">
<script language="JScript">
var WshShell = WScript.CreateObject("WScript.Shell");
strDesktop = WshShell.SpecialFolders("Desktop");
var oShellLink = WshShell.CreateShortcut(strDesktop + "\\Acceso directo a secuencia de comandos.lnk");
oShellLink.TargetPath = WScript.ScriptFullName;
oShellLink.WindowStyle = 1;
oShellLink.Hotkey = "Ctrl+Alt+e";
oShellLink.IconLocation = "notepad.exe, 0";
oShellLink.Description = "Acceso directo a secuencia de comandos";
oShellLink.WorkingDirectory = strDesktop;
oShellLink.Save();
var oUrlLink = WshShell.CreateShortcut(strDesktop + "\\Sitio Web de Microsoft.url");
oUrlLink.TargetPath = "http://www.microsoft.com/spanish/";
oUrlLink.Save();
</script>
</job>
</package>
Ejecutar sus secuencias de comandos | Propiedad ScriptName | Objeto WScript
| Ayuda de Javascript y Vbscript para Javascripts.astalaweb.com. |