Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I have a batch file with name hack.bat with content "shutdown /s /t 0"
when I press this my system shutdown automatically
I have placed this file in a startup folder
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"
This action makes the file Hack.bat to execute on start of windows.
when ever I login into my account this hack.bat is running and system is shutting down.
please help me to resolve this problem.!!!!!
You'll need to boot into safe mode to move or remove the file, the method depends on which version of windows you are currently using.
Windows XP and 7:
Press F8 immediately after your BIOS screen goes away (on some PCs the dead givaway is your screen flashing) then choose safe mode from there. after your computer boots find and move or delete the offending batch file from C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp.
Windows 8, 8.1, and 10:
Boot your install disk, chose "Repair your computer" then "Troubleshoot" "Startup Settings" and click "Restart". this will restart your computer into a new menu, choose the option that says "Enable Safe Mode" (usually #4) from there find and move or delete the offending batch file from C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
Well, my question is not really about a problem but more of a general question.
I know that it is possible to start an executable by creating a new registry key in:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
Are there other ways like this to Autorun a program?
Does them require administrator priviledges?
Thanks.
Here's some other ways to autostart programs at startup
Startup folders
You have two folders that will autorun executable in Windows. This one will start a program only for a specific user:
C:\Users\YOUR SESSION\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
And this one for all users:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
Or you can press Windows Key + R and enter
shell:startup
for the current user, or:
shell:common startup
for all users
Task Scheduler
You can plan a task to run a program at startup (or periodically!) on your computer. You have plenty tutorials on the internet if you want it's pretty easy to setup.
Windows Service
Last option is to create a Windows Service in C#. I don't really know for this option as I try it once a while back and in the end I ended doing something else.
You can look it up too on Google
From the regedit tool I believe you can only do like you just said.
There is a little variation if you want. Your path will only start the program for the current user.
If you want to do the same but for all users you have this path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Do you absolutely want to start an executable from regedit ? Because you have other ways to do so in Windows
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
This post was edited and submitted for review 1 year ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
How to open Microsoft To Do (2.56.43053) from command line of Windows 10 Enterprise (1909). I need this answer in order to create keyboard shortcut to AutoHotkey. There might be also be another way to open the program in AutoHotkey.
So far, I have managed to open Microsoft To Do from Windows menu
or from taskbar
.
However, I did not find way to launch Microsoft To Do from command line.
From the properties of "Microsoft To Do" in Task Manager, I found that the program is located in C:\Program Files\WindowsApps, however, I do not have access to the folder from the command prompt.
It is weird to have a program which can be launched from the menu or taskbar, but cannot be launched otherwise.
From what I have read on different sources, you would have to set this up yourself.
Even though I think you should be able to launch any Microsoft app from the command line (other than the microsoft store app with the command: start ms-windows-store), like Linux does, not every app supports that from what I see.
These are the sources that I have read about how to do the setup of launching Microsoft apps from the command line.
Microsoft Community: https://answers.microsoft.com/en-us/windows/forum/all/starting-windows-10-store-app-from-the-command/836354c5-b5af-4d6c-b414-80e40ed14675
Tent Forums: https://www.tenforums.com/software-apps/57000-method-open-any-windows-10-apps-command-line.html
Edit by Heikki (questioner):
According to the links you may
first create a shortcut from the original application and
then call the shortcut from the command line: "Microsoft To Do.lnk"
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
how to make a shortcut icon to make our pc to sleep or shutdown.
this is the desktop
Make a new txt file with content:
shutdown /s
and change the file extension to .bat. Place it on the desktop and double-click to shutdown.
You can also make a shortcut and in the "target" location, you can type in this
cmd /k shutdown -f -p
I'm not sure about the rundll one, it might be malicious to be honest
Do the below steps:
Right-click in any blank area of your desktop
Choose New > Shortcut
Copy/paste the command RUNDLL ….. 0,1,0
Click Next
For the name of the shortcut, enter “Put to Sleep Immediately”
Click Finish
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
With group policies I have setup a .bat script that runs when windows is shutdown. The script runs an .exe that does a backup of my data. Under Win 7 the execution of the .exe appeared on the screen when windows was shutdown or restarted. This allowed to terminate the backup (.exe provides this option) if it was not required, e.g. in case of a restart.
In my newly setup Windows 10, the script runs (I can tell this from the time the shutdown takes) but the execution of the script is not visible on the screen and can therefore not be terminated if not needed.
Questions:
Is there any way to make the execution of the .exe in the shutdown script visible on Win 10?
Is it possible to determine inside a .bat script if windows is shutdown or restarted?
Thanks for your help.
There is a setting in gpedit that defines if the statements exeucuted in a shutdown script should be shown.
gpedit.msc: computer configuration -> adminstrative templates -> system -> scripts: You find 'Show statements when executing shudown scripts' (or similar since translated from German!). Only if activated will you see what the computer does during shutdown. 'Not activated' is the Default.
I found the solution via the following question asked here in Stack Overflow
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I changed my icons using 'IcoPackager' to Mac theme and then I uninstalled the IcoPackager, and when I installed it to remove those icons, it says my trial has expired, can you help me out?
Every single icon in my Windows 7 Ultimate, 32-bit laptop is now fked up with Mac Icons.
Yes try system restore but if you don't want to i'm pretty sure there are programs out there that will help you get your files back. you could try a program called Icon Cache Re-builder.
another way to do it is with cmd, here are some step by step instructions i made to fix it.
Close and save anything that you are working on. This command will kill explorer and restart the computer when completed.
Open a command prompt in Windows 7 or Windows 8.
In the command prompt, Copy and paste each command line below exactly as is one at a time and press enter after each command.
ie4uinit.exe -ClearIconCache
taskkill /IM explorer.exe /F
DEL "%localappdata%\IconCache.db" /A
shutdown /r /f /t 00
The IconCache.db file has now been rebuilt and your computer should all be back to normal
Nothing above worked, I just copied the C:\Windows\system32\imageres.dll from my fathers 64bit PC to my 32bit Laptop, and I replaced it with mine and rebooted my computer and everything worked fine!