منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : ازاي اعمل shortcut file
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم عندي هذا الملف في المسار ده 
C:\Program Files\king\Debug\King Master 4.1.0.exe
ازاي اعمل shortcut للملف ده King Master 4.1.0.exe علي الديسك توب او سطح المكتب
هل يلبي الرابط ماتريد؟
(12-11-20, 02:58 PM)سعود كتب : [ -> ]هل يلبي الرابط ماتريد؟

الله يبارك لك اخي سعود
(12-11-20, 02:58 PM)سعود كتب : [ -> ]هل يلبي الرابط ماتريد؟

بس هو بيعمل الشورت كات في نفس المجلد مش علي سطح المكتب

(12-11-20, 08:15 PM)اليوم السابع كتب : [ -> ]
(12-11-20, 02:58 PM)سعود كتب : [ -> ]هل يلبي الرابط ماتريد؟

بس هو بيعمل الشورت كات في نفس المجلد مش علي سطح المكتب

هذا هو الكود بفك ضغط ملف بجانب المشروع ومن ثم بأخذ ملف من المجلد شورت كات علي الديسك توب ولكن بيضع الملف داخل نفس المجلد وليس سطح المكتب 
كود :
Dim archive As IArchive = ArchiveFactory.Open("Debug.rar")
       For Each entry In archive.Entries
           If Not entry.IsDirectory Then
               Console.WriteLine(entry.Key)
               entry.WriteToDirectory("C:\Program Files\king1", New ExtractionOptions With
                             {.ExtractFullPath = True, .Overwrite = True})
           End If
       Next
       Dim path As String = "C:\Program Files\king1\Debug\King Master 4.1.0.exe"
       Dim thing As New WshShell
       Dim shortcut As IWshShortcut
       If IO.File.Exists(path) = False And IO.Directory.Exists(path) = False Then
           MsgBox("path is not correct")
           Exit Sub
       End If
       shortcut = CType(thing.CreateShortcut(path & ".lnk"), IWshShortcut)
       shortcut.TargetPath = path
       shortcut.Save()
كود :
Dim DesktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Dim lnkPath As string = DesktopPath & "Test.lnk"

       Dim thing As New WshShell

       Dim shortcut As IWshShortcut
shortcut CType(thing.CreateShortcut(lnkPath), IWshShortcut)
shortcut.TargetPath = path
shortcut.Save()
(13-11-20, 02:30 PM)Anas Mahmoud كتب : [ -> ]
كود :
Dim DesktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Dim lnkPath As string = DesktopPath & "Test.lnk"

       Dim thing As New WshShell

       Dim shortcut As IWshShortcut
shortcut CType(thing.CreateShortcut(lnkPath), IWshShortcut)
shortcut.TargetPath = path
shortcut.Save()

شكرا اخي ولكن لم يحدث شئ ما زال لا يعمل شورت كات
(13-11-20, 02:30 PM)Anas Mahmoud كتب : [ -> ]
كود :
       Dim path As String = "C:\Program Files\king1\Debug\King Master 4.1.0.exe"
Dim DesktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Dim lnkPath As string = DesktopPath & "\Test.lnk"

       Dim thing As New WshShell

       Dim shortcut As IWshShortcut
shortcut CType(thing.CreateShortcut(lnkPath), IWshShortcut)
shortcut.TargetPath = path
shortcut.Save()
(14-11-20, 02:06 AM)got كتب : [ -> ]
(13-11-20, 02:30 PM)Anas Mahmoud كتب : [ -> ]
كود :
       Dim path As String = "C:\Program Files\king1\Debug\King Master 4.1.0.exe"
Dim DesktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Dim lnkPath As string = DesktopPath & "\Test.lnk"

       Dim thing As New WshShell

       Dim shortcut As IWshShortcut
shortcut CType(thing.CreateShortcut(lnkPath), IWshShortcut)
shortcut.TargetPath = path
shortcut.Save()

الله ينور عليك