Jump to content

Recommended Posts

Posted

Good morning, I'm having problems with the quotes and I can't do it, I want to pin a shortcut to the taskbar using the pttb.exe file, from a batch file it works but when I take it to autoit it gives me an error

RunWait(@ComSpec & ' /c "' & @ScriptDir & '\pttb.exe "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" to PinToTaskbar"')

THANK YOU

  • Developers
Posted (edited)

this might work:

RunWait(@ComSpec & ' /c "' & @ScriptDir & '\pttb.exe" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" to PinToTaskbar')

else post the working command when running for the commandline.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
  On 3/23/2023 at 4:26 PM, Jos said:

this might work:

RunWait(@ComSpec & ' /c "' & @ScriptDir & '\pttb.exe" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" to PinToTaskbar')

else post the working command when running for the commandline.

Expand  

Unfortunately it doesn't work and I don't know why.

the batch code is this

pttb.exe "%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe" to PinToTaskbar

here is the pptb.exe

https://github.com/0x546F6D/pttb_-_Pin_To_TaskBar

Posted

Leave out the 'to PinToTaskbar', that is just a comment indicating what the command is supposed to do and must not be part of the commandline.

Check where the pttb.exe is located. Is this in the scriptdirectory or accessible via the path environment?

It's often better to include the full path to external programs. 

  • Developers
  • Solution
Posted

 

  On 3/23/2023 at 4:35 PM, chelo32 said:

the batch code is this

pttb.exe "%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe" to PinToTaskbar

here is the pptb.exe

Expand  

This should be exactly the same as when running it from the x86 cmd.exe prompt:

RunWait(@ComSpec & ' /c pttb.exe "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" to PinToTaskbar')

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
  On 3/23/2023 at 7:27 PM, Jos said:

 

This should be exactly the same as when running it from the x86 cmd.exe prompt:

RunWait(@ComSpec & ' /c pttb.exe "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" to PinToTaskbar')

 

Expand  

Thank you very much Jos, it did not cross my mind to remove & @ScriptDir & , as something simple can drive you crazy. THANK YOU

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...