chelo32 Posted March 23, 2023 Share Posted March 23, 2023 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 More sharing options...
Developers Jos Posted March 23, 2023 Developers Share Posted March 23, 2023 (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 March 23, 2023 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 More sharing options...
chelo32 Posted March 23, 2023 Author Share Posted March 23, 2023 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 More sharing options...
OJBakker Posted March 23, 2023 Share Posted March 23, 2023 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 More sharing options...
Developers Solution Jos Posted March 23, 2023 Developers Solution Share Posted March 23, 2023 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 More sharing options...
chelo32 Posted March 24, 2023 Author Share Posted March 24, 2023 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now