0

I am trying to grab the target value in a .lnk file and have tried using the methods specified in an older post here on StackOverflow:

Unfortunately the code does not seem to work on some lnk files. The sample of the .lnk I am testing this on is this:

C:\WINDOWS\system32\cmd.exe /c start test.vbs&start explorer GRE&exit

The value that is being returned is always null. Any suggestions?

Community
  • 1
  • 1
Tester
  • 1

1 Answers1

0

The mentionned solution allos one to process .lnk files the same way symbolic links are processed on Linux. But the .lnk file you're showing there do not open a file : it instead executes some commands and return the result. This will require a different kind of processing. In fact, you'll have to modify the lnk parser to detect if file is in fact a command, then run that command and grab the command result.

in other words : here you don't want to open a file, but launch a command, which, under Windows, OS, is not the same kind of operation.

Riduidel
  • 22,052
  • 14
  • 85
  • 185