I have a ClickOnce application and a simple c# launcher that starts the ClickOnce application by launching IE with the URL of the app. I would like to set an environment variable that can be read by the ClickOnce application. Is this possible? This is my code for the launcher app:
ProcessStartInfo pInfo = new ProcessStartInfo("iexplore.exe", "http://svr:8080/cotest.application"); Process appProc = new Process(); appProc.StartInfo = pInfo; appProc.StartInfo.EnvironmentVariables.Add("some_var", "some_val"); appProc.StartInfo.UseShellExecute = false; appProc.Start(); I realise that I'm setting the variable for iexplore, but I thought (hoped) the environment might be inherited by the ClickOnce app. What happens is that the ClickOnce app starts but if I list its environment, the variable "some_var" is not present.
Any ideas?
http://svr:8080/cotest.application?some_var=some_val.