First things first:
Why are you trying to open a .lnk file?
Why don't you just open what it points to?
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
No, but if you browse to the link location and copy it from abcd.lnk to abcd.dat, you can then open it with notepad or Textpad and it will show you the location.
...since you'll only need to do that once, right?
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
Is there anything wrong with the syntax used to open the exe files using c++ ?
Your example calls it Runsnake.exe, but it should be Runsnake.bat if it is a batch file.
Also, since it does not have spaces in the name, you do not need to wrap it in extra quotes.
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
I was talking about this:
system("\"D:\\runsnake.exe\"");
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
Just look in the .lnk file or right-click and select Properties. Then copy the location right out of the link file and put it into your 'launch' program. Then you don't need all this Rube Goldberg crap.
An .exe to call a .bat file to call a .lnk file to open a program? Get real!
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
Just look in the .lnk file or right-click and select Properties.
I guess I was assuming that had already been done :$
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402