Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run shortcut files created by Google Chrome failing. QM Bug?
#1
Hi Gintaras
I'm using Quick Macros Version 2.4.12.2

I use Chrome profiles, and have used "Create desktop shortcut" from Chrome for some of the profiles.
I can launch the Chrome shortcuts from Windows 10 File Explorer.
When I use Quick Macros to run a shortcut file created from Chrome, I get this error message: The specified path does not exist. Check the path, and then try again.
When I copy notepad.lnk into the same folder, I can launch it using Quick Macros run ok.
My test code in a QM function is: run "C:\tempc\z-test - Chrome.lnk"

I've attached an example shortcut file: z-test - Chrome.lnk.uuencode.txt

Thanks for your help,
John


Attached Files
.txt   z-test - Chrome.lnk.uuencode.txt (Size: 3.2 KB / Downloads: 112)
#2
I can't test your shortcut. My Chrome profile shortcuts don't have this problem.

Macro Macro3114
Code:
Copy      Help
;run "$program files$\Google\Chrome\Application\chrome.exe" "--profile-directory=''Profile 1''" "" "*" ;;test - Chrome
;run "Q:\Test\test - Chrome.lnk"
run "$desktop$\Person 1 - Chrome.lnk"
#3
Thank you for checking Gintaras.
Regards, John
#4
Hi Gintaras
I've moved to a new PC and still have the problem that Quick Macros v2.4.12.2 does not launch Windows shortcut .LNK files created in Google Chrome.

In your test above did you create the shortcut in Chrome using: Chrome / Menu (three vertical dots at top right) / More tools / Create shortcut / tick "Open as Window" / Create  ?
Note that the shortcuts created in Chrome also create a Windows App that appears in Windows / Settings / "Apps & features".

I can launch shortcuts created in Chrome using PowerShell "start" or cmd.exe /c.
When I try to launch them use QM "run" I get: Windows cannot find '<pathname>.lnk'. Make sure you typed the name correctly, and then try again.
I get this also if I use QM-run to run a batch file that starts the .LNK file
eg batch file contains: cmd.exe /c "J:\OneDrive\Desktop\Links\Messages for Web.lnk"

Thanks,
John
#5
Now I can reproduce it.

OS resolves shortcuts in a wrong way. If the shortcut is created by a 64-bit app to a file in the 64-bit Program Files folder, when a 32-bit program tries to execute the shortcut, OS changes the target path to the 32-bit Program Files folder, even if the redirected target path does not exist.

Workaround 1: in macro use the shortcut target, not the .lnk file. Drag and drop the shortcut to QM without Ctrl and it inserts run with the shortcut target:
 
Code:
Copy      Help
run "C:\Program Files\Google\Chrome\Application\chrome_proxy.exe" " --profile-directory=''Profile 1'' --app-id=nbmjmoobhfdebnjnphkjefkgbhpkkghc" "" "*"


Workaround 2: if want to use .lnk, create another .lnk from a 32-bit app, eg QM, and use it in the macro.
 
Code:
Copy      Help
CreateShortcut "$desktop$\Chrome-32.lnk" "C:\Program Files\Google\Chrome\Application\chrome_proxy.exe" "--profile-directory=''Profile 1'' --app-id=nbmjmoobhfdebnjnphkjefkgbhpkkghc"

I also tested the same in LibreAutomate, in 64-bit and 32-bit .exe script. If launched from the editor, which is 64-bit, both work. If launched from Explorer, the 32-bit version fails. Maybe it has to do with environment variables like %ProgramFiles%, but it seems changing them in macro with SetEnvVar does not help.
#6
Excellent Gintaras.
Workaround 1 is best for me.
Thank you.


Forum Jump:


Users browsing this thread: 1 Guest(s)