

I get a "Optional parameters must specify a default value. LNK files can be created by the user, or automatically by the Windows operating system. They are shortcut files that link to an application or file commonly found on a user’s desktop, or throughout a system and end with an. IconLocation = Application.ExecutablePathĪnd everything works. LNK files are a relatively simple but valuable artifact for the forensics investigator. WorkingDirectory = Application.ExecutablePath OShortCut = oShell.CreateShortcut(My. & "\" & PageTitleLabel.Text & ".lnk")


' Requires reference to Windows Script Host Object Modelĭim oShell As IWshRuntimeLibrary.WshShellĭim oShortCut As IWshRuntimeLibrary.WshShortcut Optional ByVal eWinStyle As WshWindowStyle = vbNormalFocus, Optional ByVal iIconNum As Integer) Private Sub Create_ShortCut(ByVal sTargetPath As String, ByVal sShortCutPath As String, ByVal sShortCutName As String, _ Windows-created LNK files are generated when a user opens a local or remote file or document, giving investigators valuable information on a suspect’s activity. I can write date from that link to a table I just can’t seem to create the link using VBA.Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.ClickĬreate_ShortCut(Application.ExecutablePath, My., PageTitleLabel.Text, "/url=" & WebBrowserURL.Text, "",, Application.ExecutablePath) LNK files can be created by the user, or automatically by the Windows operating system. NOTICE: I want to create a link to this file. Can someone please shed a little light on the subject? Seems pretty straightforward, but I guess I’m missing something here. I entered a break point, clicked the button and F8-through the code and I get this message: I thought I could use something like this in the code: In the SourceDirectory (which uses a Table as it’s source I update the full path to the file in the Table), I have a full path to the. I have a From named ‘Reconciliation’ and on this form is a TextBox named ‘SourceDirectory’. I am experimenting with this code, but getting an error:ĭoCmd.TransferText acImportDelim,, "Data_After", "Me!" & "Data_After.csv", True, ""
