Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
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 '12 at 14:32
@sgrieve, Yes the vbs file is not in the C:\Users\username\Desktop directory. – artwork21 Dec 13 '12 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 '12 at 14:43
@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 '12 at 21:25

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. Hope this helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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