Showing Shortcut arguments

Hello,
I would like to view shortcuts in Dopus and see if they have arguments like "(Disk Letter)\Assassin's Creed Chronicles - Trilogy\India\Binaries\Win32\ACCGame-Win32-Shipping.exe" -seekfreeloadingpcconsole

Can i view this -seekfreeloadingpcconsole in Dopus?

Thank you
Mondriaan

I don't think it's built-in, but you could use ExifTool:

exiftool.exe -CommandLineArguments {filepath}
pause

Needs to be an MS-DOS button.

Ok thank you, its very helpfull.

You could do this in the file display with a simple script column:

Download it and drag it to Preferences / Toolbars / Scripts, and a new column will be available under the Script category.

Script code in the file, for reference:

function OnInit(initData)
{
	initData.name = "Shortcut Arguments Column";
	initData.version = "1.0";
	initData.copyright = "(c) 2020 Leo Davidson";
	initData.url = "https://resource.dopus.com/t/showing-shortcut-arguments/36349/4";
	initData.desc = "A column showing shortcut arguments. Accompanies the built-in Target column.";
	initData.default_enable = true;
	initData.min_version = "12.20";

	var col = initData.AddColumn();
	col.name = "ShortcutArguments";
	col.method = "OnShortcutArguments";
	col.label = "Shortcut Arguments";
	col.justify = "left";
	col.autogroup = true;
}


function OnShortcutArguments(scriptColData)
{
	var item = scriptColData.item;
	if (item.is_dir) return;
	if (item.ext.toUpperCase() != ".LNK") return;

	try
	{
		var wsh = new ActiveXObject("WScript.Shell");
		var lnk = wsh.CreateShortcut(item);
		scriptColData.value = lnk.Arguments;
	}
	catch(e)
	{
	}
}
1 Like

Thank you, i also figured the exiftool out, very usefull command, thanks for the Dopus script.

1 Like

Using CreateShortcut() to get the arguments is a nifty idea! :+1:

1 Like

and supposing that i want to check if a known 'lnk' file has a keyboard shortcut defined (eg. Ctrl+Alt+K) how do i do? thanks in advance

i found the answer, it is enough change from the above code
scriptColData.value = lnk.Arguments;
to
scriptColData.value = lnk.HotKey;