PDA

Click to See Complete Forum and Search --> : ms installer


steve_rm
Oct 8th, 2006, 01:25 AM
Hello,

I found a good solution using clickonce, for detecting if the application is first run. Using the following code:


If (System.Deployment.Application.ApplicationDeployment.CurrentDeployment.IsFirstRun)) Then
Dim setConnection As New ServerSettings()
setConnection.Show()
Else
Dim logMeIn As New Login()
logMeIn.Show()
End If


However, the customer has just changed their mind. And they they want to specify the location of where they want to install the application. Clickonce only has a default that cannot be changed.

So I using the ms installer. However the above code does not work for it. It seems

I would like the serverSettings to run only on first startup. However, I am not sure about the code for this, as the above does not work.

Does amyone know the synstax for 'first run' when using ms installer?

I think I am destined not to get this finished, with the customer changing their mind.

Many thanks for your help,

Stteve

eranga262154
Oct 17th, 2006, 10:40 PM
Hello,

I found a good solution using clickonce, for detecting if the application is first run. Using the following code:


If (System.Deployment.Application.ApplicationDeployment.CurrentDeployment.IsFirstRun)) Then
Dim setConnection As New ServerSettings()
setConnection.Show()
Else
Dim logMeIn As New Login()
logMeIn.Show()
End If


However, the customer has just changed their mind. And they they want to specify the location of where they want to install the application. Clickonce only has a default that cannot be changed.

So I using the ms installer. However the above code does not work for it. It seems

I would like the serverSettings to run only on first startup. However, I am not sure about the code for this, as the above does not work.

Does amyone know the synstax for 'first run' when using ms installer?

I think I am destined not to get this finished, with the customer changing their mind.

Many thanks for your help,

Stteve

Thanks Styeve for this question.

Someone give a solution here it will helpfull to me as well.

steve_rm
Oct 18th, 2006, 11:33 AM
Hello,

I did find a solution for this, which was very simple. All you have to do is set a key value in the registry. When the program runs for the first time it will check for this key value, if it doesn't exist then the programming is running for the first time, so set a key value for the next time the program is ran. So for the next time it is ran, the key value will exist so the program will do something different.

I don't have the syntax for the setting the key value in the registry. However, there is some good code example on msdn that I used for this. However, if you still need help I can send you my code tomorrow.

Steve

eranga262154
Oct 18th, 2006, 09:48 PM
Hello,

I did find a solution for this, which was very simple. All you have to do is set a key value in the registry. When the program runs for the first time it will check for this key value, if it doesn't exist then the programming is running for the first time, so set a key value for the next time the program is ran. So for the next time it is ran, the key value will exist so the program will do something different.

I don't have the syntax for the setting the key value in the registry. However, there is some good code example on msdn that I used for this. However, if you still need help I can send you my code tomorrow.

Steve

Can it cause for the programs which are already setup?