I have a custom text entry field that requests a Network Share value from the user. The expected format is something like:
\\\\ServerName\\Share
I am capturing the value entered into a variable; however both of the \\\\ characters are not being retained. Only one \\ come through in the variable.
If I enter the value as:
\\\\\\ServerName\\Share (prepending \\\\\\ in the field)
then I get the expected value of:
\\\\ServerName\\Share
So my question is: how do I maintain both the \\\\ characters at the beginning of the text entry without making the user enter \\\\\\?
Any help is appreciated.
Thanks.
Capturing \\\\ as entered on custom dialog
-
- Posts: 5
- Joined: Tue Sep 12, 2006 5:21 pm
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Can you show a MessageBox right after the dialog returns and see what you get? Some commands will eliminate \\\\ into \\ as a convenience when using paths, and I think this might be what you're running into - but the elimination is smart enough to respect UNC paths.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 5
- Joined: Tue Sep 12, 2006 5:21 pm
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
The InstallAware Web Update script uses a text control and accepts input in this form: \\\\server\\username. That works fine, which is why I asked you to confirm right after showing your dialog with a MessageBox.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 5
- Joined: Tue Sep 12, 2006 5:21 pm
It has the correct value in a message box immediately after the dialog. When I try to use that value as a parameter on a "Run Program" command, the value does not contain both \\\\.
What do I need to do to have InstallAware maintain both \\\\ characters so that the full and correct network share will be contained in the variable value?
What do I need to do to have InstallAware maintain both \\\\ characters so that the full and correct network share will be contained in the variable value?
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
I see, so Run Program is losing it. I would add \\\\ in front of the variable to make sure it doesn't lose it. So if the variable in the dialog is called $VAR$, use it in Run Program as \\\\$VAR$.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 52 guests