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 Chris Miller 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.
 
How about removing that program from Startup completely and creating a task in Task Manager that runs "after" startup and launches the program ?
Would that not solve the problem ?

I've got nothing to hide, and I demand that you justify what right you have to ask.
 
I think pmonett is likely on the right path, but to further expand on what you asked see the link:
Then you would simply add another line to the file to launch the program from its location. Pretty simple, but also unnecessary if you do it as pmonett lists above.

Learning - A never ending quest for knowledge usually attained by being thrown in a situation and told to fix it NOW.
 
It sounds like it might; but I am not aware of the ability to do that in Task Manager; theoretically Task Scheduler might, but it is triggered by 'the clock', not an event like Windows StartUp. I'd love to discover HOW that can be done.
 
Using Task Scheduler may be overly complex. All the OP needs is for a process to not run until a wait timer expires.

Why not use a batch file in the startup folder and call the built-in timeout command? For example, a 10 seconds delay:

Code:
TIMEOUT /T 10
START "" "C:\Program Files (x86)\Pushbullet\pushbullet.exe"

Hope this helps...
 
I've discovered I was wrong about Task Scheduler - it CAN be triggered by an event, as well as the clock.

I've also discovered that it is not just a delay that is needed to allow PushBullet to launch. Somehow, up to three PushBullet entries can appear in Task Manager's Background Processes. If THEY are ENDed, PushBullet will launch faultlessly. Someone kindly constructed a batch file for me that ENDs those background processes before running the PushBullet launcher. And yes, the batch file incoporated delays. I believe the problem has been solved.
 
Turns out that it is inconsistent - unreliable (as I have found macros/batch-files to usually be).
 
Surely the solution is to not have the PushBullet executable running from startup at all but to use a script to a) check for its presence, b) fire it to do what you want; and c) stop the pushbullet process afterwards?

Perhaps use PowerShell or something like AutoHotkey to start and stop PushBullet?
 
I understand 'a)', but do not know how to implement that; I do NOT understand 'b)'; and as for 'c)', stop it after what ?
 
You don't know how to stop PushBullet from running automatically? Try using the small, free, portable Autoruns and remove the tick from the PushBullet startup process.

Pseudo-code for b) and c):

Code:
[pre]pb = <filepath to pushbullet.exe>
If process $pb not exist
[indent]Start $pb
Do 
[indent]<whatever1>
<whatever2>
<whatever...?>
End Do[/indent]
Stop $pb[/indent]
EndIf[/pre]

(You shouldn't even need the conditional EndIf statement.)
 
I want PushBullet to launch and run - why include a STOP in the batchfile ?
 
Because leaving it running would interfere with the next time it was called. just remove the STOP statement and remember to close PushBullet manually.
 
As I said before, the batch file is unreliable. It has worked, but it has also failed - and just left an open "DOS" window.
I'm quite confused by the autohotkeys suggestion.
By experimentation I've established that "taskkill /IM pushbullet.exe" can END the PushBullet Background Process in Task Manager, but can also fail to end it. PushBullet will not launch if there is a PushBullet Background Process left in Task Manager, but will if that PushBullet Background Process is ended. So the issue seems to have become the ENDing of ALL the PushBullet Background Processes in Task manager.
 
Are you using the /F parameter to force close the pushbullet process(es)?
Code:
taskkill /IM pushbullet.exe /F
 
No, I did not use /F - that may well be the solution to my problem, the ending does not always happen.

I have now included the '/F', and will have to experience a few reboots to see if that fixed it.

At the next reboot, a Pushbullet Background Process prevented launching of Pushbullet; so '/F' was NOT the solution I needed.
 
So you obviously still have it autostarting, which you were advised to put a stop to in the second post.

Instead of a batch file using taskkill /IM pushbullet.exe /F; try PowerShell:

Code:
Get-Process pushbullet|Stop-Process

or, perhaps better;

Code:
Get-Process pushbullet -ErrorAction SilentlyContinue | Stop-Process -PassThru
 
I did not 'stop it as advised' because it made no sense to me to stop PushBullet when I want it opened. I obviously do not understand the situation. Before using Powershell, I want to report, that the launch process has proceeded satisfactorily several times; however,when it does not succeed, a 'DOS' window is left open with comments about Timeout and that Pushbullet can not be found. If I then look at the Background Processes in Task Manager, I find that there are one or more PushBullet entries there; if I manually end those and retry, that 'DOS' window still opens and still complains about Timeout and an unfindable PushBullet, yet PushBullet launches successfully, and the querulous 'DOS' window simply closes. My conclusion for what it is worth, is that it is the ineffectual attempts at closing the Background Process entries which is preventing success.

I would like to see if Powershell can improve on this, but would like more guidance on how to implement that.

I've discovered that something had corrupted the batch file, and when that was corrected, Pushbullet launched as required, even though the 'DOS' window was still
complaining about errors. Maybe it has finally been solved.

 
I've discovered that something had corrupted the batch file

In my experience corrupted batch files just fail to run. However, I'm pleased your issue may now be solved.
 
Sad to say - NOT the end of it. Obviously the whole process CAN work satisfactorily, but often does not. Invariably, ENDing the Background Process entries in Task Manager removes the obstacle to a proper launch. So the code is NOT ENDing ALL the Background Process entries in Task Manager; I am quite interested to see if using Powershell makes that ENDing more effective; but I'd like guidance on how to do that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top