0

I am using InstallShield 2008 to build an installation package (which in turn contains a .NET web application setup).

In the InstallShield project we have specified an internet shortcut to be created. The shortcut is to the local machine, and up until now we have had a Target specification like this:

http://localhost//TheApplication//Start.aspx

For technical reasons beyond my control/knowledge there is a requirement that "localhost" should be replaced with the actual name of the machine.

Documentation from both Flexera and Microsoft talks about a Windows Installer property ComputerName, but I have found no information on how/where this is to be used.

Some very fragmented findings suggested the property should be surounded by [brackets], so I naively tried altering the specification of the target to

http://[ComputerName]//TheApplication//Start.aspx

but this does not work. The actual shortcut then contains that exact text, the property is not "expanded".

I am looking for any information or hints on

  • How to use that property, or
  • How else to get the actual computer name into the URL of the internet shortcut.
johanekdahl
  • 249
  • 3
  • 10
  • I don't understand why the name localhost does not work. Check C:\Windows\System32\drivers\etc\hosts for that name, and activate it. I wish I know more about it myself, to give you more detailed info. – The Original Android Jul 05 '12 at 17:55
  • IF you simply execute the aspx web page by C:\inetput\wwwroot\...\TheApplication\Start.aspx, does the page work? I am assuming you have a local server set up and you are using the default directory. That's my suggestion. – The Original Android Jul 05 '12 at 17:58

1 Answers1

0

Try using the ComputerName environment variable instead?

http://%COMPUTERNAME%/TheApplication/Start.aspx

Also, you shouldn't need all those double slashes (after the first set, that is).

reuben
  • 3,360
  • 23
  • 28
  • Sorry, but that did not work. The %COMPUTERNAME% survives all through to the shortcut, i.e. not "expanded". (And if it was, I would suspect it to be expanded when building the installer rather than running it and thus getting the wrong computer name, right?) – johanekdahl Jul 05 '12 at 12:07
  • @johanekdahl When I try creating a shortcut like that on my computer, even with the unexpanded environment variable, it does the "right thing". Are you finding that leaving it unexpanded causes a problem for you? – reuben Jul 05 '12 at 12:14
  • %COMPUTERNAME% is not working for me: I created a shortcut on my machine (through "the normal Windows procedure"). The url was "h t t p://localhost/TheApplication/Start.aspx". [Spaces added to stop forum s/w from actually interpreting it as an URL] That shortcut works just fine. I then edited the shortcut, replacing "localhost" with the actual name of my computer. Still works. I then replaces the actual computer name with %COMPUTERNAME%. The shortcut stops working, IE creates a new tab which is labeled "Connecting..." and then nothing more. (Windows XP, IE8) – johanekdahl Jul 05 '12 at 15:46
  • More findings: If I type the URL (with %COMPUTERNAME%) in into the address field in IE it works. If I create a shortcut in Windows that one constantly fails as described above. When the shortcut is saved the URL is converted to lower case (so it contains "%computername%") but that does not seem to be the cause of the failure. If I type in an URL into IE in all lower case it works. – johanekdahl Jul 06 '12 at 11:47