Jump to content

Problem with quotes


Go to solution Solved by Jos,

Recommended Posts

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

Link to comment
Share on other sites

  • Developers

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.
  :)

Link to comment
Share on other sites

4 minutes ago, 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.

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

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

  • Developers
  • Solution

 

2 hours ago, chelo32 said:

the batch code is this

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

here is the pptb.exe

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.
  :)

Link to comment
Share on other sites

17 hours ago, 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')

 

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

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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