c# - How to keep application shortcuts current/in sync? -
checks for I have an application auto updater new update, the current folder, including app in a new folder. New version in app folder XE + Kdiel makes copy
Everything is working perfectly without some compensation, but a little messy - become invalid shortcuts created during the original installation
Is there any way to programmatically correct those shortcuts?
To identify can update a shortcut (folders and locations using WshShell object), and Skriptingkfailsistmobjekt changes to do.
about here is an article on MSDN WshShell object:
This is an example of replacing a shortcut link in VB Script:
subset replaced shortcut (folder, target, Lcshykshetr) to oFso = CreateObject ( "Skriptingfailsistmobjekt") set oFolder = oFso.GetFolder (folder) set oFiles = oFolder.F iles for each Ofail in Ofailon If Elsiis (Ofo. gate Akstenshnnam ( Opile .name)) = "LNK" set OLNK = OA Acelkkelsortkt (Ofail. Path) If Instvr (1, Oelank. Lkshitpath, goals, 1) & lt; & Gt;] Then Ollank Change Lcshypeth = (Oelank. Lcshypet, target, target). Onnake Save End if End End Next End Sub
Comments
Post a Comment