Within arcpad (edit form) I want to get the current location of the vbs script running. This simple vbs script outside of arcpad works fine.

wscript.echo " " + Wscript.ScriptFullName

However, when I call this statement within a button click event in arcpad is gives and error and says object wscript required.

I also tried this:

Dim sCurPath
sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")

However, I'm getting


directory (not location of vbs script).

Any ideas of how to find current directory of vbs script running in arcpad edit form?

  • As far as I know you cannot use wscript in ArcPad, however the second snippet you posted works for me, are you sure your script is stored where you think it is stored?
    – sgrieve
    Dec 13, 2012 at 14:32
  • @sgrieve, Yes the vbs file is not in the C:\Users\username\Desktop directory.
    – artwork21
    Dec 13, 2012 at 14:36
  • I'm not really sure what to suggest then, I inserted that code into one of my ArcPad projects and it gave me the correct working directory. Could you post the rest of the module? Maybe something odd is interfering with the command.
    – sgrieve
    Dec 13, 2012 at 14:43
  • 1
    @sgrieve, I tried the code against another layer/vbs file and it worked. Not sure still what is going on in the one vbs file though (will post if I figure it out), thx!
    – artwork21
    Dec 13, 2012 at 21:25

1 Answer 1


You do not have to specify wsscript...... ArcPad, by default, supports VBscript and Jscript and Python script if you have the python interpreter installed. Therefore, just use the regular VBS syntax.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.