Tag Info

Hot answers tagged

58

Congratulations! You've come up against a problem that has stumped many a Windows user/admin. No, you cannot rename a task except for exporting, renaming and importing again. Yes, it's rather silly. Perhaps an enterprising scripter could create a simple PowerShell script that automates this, but until then, you're stuck with your export/import two-step. ...


3

If you're not interested in the output, you can use Ctrl-Z and then bg to run the task in the background, and then disown to stop the shell sending it a SIGHUP when you disconnect.


3

There is another (newish) tool from Sysinternals called sysmon, it runs as a service and logs every process start including its command line and its parent process to the Windows Event log. It also logs other things such as file write access and even network connections but you can turn those off. I've been running the service for a few months now and it ...


2

I had a similar issue because my .cmd file was in C:\ (root). After moving elsewhere, it ran fine from the Task Scheduler. In some corporate environments, there are restrictions at the C:\ root level.


2

For reference the local admin account can be enabled during the TS as well, see the screenshot below: Now, for your command: I suspect that the command can only be run under the Full OS (as opposed to WinPE. I noticed in your screenshot you don't restart into the Full OS at all. Any SCCM packages (this includes command line commands that act on the Full ...


2

There is a known bug with task scheduler that will cause it to run the same task twice from time to time. It happens when the previous scheduled task terminates exactly when the new task is supposed to start: the scheduler will then run the same task twice. There is a hotfix available there: http://support.microsoft.com/kb/2461249 When we ran into that ...


2

Make a user account, set permissions so the task can run as that user (e.g. folder access permissions), run a command prompt as that user (runas /user:domain\user cmd) then from there try the task. When that's working, set the scheduled task to run as that user. Edit: this wont work until you take into account Shane Madden's reply about permissions on ...


2

It's unclear from your question whether the task is running as "LOCAL SYSTEM" or a local user that's a service account. If, the user is a local service account, not the system account, and the user is not in the Administrators group, then you'll need to make modifications to the security settings of cmd.exe - by default, the NTFS ACL only allows ...


2

The simplest way would be to use a batch file that runs the first command with START /WAIT. E.g. start /wait spider.bat secondjob.bat The batch file will then pause and wait until the "spider" task finishes and then run your next script. (Or an executable, this will work for executables as well as .bat/.cmd scripts)


2

I mostly run php on *nix machines so not sure about this. Normally php scripts are run by the web-server when someone requests a page with some php in it. In your Server 2008 set-up your default action for .php may be set to another action (e.g. 'open file in editor') rather than 'run script using php.exe' You have to call up the php interpreter and use ...


2

It's intended to identify that those other items have not been set. Some organizations may have a person responsible for setting priority, classification, etc... Triaged would indicate to a developer that those items have been properly evaluated.


2

You need to invoke php with your script as an argument: "C:\Program Files\PHP\php.exe" -f "C:\Path\to\your\script.php" The -f switch is from the linux version, but I believe it's the same for Windows; you'll also need to specify the correct path to php.exe, wherever that is.


1

If you can, run your php script locally (as SmallClanger suggests); create a .bat script so you link this .bat into task scheduler. If you must call the php page remotely, create always a bat script with this line: "C:\Program Files\Internet Explorer\iexplore.exe" www.yourdomain.com/page.php If you want to close the Internet explorer windows, try with ...


1

By far the easiest and most reliable way is to add the currently scheduled task to the start of your batch file and then run that batch file via the task scheduler instead.


1

Tasks need to open a CMD window and pass net use commands, then do a DIR command, pipping the output to a file on the server You can't map drives if you aren't logged into the box. Try modifying your script so that it does a directory listing on the UNC path, that should work fine.


1

Try a pause in your script.You will then be able to read the problem. In my case, I got an access denied error, since the script started running in \windows\system32. So, after changing into the correct folder (cd), it worked.


1

For XP, 2000 and Server 2003 take a look at this MS article "the only way to schedule a task as the System Account is to use AT.EXE to schedule the task" http://support.microsoft.com/kb/223375 For vista and 2008 this may help http://stackoverflow.com/questions/77528/how-do-you-run-cmd-exe-under-the-local-system-account


1

Unfortunately not. That's the way this is done now. I believe it's for security purposes, so that set tasks cannot be modified while they are actually setup and enabled.


1

Please be sure before you answer "Cannot do this", "Impossible", etc. Check out this power shell script.


1

I ended up doing this with a batch file, and setting it to run via Task Scheduler. Here is the batch file if anyone is interested: @echo off set RETENTION_PERIOD_DAYS=30 set FILE_BASED_ARCHIVES=g:\shares\public\crashes set DIRECTORY_BASED_ARCHIVES=g:\shares\results set MINIMUM_FILESIZE=1000000 set ZIP_PATH="c:\Program Files\7-Zip\7z.exe" if not {%1}=={} ...


1

So I've had the chance to deliberate this issue with a collegue of mine. We both came to the same conclusion as the answer of @BigHomie. The user couldn't be added as all steps in the Install Operating System group are executed in WinPE. I thought it would work, because you can enable/disable the default admin, but apparently that is done by some hook in ...


1

I think that if you add /RU <username> /RP <password> to the call to schtasks.exe you will get "Run whether user is logged on or not" selected. You can also use the /NP instead, which will also give you "Run whether user is logged on or not", but also "Do not store password..." which will limit the accessible resources. This at least works ...


1

To export the query to Excel, you need to initiate the command from Excel. Probably it is possible, but it is not easy. Another option is to create a PowerShell script or Console application that reads the result of the query and writes the result in a csv file. A last option is to use reporting services. You don't have a work item query then, but you ...


1

Maybe this help you tfpt query /collection:https://myserver:8443/tfs/Default "Project\My Queries\Android Bug&Change Request List for Release Notes" /format:tsv >c:\test.txt


1

IIS. Seriously. from home, from his smartphone, whateve A lot easier if you can rely on standard HTTP, no login, no requirement for a remote desktop front end. I'm concerned about securing IIS considering it will require being world accessible. Trivial. HTTPS, integrated security, everyon out except certain allowed people. course Remote ...


1

Well, One way I see to do this is to the task to end on a holiday, then have a second task starting on the next working day, and ending that task the next holiday. Rinse and repeat per holiday. The newer versions of task scheduler does seem to let you string events together, but I don't see any option not to run a task on a specific day.


1

If this is a Windows Server 2008 - you can try the below from the Task Scheduler - You can then uncheck the days you dont want the task to run as I have highlighted in blue. I believe this is what you are looking for...


1

I respect your one-liner, but it is difficult to parse. Is is possible that %DATE% is not available? The below code worked for me. FOR /F "delims=" %%i IN ('date /t') DO set DT=%%i FOR /F "delims=" %%i IN ('time /t') DO set TM=%%i SET SRC=%deployroot%\Captures\%RealComputerName% SET DST=%deployroot%\Captures\Completed set y1=%DT:~10,4% set m1=%DT:~4,2% set ...


1

The Windows Performance Toolkit has an Analyzer and Recorder, which will not only list processes but show you a timeline, resource consumption, and a ton of other things in great fine-grained detail, which will probably do more to help the problem you're actually trying to solve, than a simple list of processes would.



Only top voted, non community-wiki answers of a minimum length are eligible