草庐IT

admin_user_name

全部标签

windows - 在 Windows 中 : How do you programatically launch a process in administrator mode under another user context?

场景我有一台远程计算机,我想以编程方式在其上运行安装程序(任意可执行文件)。这些安装程序需要两件事:它们必须以管理员模式运行。它们必须在特定用户环境下运行(具体来说,是管理员组成员的本地用户)。事实证明这非常具有挑战性。似乎有一些外部工具可以执行此操作,但我正在寻找Windows附带的解决方案。这个问题的有效解决方案是什么样的从提升的上下文(例如,提升的批处理文件或可执行程序),有效的解决方案应该能够以编程方式在另一个用户上下文下以管理员模式启动进程。假设另一个用户的id和密码可用,并且另一个用户是Administrators组的成员。附加限制:有效的解决方案不能依赖外部工具。由于较新

c - DLL 函数未导出 : Unable to find an entry point named TestFunc

我正忙于了解一点点C/C++,并与C#互操作。我已经检查了几个创建简单的Win32DLL并从C#使用它的示例,但是当我尝试调用我的DLL时,我收到运行时错误:“无法找到名为TestFunc的入口点”。我的DLL看起来像这样,我从一个Win32DLL项目创建它,带有空项目选项:标题:__declspec(dllexport)intTestFunc(char*,char*,char*);代码文件:#include"stdafx.h"#include"TestLib.h"__declspec(dllexport)intTestFunc(char*arg1,char*arg2,char*arg

Windows shell : How can I get the audio device(s) name(s)?

Iamnotsureifthisisstrictlyaprogrammingquestion,aslongasIdon'tmindtouseadditionalsoftwareinordertosolvetheproblem,aslongasitkeepsbeingscriptableorcommand-line(thisis:anotGUIsolution).Anyway,Ihavepostedanother(abitdifferent)questionatSuperUser.Bytheway,IwillupdatehereifIgettheanswerthere.我的Windows

python - 让 Scapy 在 Windows 上工作时出错 : "' module' object has no attribute 'ex_name' "

我正在尝试运行一个涉及ARP嗅探的Python脚本,并且显然依赖于存在的Scapy库。我完全不知道自己在做什么,但我相当擅长谷歌搜索、遵循指示和复制/粘贴。我已经在我的Mac上启动并运行了它,但我仍然坚持我希望这是让Scapy在我的Windows计算机上工作的最后一个障碍(这最终是需要运行此脚本的计算机)。我遵循了http://www.secdev.org/projects/scapy/doc/installation.html#windows中的所有说明。,除了我选择了Python2.7并使用了那里列出的所有内容的更新的2.7兼容版本。我在除Pypcap和Libdnet之外的所有安装

python - cx_Freeze 5.0 : ImportError: No module named 'scipy.__config__'

问题尝试运行使用cx_Freeze构建的.exe时出现以下错误:File"C:\\WinPython-64bit-3.5.2.3Qt5\python-3.5.2.amd64\lib\site-packages\scipy\__init__py",line105infromscipy.__config__importshowasshow_configImportError:Nomodulenamed'scipy.__config__'Duringhandlingoftheaboveexception,anotherexceptionoccurred:...File"C:\\WinPyth

c# - Windows 上的 OpenVPN --auth-user-pass FILE 选项

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。这个问题似乎不是关于aspecificprogrammingproblem,asoftwarealgorithm,orsoftwaretoolsprimarilyusedbyprogrammers的.如果您认为这个问题是关于anotherStackExchangesite的主题,您可以发表评论,说明问题可能在哪里得到解答。关闭5年前。Improvethisquestion如果您尝试通过--auth-user-pass开关将用户名/密码从文件传递到OpenVPN,您会收到以下错误:"Sorry,'Aut

c - IoCreateSymbolicLink 何时返回 STATUS_OBJECT_NAME_COLLISION

当我调用IoCreateSymbolicLink时失败,状态为STATUS_OBJECT_NAME_COLLISION。我的驱动程序中有代码,我试图在NT和DOS之间创建符号链接(symboliclink)名称。一般什么时候会出现这个错误?RtlInitUnicodeString(&deviceName,L"\\Device\\StreamEitor");RtlInitUnicodeString(&symbolicLinkName,L"\\DosDevices\\StreamEitor");status=IoCreateDevice(driverObject,0,&deviceName

windows - Knife 窗 : Network Error: getaddrinfo: Name or service not known (windows:22)

我有一个Ubuntu工作站,我正在尝试引导一个Windows节点。Windows节点在端口2222上打开了ssh。我一直在关注http://docs.opscode.com/plugin_knife_windows.html.ateetor@ateetor-virtual-machine:~/chef/chef-repo$sudogeminstallknife-windows--http-proxy=[REMOVED]Successfullyinstalledknife-windows-0.5.121geminstalledInstallingridocumentationforkni

python 3.7 : How to get the Windows user Login Time?

我正在尝试使用Python3.7获取系统用户的登录时间。我已经尝试过win32net和Python的平台模块,但是平台模块中没有定义函数,Win32net与Python3等不兼容。我尝试了以下代码:importplatformplatform.uname()importplatformos_name=platform.uname()[0].lower()ifos_name=="windows":get_win_login_time()elifos_name.endswith("nix"):get_nix_login_time() 最佳答案

python - Pyinstaller导入错误: cannot import name 'dist' on Windows

我正在尝试使用Pyinstaller(3.3版)在Windows(8.1版)上将Python(3.6版)项目构建到单个exe文件中。该项目包括PyQt5、numpy、matplotlib依赖项。Pyinstaller写道:BuildingEXEfromout00-exe.toccompletedsuccessfully.但是当我运行exe文件时,我得到:...File"distutils\__init__.py",line44,inImportError:cannotimportname'dist'[6748]Failedtoexecutescriptmyproj第44行的文件"dis