Si ho trovato qualcosa e l'ho adattato alle mie esigenze, per ora funziona ma continuo a testarlo.
Ti posto la versione originale che ho trovato, se gli dai un'occhiata dovrebbe essere facile modificarlo e adattarlo. Io l'ho inserito in un programmino che prima mi copia da CD il programma sull'HD e poi crea il collegamento sul Desktop.
Vorrei cercare anche di far mettere un link sul menu Avvio e ci sto lavorando.
Fammi sapere se ti può servire. Ciao.
codice:'''' 'This line should be in the declarations portion Private fso as New FileSystemObject '''''' Private Sub cmdCreateShortcut_Click() Dim fldrnam as String, rslt as Long, shortcutname as String On Error Resume Next fldrnam = lvwList.SelectedItem.SubItems(5) If fso.FolderExists(fldrnam) Then fldrnam = Left$(fldrnam, Len(fldrnam) - 1) shortcutname = lvwList.SelectedItem.text & " " & lvwList.SelectedItem.SubItems(2) Call CreateShortCut(fldrnam, shortcutname) End If End Sub Sub CreateShortCut(fldrname as String, shortcutname as String) Dim wss as Object, link as Object, DesktopPath as String Dim lnkname as String, favname as String, FavoritesPath as String Set wss = CreateObject("WScript.Shell") lnkname = shortcutname & ".lnk" DesktopPath = wss.SpecialFolders("AllUsersDesktop") FavoritesPath = wss.SpecialFolders("Favorites") favname = fso.BuildPath(FavoritesPath, lnkname) lnkname = fso.BuildPath(DesktopPath, lnkname) Set link = wss.CreateShortCut(lnkname) link.Description = shortcutname & vbCrLf & "AutoCAD Project Folder" link.IconLocation = "C:\Program Files\AutoCAD 2004\acad.exe, 1" link.TargetPath = fldrname ' If the window is minimized or maximized, the system restores it to its original size and position. link.WindowStyle = 1 ' Activates the window and displays it as a maximized window. ' link.WindowStyle = 3 link.WorkingDirectory = fldrname link.Save fso.CopyFile lnkname, favname

Rispondi quotando