Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Servername parameter in custom action
 

Servername parameter in custom action

Why is this.Context.Parameters["SERVERNAME"]in the custom action sometime have a value

and sometime don't. I have a setup project with an Installer custom action and used the this.Context.Parameters["SERVERNAME"]successfully. But on another similar setup project, the servername parameterreturns null !

I am bewildered! Is there a setting/property in the setup project that needed to be set before I can use the parameter in the custom action? Checked the project that worked but didn't find anywhere that set the servername. Tried setting the CustomActionData property to /Servername = ["SERVERNAME"] and InstallerClass to True does not help.

Any idea?

Thanks

benc

benc43  Sunday, April 13, 2008 1:43 PM
There is no standard built-in property called SERVERNAME, so I wouldn't expect anything like /Servername=[SERVERNAME] to work unless you are getting it from a textbox in the UI, or maybe a Search Target Machine.

PhilWilson  Monday, April 14, 2008 10:08 PM
There is no standard built-in property called SERVERNAME, so I wouldn't expect anything like /Servername=[SERVERNAME] to work unless you are getting it from a textbox in the UI, or maybe a Search Target Machine.

PhilWilson  Monday, April 14, 2008 10:08 PM

Thanks Phil

I have taken a work-around instead, ie., using System.Environment instead

Thanks

benc43  Friday, April 18, 2008 10:49 AM

You can use google to search for other answers

Custom Search

More Threads

• VB program with setup solution, assigning icon to outputted exe
• Managment of 60 PCs and unruly teens
• Updater Application Block
• Multiple File copy to Web Server
• Windows service setup prompt for username and password
• dfsvc.exe has encountered a problem and needs to close
• Prevent inclusion of localized resources
• ClickOnce Updates Fail for Signed Assemblies
• ClickOnce app published in Online Only mode question
• Starting another Project, both deployed through clickonce