I am trying to close one specific chrome tab using command prompt win 10 - command

My goal is to close one specific tab (google chrome) after i have opened more than 1 tab using command prompt on windows 10. So everything should happen automatically since nobody should reach the pc/monitor etc.. I cant just simply use the start "URL" command since its a page which requires a login on the previous page. I have problems explaining why exactly i have to do it this way. I imagine i can use the taskkill command to close a tab. but that requires the Process-ID. The problem for me is that the PID always changes after the tab has been freshly opened. The PC shuts down at 17:00, starts at 08:00 and via autostart 2 tabs are being opened (actually 3 but the first one doesnt matter regarding this problem). The first tab is being opened and then the second one after a delay of 10 seconds (because it wont load until the first page is logged in automatically which takes at least 7 seconds). Now that the second page is open i want to close the first one but i struggle with that. Im doing all of this automatically via command prompt. What also doesnt work is closing chrome with taskkill and reopening the second tab (because of the log-in). I'm definitely no expert (more like a noob) but i would appreciate it if somebody could help me:D.

Related

Is there a way to launch vscode from a bash shell so that a specific launch profile is active in debug mode?

I've found that debugging some apps in vscode is tedious because the applications I work on have hundreds of command line parameters at times. I have created a script that generates a launch profile for an app, given a command line, and adds it to launch.json. It's relatively straightforward at that point to open the vscode GUI, start debug mode, and select the launch profile I've just added. But it does take time (sometimes more than you'd think-- if there are many such profiles). So I'd like to make the process even more automated--Ideally, I'd like to have the script that generates the launch profile to just go ahead and launch code, already in debug mode with that new profile activated, so that I can start execution with a single click. Might not seem like this would save me much time, but I do this often, and it adds up quickly.
So far, though, I've not found a way to accomplish this. Is this possible?

Script runs fine in ISE, but not in Powershell Console

I wrote an extremely lengthy script that creates a form. The main purpose of it it to connect to vCenter servers, total up hosts/vms within different datacenters and also identify ESXi host versions. Running the script in ISE the form loads fine and when I click the Button to start the many various functions to update the fields, it runs. I have Foreach() fields throughout and added in a little StatusLabel to the bottom of the form to show me where in the script it is currently scanning.
Once all was done and working, I saved the PS1 file and moved it to a shared server to be run. When I run the Powershell console (as Admin) and point to the file, the Form loads ok. Once I click the button to begin generating the info, It just changes to (Not Responding) and grays out. I know it's working and if left there long enough it will return the info.
Why does the console window not function like the ISE? I want to be able to see the information and Status Label update/change as it goes through the script (just like I do in the ISE).
Appreciate the feedback. The script is several thousand lines long and would need to be scrubbed before I upload. Was hoping to just get some general info before doing that.
I updated to v4 and verified that my command window was running as STA using the command from Jan Chrbolka. Script runs properly now.
I was also facing the same issue.(Btw, I cannot upgrade Powershell to V4 right now since it is my company owned one.)
The Browse button that I incorporated in my form was not working when I am lauching it from Powershell command line. It went to Not Responding state when I click the browse button.
I took the advise from Jan ChrbolkaMay about the STA and MTA.
I checked for the threads related to that and changed the script execution format to the below one which fixed my issue.(adding the word -STA)
powershell -STA -File D:\PS\GUI.ps1
For checking the current state. Use the below query in Commandshell as well as ISE.

eclipse stop popup "Web launch already running"

I am developing in PHP with Xdebug and for some reason every now and then the debug session stops working, so i click again the debug button but it gives me this error all the time "Web launch already running", so i have to go to Debug Perspective and click "Terminate and Relaunch".
Is there a way to make eclipse automatically terminate and relaunch or launch two sessions or don't show this popup, for 2 years this popup has been bugging me xD
As noted in response to questions like this one and this one, the best current solution appears to be binding "Terminate and Relaunch" to a keyboard shortcut.
Not automatic, but at least a lot less clicking around.
I have taken care of pesky popups in Eclipse with AutoHotkey script which have worked very well. I could create an AutoHotkey script which sends specific keystrokes automatically every time there is a specific pop-up.
So the flow I had in mind was as follows :
You click on the debug button -> The Error popup appears and as soon as that happens the AutoHotKey script kicks in and automatically does what you have to do manually.
If you think that might be worth looking into then we can talk more in a Chat session somewhere. I would need some information about the Pop up using the AU3_Spy.exe bundled with the AutoHotkey Installer.
Searching on Google, I found that many people have the same problem.
Bellow are some links that help you, I think:
https://aptanastudio.tenderapp.com/discussions/questions/123-definitive-installation-guide-for-php-debugging-on-linuxubuntu
A good article: http://www.latenightpc.com/blog/archives/2008/05/24/a-complete-lamp-development-environment-xampp-eclipse-pdt-and-xdebug
See this, too: http://www.eclipse.org/forums/index.php/m/57493/
Take a look here, too: Getting error in XDEBUG
So, read and try, read and try.

Debugging with NetBeans 7

I installed Xdebug where it said to. Netbeans-xdebug says running when debugging. When debugging my browser opens and keeps loading. I have to press Continue many times (about 7) to be able to view the page. No breakpoints are set. Every page does that. Some variables have values when debugging. Any ideas?

Strange behavior by the BDE Administrator

Logged into my Windows XP SP2 computer using my normal user account (which has Local Admin privileges), when I start the BDE Administrator -- either from the Control Panel or from the BDEADMIN.EXE directly -- I never get the GUI. It shows up on my task bar, and shows up in the Task Manager, but the GUI never appears. I can close the program by right-clicking on the task bar and choosing close. (note that "never" means not within 5 minutes of launching the program)
If I log into the same exact computer using a different user account (which also has Local Admin privileges), when I start the BDE Administrator, it loads the GUI within a couple seconds.
I used to be able to use the BDE Administrator while logged in under my normal user account, so it's not like this has always been a problem.
While this issue may not be directly programming related, it does make developing and testing a pain when I have to log off and back on a couple of times just to make changes to my BDE configuration.
I am totally stumped. Any idea what might be causing this odd behavior?
One idea is that you may have had two screens running on this box and dragged the window off screen.
Just search for the registry keys that control where the window opens up and delete them. Alternatively, you should be able to right click on the program in the task bar and select Move. Then use your arrow keys to bring it back.
Regardless, I'm voting to close.