Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to automate a troublesome startup ?

Status
Not open for further replies.
Aug 20, 2009
115
AU
PushBullet no longer opens reliably at Windows Startup. If I end its multiple entries in Task Manager's Background Processes, then clicking on the StartUp shortcut becomes effective. So I need a batchfile (?) that checks for those multiple entries in Task Manager's Background Processes, and ends them, and then activates the startup shortcut. A shortcut to this process can replace the PushBullet shortcut in StartUps.
 
You admitted to not following previous advice. I lost interest at that point.
 
I did, but I also wrote later that I OBVIOUSLY did not understand the situation, as it makes no sense to shutdown what you are trying to achieve. A pity you have lost interest - I'm not being obstinate, but uncomprehending.

If your interest is not completely dead, could you tell me what it is I have to stop - and what it is I should do in Powershell, since taskkill in the batchfile is unreliable.

It seems you have already given me Powershell code - what do I do with that ? - paste it into a text file and call it whatever.cmd ?
 
Download, unzip and run AutoRuns... like I advised in post 11.

Find the entry (or entries) for Pushbullet and remove the tick against their checkbox(es). This will stop them running from startup.

Close AutoRuns and reboot.

Your batch file running from a shortcut should now work.
 
Thank you for not quitting. I have found a 'Run Pushbullet at startup' in PushBullet Settings which I have disabled. We'll see what difference that makes ...
You clearly wrote Autoruns, which I already have installed; but I read Autohotkey and that really confused me. You can see you are dealing with a basketcase, rather than an obdurate.
 
AutoHotkey, like PowerShell is a scripting language. It's useful for automating things, like If process exists, do this. As such, it's often more flexible than a batch file.

AutoRuns is quite different. It lists everything that runs automatically from startup, grouped by the different startup methods (user startup folder, registry, scheduled task, etc.).
 
Unticking the 'start with windows' in PushBullet was not enough to solve the problem. There was still a blocking entry in Background Processes, which when ended, allowed PushBullet launch. I have found a pushbullet.lnk in AutoRuns - and unticked it - We'll see if that helps. I am sure it links to the batchfile NOT the program. To my mind it should prevent running the batch and so the launching of PushBullet.

So let's go with the premise that Powershell is more effective than a batchfile; how do I do the batchfile equivalent in Powershell ?
 
Can you post a screenshot of the entry you disabled in Autoruns?
 
PB_link_rxufmc.jpg
 
That's almost undoubtably created by Pushbullet itself and nothing to do with any batch file.

Can you post the batch file?
 
Disabling did not achieve success; moreover, the PATH clearly points to the batchfile - C:\data\batch files\dos or cmd\pushbullet.bat
 
@echo off
taskkill /IM pushbullet.exe /F
timeout 2
taskkill /IM pushbullet.exe /F
timeout 2
taskkill /IM pushbullet.exe /F
timeout 2
"c:\program files\pushbullet\pushbullet.exe
 
You're right. I just looked at the startup location, not the path.

What I don't understand is why you even need a batch file (or alternative) at all now after "Unticking the 'start with windows' in PushBullet".

If Pushbullet is still starting automatically even after "Unticking the 'start with windows' in PushBullet" then the startup location should show in Autoruns.

PS - I can see why you had the errors with the batch file.
 
You mean there are still errors in the batch file ?
The one I referred to was an unintended addition of text that happened accidentally, and which I removed, so it is not visible NOW.

Please point out the errors to me, maybe fixing them will solve my problem.

I will test this, but without the batchfile and with 'start with windows' unticked, I expect NO launching.

Sure enough, NO sign of launching; and NO entry in Background Processes.

You have not given me a way to do it in Powershell - have you changed your mind about Powershell ?


 
If taskkill is used against a non-existing process it will show an error.

Say you have two background pushbullet processes running. Your batchfile should kill them both... but the third call to taskkill will have no named process to work on so will show an error.

PowerShell's Stop-Process cmdlet is smarter. It'll kill all instances of the named process without the command needing to be repeated... and, if used with -ErrorAction SilentlyContinue, will just move to the next instruction (if any) without any error. However, PowerShell scripts are disabled in the OS by default so this needs to be taken into account.

AutoHotkey, by comparison, allows for a If process exists construct which will do the same as PowerShell's Stop-Process and exit gracefully once the condition is no longer 'True', i.e. if the process no longer exists.

As a result, both PowerShell and AutoHotkey are more 'graceful' than taskkill.

This is all beside the point... i.e. if Pushbullet didn't start automatically then surely you wouldn't have a problem?

As a matter of interest:
1) What Windows edition and version are you using?
2) What version of Pushbullet do you have installed?

I ask because I may have to install Pushbullet myself just to see how it sets itself up.

BTW, looking at your Autoruns screenshot... remove the tick against the 'autohotkey.lnk' entry for the time being so it doesn't confuse the issue any further.

