View Full Version : Network installs and trailing \
NewsArchive
01-02-2014, 04:28 AM
I ran into a problem yesterday where a customer was trying to install
onto their network.
They had previously installed the app and were installing an update.
I use the function Detect Previous Version to get the location.
The installer retrieved the info and display the install path:
N:\Apps\MyApp
but then gave a notice that it could not detect a previous version.
In my attempts to get it installed I added a trailing "\", SB "found"
the installation and continued on.....
But, I found in the LOG N:\Apps\MyApp\\MyApp.exe where it used a "\\".
I also noticed this repeating in the registry.
I haven't seen this problem before.
Is Detect Previous Version broken for network paths?
Should the trailing "\" even be there?
So I'm not sure what is going on and why the trailing \ is not there but
then an additional one is added.....
Thoughts?
Paul
NewsArchive
01-02-2014, 08:06 AM
Paul,
If you see:
N:\Apps\MyApp\\MyApp.exe
then the installation path variable is:
N:\Apps\MyApp\
instead of:
N:\Apps\MyApp
You can use the "Handle String Operation (Validate Path)" function -or- test
for an ending \ and then remove it.
Friedrich
NewsArchive
01-03-2014, 05:17 AM
Friedrich,
I understand that. Let me clarify the issue then......
As I said I use the function Detect Previous Version to get the location.
That is then displayed in the setup path dialog box as....
N:\Apps\MyApp
So, I agree that is what needs to be - no trailing space.....
BUT, clicking NEXT and setupbuilder gives a notice that it could not
detect a previous version.
It must be checking for some component of my install or a previous setup
log or something...
To get SetupBuilder to recognize that the app IS there and PREVIOUSLY
installed, the user MUST ADD A TRAILING \
Adding the trailing \ gets SB to recognize that the app is in that
folder....
CONCLUSION: SB's function to detect the previous installation is broken....
Paul
NewsArchive
01-03-2014, 05:18 AM
Paul,
> I understand that. Let me clarify the issue then......
>
> As I said I use the function Detect Previous Version to get the location.
> That is then displayed in the setup path dialog box as....
> N:\Apps\MyApp
Okay, so the "Detect Previous Version" function works as expected here. It
detects your previously installed version and returns the correct
installation location -> N:\Apps\MyApp
> So, I agree that is what needs to be - no trailing space.....
>
> BUT, clicking NEXT and setupbuilder gives a notice that it could not
> detect a previous version.
So what kind of code did you add to your install when you click NEXT? Or
are you talking about a web update client or something like that?
> It must be checking for some component of my install or a previous setup
> log or something...
Do you mean your own source code in the install? SetupBuilder does not do
this automatically.
> To get SetupBuilder to recognize that the app IS there and PREVIOUSLY
> installed, the user MUST ADD A TRAILING \
Hmmm, no idea what you mean, sorry :-( Perhaps you are talking about the
wupdate.exe or wucheck.exe clients and not SetupBuilder per-se?
> Adding the trailing \ gets SB to recognize that the app is in that
> folder....
>
> CONCLUSION: SB's function to detect the previous installation is
> broken....
Definitely No.
Friedrich
NewsArchive
01-04-2014, 12:50 PM
Friedrich,
This is a SetupBuilder project. Yes, I use Wupdate/wucheck but this is
the actual installer.....
On 1/3/2014 1:22 AM, Friedrich Linder wrote:
> Paul,
>
>> I understand that. Let me clarify the issue then......
>>
>> As I said I use the function Detect Previous Version to get the location.
>> That is then displayed in the setup path dialog box as....
>> N:\Apps\MyApp
> Okay, so the "Detect Previous Version" function works as expected here. It
> detects your previously installed version and returns the correct
> installation location -> N:\Apps\MyApp
okay - agree
>
>> So, I agree that is what needs to be - no trailing space.....
>>
>> BUT, clicking NEXT and setupbuilder gives a notice that it could not
>> detect a previous version.
> So what kind of code did you add to your install when you click NEXT? Or
> are you talking about a web update client or something like that?
I added NOTHING. There is no extra code in my SB project.
>
>> It must be checking for some component of my install or a previous setup
>> log or something...
> Do you mean your own source code in the install? SetupBuilder does not do
> this automatically.
I'm not doing anything but retrieving the path with detect previous
install.....
It seems SB is verifying that path and rejecting it as valid because
when people are updating they do not get presented with the path
dialog. In this case they are.
So when "detect previous install" loads a registry entry, does it do any
checking? What does it check for?
What does it read?
>
>> To get SetupBuilder to recognize that the app IS there and PREVIOUSLY
>> installed, the user MUST ADD A TRAILING \
> Hmmm, no idea what you mean, sorry :-( Perhaps you are talking about the
> wupdate.exe or wucheck.exe clients and not SetupBuilder per-se?
No. In SB. As I said above they are being presented with a path
selection dialog. This is not normally seen when a previous version is
detected.
If the user clicks NEXT it says Previous version not found and returns
to the path selection dialog.
If the user adds the "\" to the path and clicks next, SB continues on....
but the path in the dialog box then becomes N:\Apps\MyApp\
which we agree is wrong/BAD.
>
>> Adding the trailing \ gets SB to recognize that the app is in that
>> folder....
>>
>> CONCLUSION: SB's function to detect the previous installation is
>> broken....
> Definitely No.
>
> Friedrich
I respectfully disagree. Something is wrong when it detects the
previous version. It rejects the path in error.
I have explored the registry and I believe it's probably some bad
registry entry that is causing the problem.
But SB puts them there and maintains them. I just look...
Paul
NewsArchive
01-04-2014, 12:51 PM
Paul,
> But SB puts them there and maintains them. I just look...
Sounds suspiciously like Schrodinger's cat!<g>
Lee White
NewsArchive
01-04-2014, 12:52 PM
Paul,
> This is a SetupBuilder project. Yes, I use Wupdate/wucheck but this is
> the actual installer.....
Sorry, still not clear :-( As I understand it, your own installer (and NOT
the wupdate.exe/wucheck.exe client) gives a notice that it could not detect
a previous version. So what script code do you have in your install project
that displays this message (when you click the NEXT button)?
Just a quick shot in the dark. Let us assume you are using the correct
Product GUID in "Detect Previous Version". Perhaps you have compiled a
hybrid installer that runs in 64-bit mode on x64 machines but the initial
install was 32-bit? In this case, previous version detection fails because
there is no previous 64-bit product installed.
BTW, nothing changed in the "Detect Previous Version" function for 10+
years.
Friedrich
NewsArchive
01-06-2014, 04:03 AM
Yes, it's my SB installer. No, I haven't added any code or message of
that kind.
Hundreds of people of downloaded and installed / downloaded and update....
So I think it's whatever the "Detect Previous Version" is doing.
What registry entries is it reading?
Paul MacFarlane
NewsArchive
01-06-2014, 04:03 AM
Paul,
> Yes, it's my SB installer. No, I haven't added any code or message of
> that kind.
>
> Hundreds of people of downloaded and installed / downloaded and update....
>
> So I think it's whatever the "Detect Previous Version" is doing.
> What registry entries is it reading?
The "Detect Previous Version..." function reads the
HKLM\SOFTWARE\Microsoft\CurrentVerion\Uninstall\{Y OURPRODUCTGUID} key name.
But it does not display any message. It just reads the key and fills some
SB variable values.
If the function succeeds, the %_SB_ERRORCODE% return value is nonzero.
Variable contains the path to the previous version.
If the function succeeds, %_SB_TMP% contains the uninstall string (if
available).
If the function succeeds, %_SB_RETURNEX% contains the installed version
number (if available).
Perhaps you are using code similar to the attached one?
Friedrich
NewsArchive
01-07-2014, 08:53 AM
This is the code section:
Paul MacFarlane
NewsArchive
01-07-2014, 08:53 AM
Paul,
> This is the code section:
And where do you display the notice that it could not detect a previous
version (when you click "Next" in your install)? SetupBuilder does not do
this on its own.
Friedrich
NewsArchive
01-07-2014, 08:56 AM
To be on the safe side, please see the attached screenshot. I understand
that you said the message comes from your own install. But are you 100%
sure it's not the message from wupdate.exe?
A message similar to "The Web Update application failed to detect a previous
version of your application yada yada" is not a built-in error but comes
from custom code (see 2nd screenshot). IMO, code in your "Loop Wizard"
handles it because you said the "Next" button triggers it.
Friedrich
NewsArchive
01-07-2014, 12:36 PM
I am certain it's not coming from Wupdate. This is when running the
installer directly......
As I've tried to say before.... I'm not sure the message occurs during
the "detect previous version" function.
I believe DPV FAILS and then the install path dialog box is displayed.....
So when the user sees a valid path and clicks NEXT, THAT is when the
message is displayed.
It's like a flag has been set within the SB installer that a previous
version
must be there when its trying to validate the path from the dialog.....
Normally, when DPV is successful the user never sees a path dialog.
Paul MacFarlane
NewsArchive
01-08-2014, 05:41 AM
Paul,
> It's like a flag has been set within the SB installer that a previous
> version must be there when its trying to validate the path from the
> dialog.....
The "Detect Previous Version..." function is completely "silent". It does
not display any message box. And SB does not do the previous version
checking on its own (and there is no flag to do this).
Try to run the install with the /E event logging option and then let us
check the generated "c:\sbevents.txt". Perhaps we can see what displays
this message. And a screenshot would be great.
Friedrich
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.