Get Windows startup programs in batch [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 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%

Related

Open a webpage for 20s then close it, daily [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 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.

Reading only requested terminal output [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 1 year ago.
Improve this question
I have my minecraft server.jar application that prints a log to the terminal. While I know you can log output from a specific shell by using the script command, that seems a bit heavy for my application. I want to scan each line of the shell and check if it's useful before grabbing it. What c++ functions are able to do this?
Even better, if I could start the program only when I've triggered my server.jar file that'd be really efficient.
Here is potentially relevant information on reading through a pipeline.
Instead of reading through a pipeline. I have done some research on the spigot site and have discovered that it uses log4j as its logger. I can grab information via this and push it to a database using hikariCP/JBDC and take from there.

Run program when booting into safe mode Win7 [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 9 years ago.
Improve this question
An attempt at security.
In an attempt to make my computer useless if stolen I have a batch file which tests for a file on my pen drive when booting and if not found then it switches to a dummy background and closes windows down. If my pen drive is present it takes a backup of my critical files and proceeds normally.
I would like to do the same when booting into safemode. I've found the Reg key that I think I needs but how to I tell it to run checkpen.bat ?
HKLM\SYstem\CurrentControlSet\Control\SafeBoot
Ian
You need to do following
1.) Install the batch Job as a Service. The steps can be found here
2.) Make a entry in HKLM\SYstem\CurrentControlSet\Control\SafeBoot\Minimal with the name of the service. Add a default column and set it as `Service'
Hope this helps.

How to determine whether a drive is TrueCrypt mounted? [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
Is it possible, in a Windows batch file, to test if a certain drive letter was mounted by TrueCrypt?
I think this is not possible. You could get much information with wmic logicaldisk but nothing will indicate that Truecrypt assigned the drive letter.
As an Idea: (for anyone still finding this post)
You could make this C# Script over at the post #18021118 (which accesses truecrypt to retrive mount information) (there is also a VeraCrypt version over there.) ...
into a commandline tool to be used from your windows batch (added a simple example here: http://github.com/BananaAcid/VeraCrypt-Cmd - replace the get mounts file with the one from the readme within)
or use it directly with powershell
or with an additional binary wich executes scripts on the windows NET Framework without compiling: cs-script.

running bat file using windows scheduler [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 13 years ago.
Improve this question
i wanted to run a .bat file in windows task scheduler, so i opened it, added a new task, browsed to the bat file, and... nothing happened. so i changed the timing to see if it'll run, and it didn't. next i right-clicked on the task and chose "run"- it didn't run. the file itself is only one line, basically backups a folder to a another location. it runs fine when not in the scheduler.
what can be done?
thank you
You should not give batch file directly as a task. Instead you should use
"C:\Windows\system32\cmd.exe" /C <completepathtobatchfile> <argstobatchfileifany>
the complete path to cmd.exe may vary in your case depending on which drive you installed OS and which version you are using.

Resources