79323
Jul 15, 2009, updated at 12:19:51 (UTC)
4922
3
0
Programm gesucht um Link zu Dateien auf Netzlaufwerken zu erstellen
Hallo,
für ein Intranet benötige ich ein Programm, welches sich am Besten in das Kontextmenü des Explorers anheftet und dort dann den Link zu einer Datei oder Ordner in die Zwischenablage kopiert. Da nicht zwingendermaßen bei jedem Benutzer die Laufwerke auf dem gleichen Buchstaben gemappt sind, müsste das Programm den Buchstaben in Server + Freigabe umwandeln.
Kennt ihr so ein Programm?
Vielen Dank
seejay
Kennt ihr so ein Programm?
Vielen Dank
seejay
Please also mark the comments that contributed to the solution of the article
Content-Key: 120527
Url: https://administrator.de/contentid/120527
Printed on: April 24, 2024 at 14:04 o'clock
3 Comments
Latest comment
Ich habe sowas mal mit einem Script für Outlook zusammengebaut:
erstelle eine Datei mit Namen path.vbs mit folgendem Inhalt:
'--snipp UncPath.vbs
Option Explicit
Dim ol, mail
Dim strUncPfad, WShNetwork, coldrives, i, strPath
Dim fso, path, DriveLetter
Dim Debug
Debug=False ' auf TRUE setzen für Meldungen
' übergebenen Pfad vom Explorer auslesen
Set fso = CreateObject("Scripting.FileSystemObject")
if Debug then wscript.echo fso.GetAbsolutePathName(wscript.arguments(0))
path=fso.GetAbsolutePathName(wscript.arguments(0))
Set fso = nothing
DriveLetter = Ucase(Left(path, 1))
path = Mid(path,3)
if Debug then Wscript.Echo "DriveLetter " & DriveLetter & " path:" & path 'Ausgabe des ersten Zeichen
Set WshNetwork = Wscript.CreateObject("Wscript.Network")
Set colDrives = WshNetwork.EnumNetworkDrives
On Error Resume Next
If colDrives.Count > 0 Then
For i = 0 To colDrives.Count - 1 Step 1
If colDrives(i)=DriveLetter & ":" then
if Debug then wscript.echo colDrives(i) & " ist " & colDrives(i+1)
strUncPfad=colDrives(i+1)
End if
Next
End If
Set WshNetwork = nothing
Set coldrives = nothing
if (len( strUncPfad) = 0) then
strUncPfad=DriveLetter & "\"
else
if Debug then wscript.echo "UNC-Pfad: [" & strUncPfad &"]"
End if
strPath = strUncPfad & path
if Debug then wscript.echo "strUncPfad + path: [" & strPfad & "]"
'Link an Outlook übergeben
Set ol = CreateObject ("Outlook.Application")
Set mail = ol.CreateItem(0)
mail.Display
with mail
.HTMLBody = "<HTML><BODY><A href=""file:///" & strPath & """>" & strpath & "</A> </BODY></HTML>" & mail.HTMLBody
End with
'--snapp UncPath.vbs
Diese Datei legst Du auf den Maschinen unter C:\ ab (geht ja Per Anmeldescript).
Auf den Maschinen muss jetzt noch folgende Registry eintrag vorgenommen werden.
Erstelle dafür eine *.reg mit folgendem Inhalt:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\Shell\Link an Outlook reichen]
[HKEY_CLASSES_ROOT\*\Shell\Link an Outlook reichen\command]
@="wscript c:\\Path.vbs \"%1\""
[HKEY_CLASSES_ROOT\Folder\Shell\Link an Outlook reichen]
[HKEY_CLASSES_ROOT\Folder\Shell\Link an Outlook reichen\command]
@="wscript c:\\Path.vbs \"%1\""
Nach dem man diese Regdatei ausgeführt hat, steht einem jetzt per Rechtsklick die Möglichkeit
"Link an Outlook reichen" zur Verfügung.
Das Snippet hab ich mal irgendwo hier im Forum gefunden
erstelle eine Datei mit Namen path.vbs mit folgendem Inhalt:
'--snipp UncPath.vbs
Option Explicit
Dim ol, mail
Dim strUncPfad, WShNetwork, coldrives, i, strPath
Dim fso, path, DriveLetter
Dim Debug
Debug=False ' auf TRUE setzen für Meldungen
' übergebenen Pfad vom Explorer auslesen
Set fso = CreateObject("Scripting.FileSystemObject")
if Debug then wscript.echo fso.GetAbsolutePathName(wscript.arguments(0))
path=fso.GetAbsolutePathName(wscript.arguments(0))
Set fso = nothing
DriveLetter = Ucase(Left(path, 1))
path = Mid(path,3)
if Debug then Wscript.Echo "DriveLetter " & DriveLetter & " path:" & path 'Ausgabe des ersten Zeichen
Set WshNetwork = Wscript.CreateObject("Wscript.Network")
Set colDrives = WshNetwork.EnumNetworkDrives
On Error Resume Next
If colDrives.Count > 0 Then
For i = 0 To colDrives.Count - 1 Step 1
If colDrives(i)=DriveLetter & ":" then
if Debug then wscript.echo colDrives(i) & " ist " & colDrives(i+1)
strUncPfad=colDrives(i+1)
End if
Next
End If
Set WshNetwork = nothing
Set coldrives = nothing
if (len( strUncPfad) = 0) then
strUncPfad=DriveLetter & "\"
else
if Debug then wscript.echo "UNC-Pfad: [" & strUncPfad &"]"
End if
strPath = strUncPfad & path
if Debug then wscript.echo "strUncPfad + path: [" & strPfad & "]"
'Link an Outlook übergeben
Set ol = CreateObject ("Outlook.Application")
Set mail = ol.CreateItem(0)
mail.Display
with mail
.HTMLBody = "<HTML><BODY><A href=""file:///" & strPath & """>" & strpath & "</A> </BODY></HTML>" & mail.HTMLBody
End with
'--snapp UncPath.vbs
Diese Datei legst Du auf den Maschinen unter C:\ ab (geht ja Per Anmeldescript).
Auf den Maschinen muss jetzt noch folgende Registry eintrag vorgenommen werden.
Erstelle dafür eine *.reg mit folgendem Inhalt:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\Shell\Link an Outlook reichen]
[HKEY_CLASSES_ROOT\*\Shell\Link an Outlook reichen\command]
@="wscript c:\\Path.vbs \"%1\""
[HKEY_CLASSES_ROOT\Folder\Shell\Link an Outlook reichen]
[HKEY_CLASSES_ROOT\Folder\Shell\Link an Outlook reichen\command]
@="wscript c:\\Path.vbs \"%1\""
Nach dem man diese Regdatei ausgeführt hat, steht einem jetzt per Rechtsklick die Möglichkeit
"Link an Outlook reichen" zur Verfügung.
Das Snippet hab ich mal irgendwo hier im Forum gefunden