Open a webpage for 20s then close it, daily [closed] - windows

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 months ago.
Improve this question
Work has a requirement for certain employees to open a web-page and 'browse around'. Luckily they only register once you first access the site. Is there a way to create a windows script to open a webpage for 20s, then close it?
I think I can get the webpage to load with a service or something in Windows, no idea how to force close it after a period of time though??

I don't use Windows and cannot try it, but I think the simplest method is to use internal Windows scheduler.
schedule a task to open your page:
firefox -new-tab "https://www.visit_me.com"
schedule another task that should run after 20 seconds to kill the browser:
taskkill /im firefox.exe
The only disadvantage is that if you use firefox at that moment, it will be closed with your tabs as well. But you can duplicate firefox.exe to firefox_mytask.exe and use this clone in the scheduler to do what you need.

Related

Is is possible to make a batch file that can run before the user logs in? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is is possible to run a batch file before a user has logged in? I want to play a music file when the computer boots up. Is this possible? I want to do it strictly with batch files.
You want a Scheduled Task using the Windows Task Scheduler.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa383614(v=vs.85).aspx
Control Panel->Administrative Tools->Task Scheduler.
Create a task that runs "On Startup" as trigger and without requiring a user account.
As for "what program" to run to play music without an active desktop session, I'm not sure. You probably want a command line player. Do an internet search for one. ffmpeg might be able to do it from within a command line bat file.

Get Windows startup programs in batch [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm writing a performance assistant in batch, and ran in to a bit of a problem. One of the modes of the script would find your startup items, and selectively disable the ones that have a harmful impact on boot times. The problem is, I can't find a way to do this. The specific items I am looking for are the programs listed under MSConfig, under the Startup tab.
Direct question: Is it possible to retrieve the list of start up items on say Windows 7, compare them to a list of known programs that cause long boot times, then disable them without affecting all of the startup programs without user interaction outside of starting the script and selecting the mode?
You can do something like this :
#echo off
Set LogFile=%~n0.txt
If exist %LogFile% Del %LogFile%
wmic /APPEND:%LogFile% STARTUP get /format:list>Nul
Start "" %LogFile%

Can't run explorer.exe properly [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I play some older games that require ending the process explorer.exe. This is fine, except I want a way to start explorer.exe back up when I am done playing. I thought to use this:
^#e::
Run, explorer.exe
Return
The weird thing is that when I run this, it opens one window in the "Libraries". However, when I open the task manager and Start new process --> explorer.exe, then everything comes back (desktop, taskbar, all of it).
Why does autohotkey's run, explorer.exe not do the same thing? How can I make it start explorer.exe so I get everything back, like I did with the task manager?
UPDATE: The solution is to put %windir%\explorer.exe. This is my final code, and it works properly.
#e::
Run, %windir%\explorer.exe
Return
Did you try running it using start.exe? i.e. Run, start explorer.exe

How do I set a Windows scheduled task to run in the background? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Does anyone know how to set a scheduled task to run in background using Windows Task Scheduler?
There doesn't seem to be any option to do this.
As noted by Mattias Nordqvist in the comments below, you can also select the radio button option "Run whether user is logged on or not". When saving the task, you will be prompted once for the user password. bambams noted that this wouldn't grant System permissions to the process, and also seems to hide the command window.
It's not an obvious solution, but to make a Scheduled Task run in the background, change the User running the task to "SYSTEM", and nothing will appear on your screen.
Assuming the application you are attempting to run in the background is CLI based, you can try calling the scheduled jobs using Hidden Start
Also see: http://www.howtogeek.com/howto/windows/hide-flashing-command-line-and-batch-file-windows-on-startup/

Can I manipulate a window(process) that I have not created? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have this application that I haven't created and I don't have the source for. But it's really handy in handling and recording the time I've used on different projects. But it has this annoying pop-up that comes up that contains a window and some debug text I believe. It wasn't done by a professional, it was just a hobby project. Everything is working even though this window appear. So I was wondering if it's possible to "hijack" a window and minimizing or closing it somehow?
Yes. You could hide the window if you have its title. There are other ways to do it, but..
The following application does a few tweaks on another window, check it out:
Window manipulation using window-handle from different process on MS Windows(XP)

Resources