Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Shortcuts are searching for installed location
 

Shortcuts are searching for installed location

In my setup project, it is creating some icons on desktop.

1> I created a setup project and i kept MSI file c:\MyApplication\MyAppSetup.EXE
2> I run that setup and installed at c:\Program Files\MyApplication. It creates shortcuts for my application.
3> Shortcuts are working fine .
4> Delete setup file from c:\MyApplication
5> Now i tried to open my application using short cut. But it is opening installation wizard and showing me error message "File could not found at location c:\MyApplication\MyAppSetup.EXE"

But if i open my application from installed location (c:\Program files\ MyApplication), it is work fine. No issues.


Why this is happening?
Is it going to check for software updates?
How to remove this feature?

Thanks
--

Rajesh
  • Moved byYiChun ChenMSFTMonday, May 04, 2009 8:26 AMDeployment issue (From:.NET Framework Setup)
  •  
Rajeshaz09  Thursday, April 30, 2009 12:11 PM
I resolved this issue by adding new property to the MSI.
DISABLEADVTSHORTCUTS=1


I used post build script to automate this.

cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "INSERT INTO Property(Property, Value) VALUES ('DISABLEADVTSHORTCUTS', '1')"

Rajesh A
S7 Software
  • Marked As Answer byRajeshaz09 Monday, August 10, 2009 1:46 PM
  •  
Rajeshaz09  Monday, August 10, 2009 1:46 PM
Hi Rajesh,

I am moving this thread from Base ".NET FrameworkSetup" forum to the "ClickOnce and Setup & Deployment Projects" forum, since the issue is related to deployment. There are more deployment experts in the "ClickOnce and Setup & Deployment Projects" forum.

Thanks
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
YiChun Chen  Monday, May 04, 2009 8:26 AM
This is a feature of the MSI installation (see MSDN topic on MSI Resiliency). Basically, when MSI installs the shortcuts they are associated with an MSI component. When the shortcut is invoked, MSI checks to make sure all the installed stuff that is also associated with the same MSI component (files, registry entries, etc.) are correctly installed. If not, it will open the install package and attempt to (re)install them. There are a number of things that can trigger the resiliency feature. One of these can occurwhen the shortcuts are being installedto aper-user locationinstead of to per-machinelocation. In this scenario, the shortcuts are being installed for the user only and are "advertised" for other users. When another user logs in, MSI detects that the MSI components associated with it are not installed for the new user and runs the install.

You can make sure this doesn't happen by ensuring all MSI components are being installed to only per-machine locations (registry values in HKEY_LOCAL_MACHINE, data files in appropriate "all users" location, etc.).

There are also things you can do to disable resiliency on a per-component basis (I think), but you would need to read up on the MSI Resiliency and per-user vs per-machine installation information on MSDN.
ColbyRingeisen  Monday, May 04, 2009 3:13 PM
We are developing a product. We can't tell to useres to keep installer files in file system. What if they installed our product using cd-rom?

My over all concern is....How to remove this feature fro my complete product?


Thanks

Rajesh
Rajeshaz09  Tuesday, May 05, 2009 10:14 AM
I resolved this issue by adding new property to the MSI.
DISABLEADVTSHORTCUTS=1


I used post build script to automate this.

cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOuputPath)" "INSERT INTO Property(Property, Value) VALUES ('DISABLEADVTSHORTCUTS', '1')"

Rajesh A
S7 Software
  • Marked As Answer byRajeshaz09 Monday, August 10, 2009 1:46 PM
  •  
Rajeshaz09  Monday, August 10, 2009 1:46 PM

You can use google to search for other answers

Custom Search

More Threads

• setup project, launch application upon installation
• deployment problems
• Override the installer
• Best MSI information source / Best MSI tool
• ClickOnce Deployment Error
• avoid Shortcut to call installer again when file is deleted?
• Create an 1) installer with .net 2.0 + program files 2) usb run no installation.
• + Exception occurred during store operation.
• Building Setup project from Command Line --> automatic increment of Product Version?
• file access is denied