running bat file using windows scheduler [closed] - windows

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.

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.

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.

Update Windows 7 via cmd [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 need to automate the updating/installation of MS patches in some remote machines.
I can't use MDT because there is already a different subsystem handling mass software/patch distribution on all the workstations.
Therefore the easiest/fastest way would be to connect with a script to each machine and run a command (if it exists) that would start updating the system just as if a user had clicked Control Panel/Windows Update/Update now...
I searched and found the wuauclt utility which I try to run on a machine and check if it works and it just doesn't do anything.
I tried doing
wuauclt /a /detectnow
and then
wuauclt /r
It doesn't report that "The command does not exist" or anything like that. It just doesn't output anything at all and I see no updates being installed in the background.
Any ideas?
I read this article yesterday, I think it might be able to help you. Please give it a look and let me know if it helps.
http://www.ehow.com/how_8724332_use-powershell-run-windows-updates.html

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

copying a windows program to another machine [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 have a program installed on windows 7 in my laptop. I wish to install the same program on windows 7 in my desktop. unfortunately, I don't have the source file with me anymore. How can I copy the entire program from one machine to another machine and make it run?
It depends on the program if that's possible or not.
You would have to know, which parts the installer copied to your computer and to which directories. Even then it is possible that the installer checked for prerequisites, found them on the laptop, but are missing on the desktop computer.
You can try to copy the files from the %ProgramFiles% directory, but it is poor luck if that works and you can't be sure that it works correctly. So your best option is to organise the installer package again.
see How to Copy a Program From One Computer to Another Without a Startup Disk.I hope it will work.

Resources