trailing "\" on target directory that is UNC path name - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

paul@jobpow.com
Posts: 33
Joined: Thu Oct 01, 2009 8:29 pm

trailing "\" on target directory that is UNC path name

on target directories that are UNC path values (for instance \\SERVER\Shared folder\) the installer adds an extra slash during install (AI_INSTALL) and during repair (AI_MAINT) so that i get an error that the path "\\SERVER\Shared folder\\" is not accessible. this is for a situation where a user is deploying files to a server computer from a client computer over the local network. is this reproduceable? and if so, how to work around?


2009-10-22 12:21 pm est
attached is screen shot of dialog with a custom label on the progress dialog showing the appdir property with only a single trailing slash but the error message shows two trailing slashes,and as result, the path is not available. this was captured during a "repair" operation.[attachment=0]example.png[/attachment]
Attachments
example.png
example.png (23.31 KiB) Viewed 8255 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: trailing "\" on target directory that is UNC path name

Hi Paul,

Please note that the APPDIR property always ends with a trailing backslash as described on the Windows Installer Folders page. Any operations that manipulate this property must take this fact into consideration.
This means the APPDIR property will contain the following value:

Code: Select all

\\ACCSERV02\Users Shared Folders\Paul\JPFolder\BKS06\
If you still can not troubleshoot this error, please post a sample project that accurately reproduces this behavior, so we can take a look at it.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
paul@jobpow.com
Posts: 33
Joined: Thu Oct 01, 2009 8:29 pm

Re: trailing "\" on target directory that is UNC path name

during the install i have accounted for this behavior that only occurs on the usage of UNC path names by stripping the trailing slash and then observing AI ADDING a trailing slash. this behavior does not happen when using local or mapped drives during install (i.e. the path i provide has a trailing slash and AI does not give an error with two slashes during install or repair). the problem is acute when running a "repair" operation since the default actions just repairs any missing elements and does not give the user any choice in paths. AI gets the path for repair and appends another trailing slash providing an error during repair.
paul@jobpow.com
Posts: 33
Joined: Thu Oct 01, 2009 8:29 pm

Re: trailing "\" on target directory that is UNC path name

i am writing vbscript to check the appdir properties as published actiosn on the next install button of the verifyreadydlg in first time install and the repair button of the maintenancetypedlg; are there other or better locations or properties recommended for this type of checking?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: trailing "\" on target directory that is UNC path name

Hi Paul,

Are you using Enhanced UI? If so, please send us a sample project that accurately reproduces this behavior so we can fix the issue. If you are not using Enhanced UI then the issue is Windows Installer related and there is not much we can do about it.
are there other or better locations or properties recommended for this type of checking?
The current location of your script seems fine.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
paul@jobpow.com
Posts: 33
Joined: Thu Oct 01, 2009 8:29 pm

Re: trailing "\" on target directory that is UNC path name

yes, enhanced ui. fyi, i'm loading this location into a combo with a script based on the ai combo script example.

i'm sending the AIP file and scripts to the support email, correct?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: trailing "\" on target directory that is UNC path name

Hi Paul,

We looked into the sample you sent us. It seems quite complex. Would it be possible for you to send us an install log so we can better troubleshoot the problem?

Thank you,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
paul@jobpow.com
Posts: 33
Joined: Thu Oct 01, 2009 8:29 pm

Re: trailing "\" on target directory that is UNC path name

i think i may have it. for installs i leave off the last slash in my path that i provide to the installer, that runs. in repair (AI_MAINT) mode, i have a script check for the existence of a UNC path and strip the last character if so. trying to run this script check in AI_INSTALL mode mangles the folder path, hence the prior alteration of the path when building the folder list. i'm forwarding via email the logs from these sucessful runs; i need to test a few more times for verification. if you can tell from the logs where i might need to make changes, please let me know.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: trailing "\" on target directory that is UNC path name

Hi,

Your approach seems to be correct. I'm not sure why sometimes the product is not installed. If you can reproduce this behavior please send us a verbose log of the installation with the problem so we can investigate it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”