问题标签 [administrator]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1326 浏览

windows - 简单检查java以确定是否以管理员身份运行

是否有可以从 java 进程执行的简单、快速、非侵入性的 Windows 管理任务来验证当前进程是否以管理员身份运行?

我知道我们可以运行批处理命令来检查当前用户是否是管理员组的成员。但是在 Vista 等方面存在可移植性的复杂性。

一个简单的例子是:

然而,这是侵入性的。我们不想创建文件

还有其他选择吗?

0 投票
3 回答
7588 浏览

asp.net - asp.net 使用管理员帐户运行程序

我需要使用管理员帐户从 ASP.NET 应用程序运行一个控制台应用程序并启用桌面交互。我尝试了下面的代码,控制台应用程序运行正常,但在 NETWORK SERVICE 帐户中。任何想法如何在管理员帐户下运行控制台?

问候,托马斯

0 投票
2 回答
1227 浏览

dns - UAC on Win2k8/VIsta x64 - local "Administrator" works but domain account in Administrators group fails?

I have come across a strange problem in one of our applications on win2k8/Vista x64 with UAC enabled. It is a process which hosts the UI for our service and runs in the context of the logged on user.

When logged in as a domain user who is a member of the "Administrators" group, writing to the registry under HKLM fails due to UAC with access denied.

But when logged in as the local "Administrator" account (non-domain) then writing to the registry succeeds.

Both accounts are adminstrators - is there a distinction between domain and non-domain accounts with UAC? What gives?

0 投票
2 回答
70801 浏览

c# - 单一方法的管理员权限

是否可以要求一种方法具有管理员权限?

像这样的东西:

0 投票
3 回答
20862 浏览

security - 将“网络服务”帐户添加到管理员组

我的 web 应用程序在 windows server 2003 下的 IIS 6.0 中运行,我们都知道在这种情况下,IIS 使用用户帐户“网络服务”。

我碰巧必须允许某些用户在我的网页上执行某些操作,而该操作需要管理员权限。

对我来说最懒惰的解决方案似乎是将“网络服务”添加到管理员组,它确实有效。

我的问题是,这个解决方案有多危险,它会以什么方式危及我的 Web 服务器的安全性?

0 投票
1 回答
1213 浏览

asp.net - Can ASP.NET be configured to run as an administrator when UAC is enabled?

I can't seem to find any information that indicates whether ASP.NET can be configured (through web.config or maybe machine.config) to run as a real administrator on a machine with UAC enabled.

By this I mean, even if you set it to impersonate an Administrator account, UAC will disable that account's ability to act as an Administrator by returning a token set that hides the administrator role. For any checks such as IsInRole, the running account is effectively not an administrator at all.

So ... Let's say I want to ignore all good advice and just go ahead and run a web app on Vista with administrator permissions. Is it even possible?

Alternatives welcome. (Core reason for needing administrator privileges: to stop or start services that are running on that machine.)

0 投票
3 回答
1378 浏览

c++ - 可编程检测用户是否具有管理员权限(可以运行安装程序)

在我的代码中,我需要检测当前用户是否有权安装其他应用程序(其他应用程序 VC2005 redist.package)......它应该可以在 Vista 上运行。

据我了解 CheckTokenMembership 或 IsAdministrator 没有给出完整的解决方案。

谢谢

0 投票
3 回答
2640 浏览

python - 确定当前用户是否在管理员组中(Windows/Python)

我希望我的应用程序中的某些功能只有在当前用户是管理员时才能访问。

如何确定当前用户是否在 Windows 上使用 Python 的本地管理员组中?

0 投票
1 回答
371 浏览

.net - 如何将可执行文件作为系统服务运行?

我有一个用 .NET 2.0 编写的文件和数据分发应用程序,我编写的类似于 Steam。

此应用程序需要在 Windows 7 中运行,并且需要能够运行和安装需要管理员权限的应用程序。但是,用户将没有管理员权限。

我的想法是将应用程序作为本地系统服务运行。我认为通过这样做,当用户不是管理员时,应用程序可以执行管理员权限操作(注册表编辑、启动应用程序等)。

我的假设正确吗?我需要采取哪些步骤才能将此应用程序安装为本地系统服务?

管理员将安装应用程序,但它将由没有管理员权限的用户运行。

提前致谢!

0 投票
6 回答
7900 浏览

windows - Administrator's shortcut to batch file with double quoted parameters

Take an excruciatingly simple batch file:

Save that as test.bat. Now, make a shortcut to test.bat. The shortcut runs the batch file, which prints "hi" and then waits for a keypress as expected. Now, add some argument to the target of the shortcut. Now you have a shortcut to:

The shortcut runs the batch file as before.

Now, run the shortcut as administrator. (This is on Windows 7 by the way.) You can use either right-click -> Run as Administrator, or go to the shortcut's properties and check the box in the advanced section. Tell UAC that it's okay and once again the shortcut runs the batch file as expected.

Now, change the arguments in the target of the shortcut to add double quotes:

Now try the shortcut as administrator. It doesn't work this time! A command window pops up and and disappears too fast to see any error. I tried adding > test.log 2>&1 to the shortcut, but no log is created in this case.

Try running the same shortcut (with the double quotes) but not as Administrator. It runs the batch file fine. So, it seems the behavior is not because of the double quoted parameters, and it's not because it's run as Administrator. It's some weird combination of the two.

I also tried running the same command from an administrator's command window. This ran the batch file as expected without error. Running the shortcut from the command window spawned a new command window which flashed and went away. So apparently the issue is caused by a combination of administrator, the shortcut, and the double quotes.

I'm totally stumped, does anyone have any idea what's going on? I'd also like a workaround.