Launch a program when computer is connected to internet - windows

I'm using windows 7. I wrote an application to fetch contents from a webpage. I want that application/ script to be executed automatically once the computer is connected to the internet.
I tried Task scheduler, but I'm unable to find an event when computer is connected to internet.
Thanks

Found answer. Thought it would help someone so sharing.
To trigger an event on connecting to the network:
Open the Task Scheduler. Programs > Accessories > System Tools.
create a new task by clicking Create Task in the Actions panel on the right side.
add task
Give the task a name.
On the Triggers tab, click New... and select On an Event from the dropdown box.
dropdown trigger
Log: Microsoft-Windows-NetworkProfile/Operational
Source: NetworkProfile
Event ID: 10000
Click OK, then go to the Conditions tab.
Check the box for Start only if the following network connection is available and choose the network you want to run the script with
Under the Actions tab, click New... and select Start a program. Enter the location of the script file you want to run, then click OK.
Set any other task settings you want to, then click OK.
Setting an event for when you disconnect from the network:
Follow steps 2-4 above
Use the following event trigger settings:
Log: Microsoft-Windows-NetworkProfile/Operational
Source: NetworkProfile
Event ID: 10001`
Skip steps 6-7, as you will no longer be attached to any network at all. This event will therefore run any time you disconnect from any network.
Follow steps 8-9 again

Related

Task scheduler runs console app task only for the first time

I created console app in .Net technology. App works fine when I trigger it by click on exe setup (console shows up for about 5-6 min and that's how it should work), so I put it into Task Scheduler(Windows Server 2022) as a Task with settings:
1.General: Administrator, Run only when user is logged on.
2.Triggers: one time at xxx after trigerred repeat every 15 min, enabled.
3.Actions: Start a program with start in optional parameter (where exe file is).
4.Conditions: none checked.
5.Settings: allow on demand, do not start a new instance.
When I run it from windows explorer task runs properly for the first time. On the next start it stops running. Nothing happens. No errors/unusual results in history. Status changes to Running for 2-3 sec and get back to Ready. if I run it again from the explorer level, task runs properly again, but only for the first time.
What I've tried:
1.Change user (system, local service, network service, administrator).
2.Run logged in and not logged in.
3.Highest priviliges on/off.
4.Every kind of trigger time option.
5.With and without optional start in.
6.Different locations(desktop, C:/, other).
7.Run as Admin in .exe properties.
8.Every checkbox on/off in settings.
Anyone faced this issue? Thanks in advance.

How can disable BECKHOFF Device Manager on startup?

I'm trying to publish my HMI on CX2030, so I followed the Beckhoff site's instructions for publishing the HMI. When I turn on the PC, the BECKHOFF Device manager starts with the login page simultaneously but in different tabs. how can I fix this issue? (disable show the Beckhoff device manager on start up).
Any help would be appreciated.
I managed it thanks to the link from Quirzo:
Press start, type Run and enter regedit.
(Optional) Save your current registry via File > Export.
Go to Edit > Find and type localhost/config. For me the device manager was at the following location:
Right clikc StartSecurityWizard and select Delete.
Restart the PLC and the Device Manager should no longer start automatically.
Another solution is to go to task manager>startup. There you will find an entry for Windows command processor. If you disable it, it won't open anymore.

how to close running process (Chrome) from task manager in Ubuntu

while working on application, code execution caught in infinite loop like-
console.log('print');
and now it is running and running.
To close Chrome I tried everything which I can but no result.
finally I restart my machine to solve it, that took several minutes
The same (infinite looping) happen again and again, I looked for that like -
http://ubuntuhandbook.org/index.php/2013/07/use-ctrl-alt-del-task-manager-ubuntu/
Advanced Scheduled Process/Task Manager - Linux
Killing a process in linux
finally I got solution, wanted to share with all to save the time-
Here is the solution-
1. Machine info-
Ubuntu 16.04 LTS.
Press windows Butoon-
type 'System Monitor', which will display one menu, click on that-
We will see list of all running process as-
At bottom, we have button as 'end process', click on that which will show one popUp as-
click Ok and that task enjoy!!!
Hope will work for you too!!

Unable to run all values from csv file while doing a performance test

Im using VS Web Performance Test Tool.
My Application has a login and few functionalities but doesnt have a logout . I one closes the browser and opens , it asks for login .
Now, i have 5 rows in excel , but only the first is run and it stops.
Please let me know if anyone knows how to make all rows run.
Thanks,
SK
By default, running a Web Performance Test (WPT) only does one execution of the test. A WPT can be called from a Visual Studio Load Test to run it many times by many virtual (i.e. simulated) users (VUs).
A data driven WPT can easily be run more than once by either of two methods.
After the test has been run once, click the "Edit run settings" on the Web Test results viewer. The modified run settings only apply to runs started by clicking the "Click here to run again" and are lost when the Web Test results viewer is closed. See here for more details.
The default can be changed in a .testsettings file. If no such file is already in the solution, then use the context (right click) menu of the solution in Solution Explorer and select Add => New item then follow the prompts to add a Test settings file. The Web test section of the file controls how WPTs are executed. See here for more details.

Telerik Test Studio - Run this test button is disabled

I have downloaded the latest test studio from Telerik website.
I have created a test based on the Sample tests (Load Tests) shipped with telerik. However, When I am trying to run the test I get this error "We are unable to run the tests. Please make sure that the controller that you are using have enough users allocated..." . Also the Run this test button is disabled. So I canNot run the test.
I tried to record a new test and still same result.
Does anyone knows what is this issue. I am following the guide on this video: http://www.youtube.com/watch?v=Ekx7hjtDSbM&feature=c4-overview&list=UUSTKUvLyGUg-TIuN5qW48ZA
Does anyone know what this error is?
thanks
You have to do the following to make it work:
Click on manage icon.
Then on Add Scheduling Service.
Type in the Computer Name/IP, test connection and click ok.
Drag the slider in the balance column to set the number of users and save settings.
Its very easy. First you need to configure your controller.
1.Click on 'Manage' button.
2.'Manage Users' window will opens.
3.Click on 'Add Scheduling Service' button.
4.'Add Scheduling Service' window will opens.
5.Enter your 'Computer Name/IP'.(How to find name of your computer :http://windows.microsoft.com/en-in/windows/find-computer-name#1TC=windows-7).
6.Click on 'Test Connection'.
7.If you enter correct 'Computer Name/IP' then success message will appear 'Great! We were able to connect to that Scheduling Service'
8.Click 'Ok'
9.Finally 'Save'.
You can see that 'Run Test' will get enable. :)

Resources