Is there a way to include a dollar sign in a variable name without causing the installer to die? I have tried putting a dollar sign in a variable and then using that variable and it still does not work...at run-time anyway. It does work when you go through the debugger.
We are installing different instances of a service, and to stay within the standards set by Microsoft, we would like to place a $ between the name and the instance. The is the same approach Microsoft takes with SQL Server.
Any help you could provide would be great. Thanks.
Escaping a dollar sign ($)
-
- Posts: 76
- Joined: Mon Nov 06, 2006 2:07 pm
- Location: Texas
- Contact:
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Are you saying that having a $ sign as part of a variable's value causes problems? That should work, and that should cover your requirement.
You can also use a single $ as a string literal for the $ sign. There is no need for escapes.
Variables are substituted only when an actual variable has been defined matching the pattern $VAR$, any other usage of the $ sign is also allowed.
You can also use a single $ as a string literal for the $ sign. There is no need for escapes.
Variables are substituted only when an actual variable has been defined matching the pattern $VAR$, any other usage of the $ sign is also allowed.
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: 76
- Joined: Mon Nov 06, 2006 2:07 pm
- Location: Texas
- Contact:
The problem I am running into is this...I am setting a service name according to the instance of the installation. I would like my resulting name to look like this:
MYSERVER$MYINSTANCE
So when I set the name inside of the editor in InstallAware, I have it set like this:
MYSERVER$$INSTANCENAME$
Which didn't work. So I tried to create a variable to substitue the literal character:
Set Variable DOLLARSIGN to $
MYSERVER$DOLLARSIGN$$INSTANCENAME$
This compiles, but when you run the installation at run-time, it never gets through the initial loading sequence. It will work through a debug session though.
MYSERVER$MYINSTANCE
So when I set the name inside of the editor in InstallAware, I have it set like this:
MYSERVER$$INSTANCENAME$
Which didn't work. So I tried to create a variable to substitue the literal character:
Set Variable DOLLARSIGN to $
MYSERVER$DOLLARSIGN$$INSTANCENAME$
This compiles, but when you run the installation at run-time, it never gets through the initial loading sequence. It will work through a debug session though.
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
What happened with MYSERVER$$INSTANCENAME$?
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 41 guests