It's now 5 am here so I'm going to sleep.
 
'It's now 5 am here so I'm going to sleep.' A VERY wise move.

"if Pushbullet didn't start automatically then surely you wouldn't have a problem?"
I WANT Pushbullet to start - which is why I originally baulked at stopping it - even if I misunderstood what you meant.

As a matter of interest:
1) What Windows edition and version are you using? - x32Win10ProV21H1
2) What version of Pushbullet do you have installed? - It installs v338 and IMMEDIATELY updates to v400.

BTW, looking at your Autoruns screenshot... remove the tick against the 'autohotkey.lnk' entry for the time being so it doesn't confuse the issue any further.

I'm reluctant to disable autohotkey.lnk, because I use it extensively to enter text strings. Confusion arose from my (inexplicable) misreading of Autoruns as Autohotkeys - I don't think that is a good reason to interfere with its workings.
 
My mistake... I thought you were using AutoHotkey to try to launch Pushbullet. Ignore what I said.

Well, some progress. I prepped a clean install of Win 10 Pro 21H1 and installed Pushbullet then rebooted. Before connecting to the internet I did a search with Autoruns and found an entry for it:

pb_autoruns_qysm9x.png


I checked Task Manager and found 2 Pushbullet background processes... same as you.

pb_background_processes_qxiiy4.png


I tried to run Pushbullet from a desktop shortcut and couldn't get it to appear. I ended both background processes and tried the desktop shortcut again... to no avail.

I went back to Autoruns and removed the tick against Pushbullet then rebooted. This time there were no Pushbullet background processes... but still the desktop shortcut didn't work. So... similar symptoms to you but not identical.

I rebooted, connected to the internet then tried the desktop shortcut again... and saw Pushbullet updating:

pb_updating_gifmrm.png


I rebooted and the desktop shortcut worked.

I went back to Autoruns and put the tick back in the Pushbullet entry and rebooted.

Pushbullet now starts automatically so I don't need to use the desktop shortcut. (I haven't gone any further 'cos I have neither Google nor Facebook accounts.)

Conclusion: I don't think you need a script to automate opening Pushbullet at all. I think there's some glitch with your installation, probably in the entry for Pushbullet in the HKCU registry 'Run' key. Have you tried uninstalling/reinstalling to see if this fixes things? Post back with the result.

If a re-install doesn't fix it for you then I'll do another clean install and check I can duplicate the issue and what I did to fix it. I'll also copy the registry 'Run' key before and after Pushbullet is fixed in order to compare the two.
 
I did a fresh install earlier this month, and sometimes it launched and other times it didn't.
 
Was this 'fresh install' over the top of the existing install or did you uninstall using something like Revo Uninstaller Free which also checks afterwards for left-overs (especially registry entries) and removes them?
 
It was after using Revo.
I have evidence from another program that Revo does not remove ALL traces of a program. When that other program was re-installed it remembered settings.
 
Well, IMO, something odd is causing Pushbullet to sometimes launch automatically as more than one background process.

I've been watching the 'Processes' tab in Task Manager immediately after each restart.

If Pushbullet launches once as a background process then it will change after ~10 seconds... it will disappear from the 'Background processes' list and re-appear in the 'Apps' list, i.e. a successful launch of its 'Welcome/Sign in' dialog.

Conversely, if it launches twice as background processes then it fails... and subsequently trying to launch from a shortcut will also fail 'cos that'll launch a third background process, blocked by the others.

I suggest you watch Task Manager too, to see if you can confirm this behaviour.

You see that in Autoruns I filtered for pushbullet (shown at a) and found only one autorun entry... in the registry. But look at the -show false switch that's used (shown at b):

pb_show-false_tyobiy.png


This shows that the program author clearly wants Pushbullet to run as a background process with no GUI initially (and I think I know why). An export of the relevant registry 'Run' key shows this clearly:
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"Pushbullet"="\"C:\\Program Files (x86)\\Pushbullet\\pushbullet.exe\" -show false"

I suspect the program author knows that the GUI will fail if there's no internet connection. I suspect the reason Pushbullet is launched as a background process is so it can test for internet connectivity. I wouldn't be surprised if you use Wi-Fi rather than ethernet. (Am I right?) Unfortunately Windows 10 takes longer than previous versions to signal that internet connectivity has been established (especially with Wi-Fi as this can vary). I suspect there's a timeout within Pushbullet that is insufficient for Windows 10. All this is supposition but, if I'm right, you will have to run Pushbullet from a script... and that script will need to check reliably for an internet connection before ever running Pushbullet.

I suggest you run Autoruns again (using the right-click Run as administrator option) and filter for pushbullet. The reason for this is because, if I'm right, running Pushbullet from an autorun entry is never going to be reliable.

Hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top