PDA

View Full Version : Get Current Directory?



NewsArchive
12-10-2001, 01:00 AM
Is there a way in VBScript in a Basic MSI Project to get the current
directory of the installer? For example, my application required dcom98
which cannot be distributed, but since our app is installed from a server,
we allow the end user to download dcom98 and put it in a dcom98 folder under
the same folder as our installer. So from the VBScript am detecting whether
or not dcom98 is installed, and I'm trying to see if dcom98.exe exists in a
dcom98 folder, so I can either run it or display a messagebox say where to
get dcom98 from. Any ideas?

Thanks,
Eric Amodio

NewsArchive
12-11-2001, 01:00 AM
sCurPath = CreateObject("Scripting.FileSystemObject")_
.GetAbsolutePath(".")


As an aside: DCOM98 (build 2612) is allowable for redistribution (the one
that is included with Visual Studio 6). The only version of DCOM98 that is
not redistributable is DCOM98 version 1.3 (build 3328).

See my groundbreaking post:
http://groups.google.com/groups?hl=en&selm=3be89428%40news.installshield.com

(watch for text wrapping above)

Ted.

"Eric Amodio" <eamodio@artisoft.com> wrote in message
news:3c15482d@news.installshield.com...
> Is there a way in VBScript in a Basic MSI Project to get the current
> directory of the installer? For example, my application required dcom98
> which cannot be distributed, but since our app is installed from a server,
> we allow the end user to download dcom98 and put it in a dcom98 folder
under
> the same folder as our installer. So from the VBScript am detecting
whether
> or not dcom98 is installed, and I'm trying to see if dcom98.exe exists in
a
> dcom98 folder, so I can either run it or display a messagebox say where to
> get dcom98 from. Any ideas?
>
> Thanks,
> Eric Amodio
>
>

NewsArchive
12-11-2001, 01:00 AM
Sorry, I meant GetAbsolutePathName

Ted.

"Ted" <Ted@t--x.org> wrote in message
news:3c1592c0@news.installshield.com...
> sCurPath = CreateObject("Scripting.FileSystemObject")_
> .GetAbsolutePath(".")
>
>

NewsArchive
12-11-2001, 01:00 AM
Ted,
I tried the code below and I have also tried WSHShell.CurrentDirectory
and both always seem to point to c:\winnt\system32 no matter where I run the
install from. Any other ideas?

As for DCOM98, our application relies on fixes that are only in 1.3, thanks
though.

Eric Amodio

"Ted" <Ted@t--x.org> wrote in message
news:3c159477$1@news.installshield.com...
> Sorry, I meant GetAbsolutePathName
>
> Ted.
>
> "Ted" <Ted@t--x.org> wrote in message
> news:3c1592c0@news.installshield.com...
> > sCurPath = CreateObject("Scripting.FileSystemObject")_
> > .GetAbsolutePath(".")
> >
> >
>
>
>

NewsArchive
12-11-2001, 01:00 AM
I think you're talking about the SourceDir property. Try displaying
Property("SourceDir") in your VBScript. However, it will most likely be a
temp folder if you've packaged the msi file inside a setup.exe.

"Eric Amodio" <eamodio@artisoft.com> wrote in message
news:3c15482d@news.installshield.com...
> Is there a way in VBScript in a Basic MSI Project to get the current
> directory of the installer? For example, my application required dcom98
> which cannot be distributed, but since our app is installed from a server,
> we allow the end user to download dcom98 and put it in a dcom98 folder
under
> the same folder as our installer. So from the VBScript am detecting
whether
> or not dcom98 is installed, and I'm trying to see if dcom98.exe exists in
a
> dcom98 folder, so I can either run it or display a messagebox say where to
> get dcom98 from. Any ideas?
>
> Thanks,
> Eric Amodio
>
>

NewsArchive
12-11-2001, 01:00 AM
Yeah, that was the first one I tried, and you are correct it returns a temp
directory. Any others?

Thanks again,
Eric Amodio

"Phil Wilson" <phil.wilson@nospam.unisys.com> wrote in message
news:3c166d95@news.installshield.com...
> I think you're talking about the SourceDir property. Try displaying
> Property("SourceDir") in your VBScript. However, it will most likely be a
> temp folder if you've packaged the msi file inside a setup.exe.
>
> "Eric Amodio" <eamodio@artisoft.com> wrote in message
> news:3c15482d@news.installshield.com...
> > Is there a way in VBScript in a Basic MSI Project to get the current
> > directory of the installer? For example, my application required dcom98
> > which cannot be distributed, but since our app is installed from a
server,
> > we allow the end user to download dcom98 and put it in a dcom98 folder
> under
> > the same folder as our installer. So from the VBScript am detecting
> whether
> > or not dcom98 is installed, and I'm trying to see if dcom98.exe exists
in
> a
> > dcom98 folder, so I can either run it or display a messagebox say where
to
> > get dcom98 from. Any ideas?
> >
> > Thanks,
> > Eric Amodio
> >
> >
>
>