Cynosure.X International LLC

:

Add Comment | Related Links | TrackBack
Related Content

Has Administrator Privilege (GPL)

"HasAdminPrivilege.cmd" is a Windows batch program that can helps you determine whether your script is running as administrator or not. "HasAdminPrivilege.cmd" outputs 1 (for true) when it is running with admin privilege. Otherwise, it outputs 0 (for false).

"HasAdminPrivilege.cmd" takes advantage of the "SetNumberOfArguments.bat" (GPL) script that is also available on this web site. So to use "HasAdminPrivilege.cmd", you'll have to download "SetNumberOfArguments.bat", if you don't already have it.

"HasAdminPrivilege.cmd" is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.

Usage

  HasAdminPrivilege.cmd

Attached File: HasAdminPrivilege.cmd (747 B)

Chieh Cheng
Sat, 06 Dec 2014 05:33:04 +0300

Example 1

The following screen shot shows the output of the "HasAdminPrivilege.cmd" script when running in the default Command Prompt mode.

Attached Image:

Command Prompt.png

Chieh Cheng
Sun, 07 Dec 2014 01:31:52 +0300

Example 2

The following screen shot shows the "HasAdminPrivilege.cmd" script running in a "Administrator: Command Prompt".

Attached Image:

Administrator Command Prompt.png

Chieh Cheng
Sun, 07 Dec 2014 01:33:13 +0300

Seems like Microsoft changed its system operation slightly, because this script no longer works on my Windows 10 Home. Not sure which Windows update caused the change in behavior. But I've modified the script slightly to make it work on the latest update.

Attached File: 1 - HasAdminPrivilege.cmd (850 B)

Chieh Cheng
Tue, 20 Aug 2019 02:07:37 -0700

Found that Windows 10 Pro and Windows 10 Home operates differently, producing different results. Updated the script so that it now operates reliably on both Windows 10 Pro and Windows 10 Home.

Attached File: 2 - HasAdminPrivilege.cmd (1 KB)

Chieh Cheng
Sat, 01 Feb 2020 22:05:07 -0800

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

Title: Run As Administrator (GPL)
Weblog: Cynosure.X International
Excerpt: "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. . . .
Tracked: Sat, 06 Dec 2014 05:45:32 +0300

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 10 + 1?
Click button only once, please!

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

81 Users Online

Hacking Digital Cameras
Fun for Photographers


Get Our

Memecoins!



Amazon Associate

Copyright © 1996 - 2024. All Rights Reserved.