need code for custom update checking...

Hi!!!
I need the code for custom update checking using ClickOnce System.Deployment APIs...
(ie) the user should be prompted to choose the update to happen after one day or one week....

thanks....

[205 byte] By [senlance] at [2007-12-23]
# 1

private void OnCheckForUpdates(object sender, EventArgs e)

{

// Always confirm we are running through ClickOnce

if (ApplicationDeployment.IsNetworkDeployed)

{

// Hold a reference to the current deployment

ApplicationDeployment current =

ApplicationDeployment.CurrentDeployment;

// Check to see if an update is available on the server

if (current.CheckForUpdate())

{

// One is available, go get it

current.Update();

DialogResult dr = MessageBox.Show(

"Update downloaded, restart application?",

"Application Update",MessageBoxButtons.YesNo);

if (dr == DialogResult.Yes)

{

Application.Restart();

}

}

}

}

BrianNoyes at 2007-8-30 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...
# 2

I want to know where (On which event) this should be coded. ....

Thanks

AvinashVyas at 2007-8-30 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...