can someone make this work please VBScript!

Nuance Pdf converter 6 professional
January 28, 2010 at 08:00:29
Specs: Windows XP, 1.12GB RAM
Hello, i am currently making a little program
and i am making a installer out of
VBS and .ZIP.
I have made a code so far but it doesn't work
please could someone help?
here's my script


Set oShell = CreateObject("WScript.Shell")
pathstring = oShell.CurrentDirectory
msgbox(pathstring)
pathToZipFile="pathstring\files.zip"
extractTo="C:\password"

set sa = CreateObject("Shell.Application")
set
filesInzip=sa.NameSpace(pathToZipFile).items

sa.NameSpace(extractTo).CopyHere(filesInzip)

basicaly what it does is extract a file that is in
the same directory as the script
and extracts it to c:/password but i cant get it
to work.

pathToZipFile="pathstring\files.zip"
this bit is the only part that doesn't work!
because i have tried it when i type the
directory in manually


See More: can someone make this work please VBScript!

Report •


#1
January 28, 2010 at 15:03:29
i might be that the quotes:
pathToZipFile="pathstring\files.zip"

is causing pathstring to be treated as a literal, and not a variable, try echoing it out to a msgbox, both with and without the quotes and see what it looks like:
msgbox ("pathstring\files.zip" & pathstring\files.zip)


Report •
Related Solutions


Ask Question