Re: Getting path...



Vince <vincent@ wrote:

hi there!

is there a way to get the absolute path of a running wsh script ?

WScript.Echo WScript.ScriptFullName Set oFSO = CreateObject("Scripting.FileSystemObject") sScriptPath = oFSO.GetParentFolderName(WScript.ScriptFullName) WScript.Echo sScriptPath


another question, is it possible to develop graphical interfaces
using wsh or we have to migrate to VB?

You could use an Internet Explorer object for the GUI, or switch to HTA:

http://groups.google.co.uk/group/microsoft.public.scripting.wsh/msg/aaf39e1e72537063?dmode=source&hl=en


-- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx .



Relevant Pages

  • Re: Getting path...
    ... >> is there a way to get the absolute path of a running wsh script? ... > sScriptPath = oFSO.GetParentFolderName ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ... sPath = WScript.ScriptFullName ...
    (microsoft.public.scripting.wsh)
  • Re: copy files
    ... is there something in vbscript so i can copy files from a "unknown" Folder to a defined location??? ... Set oFSO = CreateObjectsScriptPath = oFSO.GetParentFolderNameWScript.Echo sScriptPath ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: Regular Expressions
    ... Const OpenAsASCII = 0 ... Set oFSO = CreateObject ... bCheckForG1AtNextLoop = False ' init value ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.inetsdk.programming.scripting.vbscript)
  • Re: Determining if a user is a "Built-In" user
    ... Is there a way to get that info from them without WMI? ... Const FailIfNotExist = 0 ... Set oFSO = CreateObject ... Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: Non-scriptor Help.
    ... Gareth wrote: ... Set oFSO = CreateObject ... Set fFile = oFSO.GetFile ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.wsh)

Loading