Get messages in
What is RSS?
OK Dialog (Freeware)
Fri, 19 Dec 2014 08:58:18 +0000
OK Dialog is a simple command-line Java program that will display a dialog box with a message, an optional icon, and a single OK button. Because OK Dialog is written as a command-line utility, it can be used in custom batch files and custom scripts. And written in Java, it will run on any Java-supported operating system with no need for recompilation and no need to change of your custom scripts. All these benefits combined make OK Dialog a very versatile utility.
OK Dialog takes advantage of the CI Class Package. You will have to download the package and install it if you don't have it already.
OK Dialog is distributed as Freeware. Please see the "Freeware License Agreement" elsewhere on this site.
java OKDialog "title" "message" [ "icon file" ]
Fri, 19 Dec 2014 05:43:59 +0000
Here is an example of how to use it within an if-statement with delayed expansion:
if %i% equ 1 (
call SetVariableToOutput.bat GetTempPathName.bat "%~n0"
. . . your code . . .
Has Administrator Privilege (GPL)
Sat, 06 Dec 2014 22:33:14 +0000
The following screen shot shows the "HasAdminPrivilege.cmd" script running in a "Administrator: Command Prompt".
How to Run Windows Batch Script as Administrator by Default?
Sat, 06 Dec 2014 02:55:22 +0000
Here is a partial work-around that works in "some" cases, but not others...
1. Create a Windows shortcut for the batch script.
2. Right click on the shortcut.
3. Click on the "Properties" menu option.
4. Click on the "Advanced..." button.
5. Enable "Run as administrator" (see screen shot below).
6. Click on the "OK" button in the advanced properties dialog.
7. Click on the "OK" button in the properties dialog.
Now your script will always execute with as administrator. For your purpose, this trick will work for anything you drag-and-drop onto it, where the object path does not include a space. But if your object path contains one or more spaces, the operation will fail. This problem seems to be a bug at the Windows OS level, so you can't fix it in your script. The problem issue never gets to your script.
Good luck. Let us know if this trick works for you.
Run As Administrator (GPL)
Sat, 06 Dec 2014 02:33:47 +0000
"RunAsAdministrator.cmd" is Windows batch program that elevates a script or program to admin level. This script does the same thing as you right-clicking on a program and select "Run as administrator", except it allows you to do it from the command-line or within a batch script.
"RunAsAdministrator.cmd" takes advantage of the following batch files. They are also available on this web site. So to use "RunAsAdministrator.cmd", you'll have to download these other batch scripts, if you don't already have them.
"RunAsAdministrator.cmd" is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site. If you make changes to this batch file, please feel free to upload it back here to share it with others.
"RunAsAdministrator.cmd" "program" [ "arg 1" . . . "arg N" ]
More . . .