Hi,
to simply send files by using the Windows Explorer sendto context menu you have to create an Outlook shortcut in the shell:sendto folder.
The folder can be determined by
PS D:\> [System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::SendTo)
Or open the folder in the Explorer by open the run window (WinKey + R) and open shell:sendto.
The create a shortcut to the outlook.exe file and the /a switch
Or by powershell by using scriptinghosts COM object
$oShell = New-Object -ComObject ("WScript.Shell") $oShortCut = $oShell.CreateShortcut(([System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::SendTo))+"\Outlook.lnk") $oShortCut.TargetPath="C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE" $oShortCut.Arguments="/a" $oShortCut.WindowStyle = 1 $oShortCut.Description = "Send with Outlook" $oShortCut.Save()
Michael
Hello
Thank You very much for this genius PS-Script. Is it possible to change the script to create this Outlook shortcut in the folder sendto to a remote computer?
What should I change in the script?
Kind regards,
Pascal