PDA

View Full Version : Working Directory



chrisp
10-16-2001, 07:50 AM
Hi,

Whenever i use Installshield Express 3.51 to build an installation, it
slightly changes my desired working directory. For example,..if i enter

[WindowsVolume]\test

build the installation and then install it to Windows NT. The above line gets changed to

c:\test\

The backslash on the end shouldn't be there and slows down the program considerably. I'm not sure why it does this as no backslash is added when you manually create a shortcut on the computer,..only when Installshield creates it. Also in Installshield, if i blank out the 'working directory', it still gets created with the ending backslash.

Has anyone ever experienced this and have a solution for me?

thanks
chris

Chandima
10-16-2001, 08:08 AM
The backslash at the end of the path is probably something the Windows Installer adds during runtime. I think by default it appends one after a directory identifier.

However the slowness you are experiencing is probably because of the shortcut itself. Express creates something called an "Advertised" shortcut. This uses the Windows Installer's "Repair" service. So everytime you launch this shortcut, the Windows Installer will scan the local machine and make sure all the exe, dll and ocx files are installed and uncorrupted. If they are fine it will laucnh the application and if they are not, it will fix them and then run the application.

I have submitted a Work Order to allow users to create non-advertised shortcuts in Express.

chrisp
10-16-2001, 08:33 AM
Hi again,

This problem has nothing to do with the annoying Windows repair feature.

Once our app starts, it creates reports through Crystal Reports and somehow Crystal is using the shortcuts 'working directory' specifier. When we get rid of the backslash, things work as they should.

Our problem is with the backslash that seems to be added by Installshield. If you rightclick on the Windows Desktop and create a shortcut, the default working directory does not contain an ending backslash. This is what we desire,..to have the working directory created as we actually specify,..without the ending backslash. Is there anyway to do this?

chris

Neeru
10-16-2001, 08:59 AM
Unfortunately the trailing \ at the end of your directory is something that windows installer service places after all directory specifiers. This is not considered a Bug by Microsoft from my understanding. It is how the windows installer service is designed to work. You could try upgrading to msi 2.0 to see if that helps resolve the issue.

chrisp
10-16-2001, 09:23 AM
Ahhh,..the 'helpful' Windows Installer service strikes again. Now i realize that MS is trying to standarize the Install process but they're also creating problems. What's it matter to MS if that trailing backslash is there or not,..it's not like i'm trying to overwrite a required system file,...i just want to get rid of the damn backslash. Augg!

Neeru
10-16-2001, 11:28 AM
You could try the following work around to see if it helps the situation:

In the target field of your shortcut, don't use [INSTALLDIR]\myapp.exe. Instead put a hard coded path like:
C:\Program Files\myapp\myapp.exe.

The above should not append that back-slash to the end of the path. Hopefully, this will help resolve your issue ;)