How to Elevate Privileges from Command Line

August 21, 2011

My task has been pretty simple: I have needed to run a batch file with a lot of Robocopy commands. The issue I have faced is usual for Windows Vista, Windows 7 or Windows Server 2008:

ERROR: You do not have the Backup and Restore Files user rights.

Yes, if I right click on the batch file and select Run As Administrator, everything works fine. My goal has been to run this batch file from the command line without user interaction at all. At the same time I have needed not to compromise security

Read the rest of this entry »


How to install SNMP remotely

July 28, 2011

This post includes description of the entire process as well as a working example. The post is big, but I hope it is worth to read.

1. What We Need to Do

There are three major parts of remote installation of any software: files to install, command line to run and how to run it remotely. There will be also one additional step for SNMP to run it properly: configuration. The installation parts are the same for Windows 2000 and Windows 2003. It is completely different and way easier for Windows 2008. The configuration part is the same for all of them

Read the rest of this entry »


Scheduled Task Could Not Start or Access Denied

September 15, 2010

If you are trying to run a batch file as a schedule task in Windows and the status of the task is “Could Not Start“, you can be a victim of a Windows 2003 server security policy 🙂 . As Microsoft says in this article, “In Windows Server 2003, the Users group does not have Read and Execute permissions to the command processor (Cmd.exe).” Therefore, you’ve got an “Access Denied” message in the Scheduled Tasks Log.

Read the rest of this entry »