Questions tagged [windows-users]

Agents, either human or software, which use a Windows computer or network service.

Windows users are agents, either human or software, which use a Windows computer or network service.

Related tags:

59 questions
1
vote
1 answer

ConvertStringSidToSid for S-1-5 (NT AUTHORITY group)

I have a CSid object holding a well known sid for SYSTEM. Calling Domain() function I can see that the domain is "NT AUTHORITY". In MSDN I found out this group's SID is "S-1-5", so I tried to use ConvertStringSidToSid() in order to get a PSID for…
TCS
  • 5,790
  • 5
  • 54
  • 86
1
vote
1 answer

Get Windows user account SID by account name only

I am trying to programmatically delete a user profile (the right way) using the DeleteProfile() API. Unfortunately, it wants an account SID as the first parameter. There has to be some magical API that takes a username and spits out an SID, correct?…
Andy
  • 12,859
  • 5
  • 41
  • 56
1
vote
1 answer

Setting a window service to run as the current user when it is installed using InstallUtil.exe

Is there a way to install a windows service and automatically set it up to run as the current user without having to manually fill in details each time it installs? We're developing a windows service and want to automate the installation of the…
Helephant
  • 16,738
  • 8
  • 39
  • 36
1
vote
1 answer

How to control post-install behavior of a program for users with different Windows permissions

I have a Visual Studio Installer Setup Project that outputs a .msi file for installation on systems. I'm using Visual Studio Pro 2013 with .Net 4.0. The application is mainly intended to be used by non-admin Windows 7 users. However, due to user…
Gevo12321
  • 549
  • 1
  • 5
  • 19
1
vote
0 answers

How to get local users with Active Directory C++

I need to get users' accounts on a computer. Trying to use Active Directory, here an example https://msdn.microsoft.com/en-us/library/ms676882(v=vs.85).aspx But I've got hr = ERROR_NO_SUCH_DOMAIN here HRESULT hr = ADsOpenObject(L"LDAP://rootDSE", …
Nika_Rika
  • 613
  • 2
  • 6
  • 29
1
vote
1 answer

How to get the currently logged in windows user with NAnt

I have a NAnt script that does a build and deployment of an ASP.Net application. This lives on a remote machine that many people log into to perform builds. (this is not automated for various reasons that are irrelevant) Upon success or failure of…
funkymushroom
  • 2,079
  • 2
  • 26
  • 39
1
vote
2 answers

Check MaxPasswordAge in Windows with local C# application

I am having the worst time trying to find documentation of this on the internet. Essentially I want to know that Secpol MaXPWAge is set to 90 or less and have it display in a textbox (let's call it textbox1 for ease) I have searched WMI solution,…
Joe Pearson
  • 149
  • 1
  • 2
  • 13
1
vote
0 answers

C# ldap creation of local/ domain user throws Access Denied Error

New local/ domain user needs to be created using a Web based application. I have used System.DirectoryServices and System.DirectoryServices.AccountManagement namespaces to attain it. So if I run the application using Visual Studio (2012) everything…
1
vote
2 answers

Download patches from WSUS for workgroup server

My server is not on the domain so I cannot use group policy. I read about this article to update the registry key on the machine: https://serverfault.com/questions/316372/how-to-configure-workgroup-to-receive-updates-from-wsus I do not wish to…
minisch
  • 323
  • 5
  • 19
1
vote
1 answer

Authenticate user from Perl against Windows local users

I need to write a script in Perl under Windows that will receive a username and a password. The script should authenticate the user against the user accounts in that machine, and also, it needs to check if the user belongs to the Administrators…
0
votes
0 answers

PlayWright test in Chrome with a different Windows user than the one currently logged in?

I have to run some tests through PlayWright and have to run it trough Chrome with a different Windows user than the one I'm currently logged into the system with, for security reasons as I run a virtual machine where one user has access to the DB…
Jehlo
  • 21
  • 3
0
votes
0 answers

Windows 10: Can't start ssh-agent: unable to open service handle on non-administrator user (OpenSSH_for_Windows_8.9p1)

I have two users on the remote Windows 10 server (Build 10.0.19045.0) - controller (administrator) and worker (non-privileged user). The first user (admin) is able to use Microsoft's ssh-agent correctly. All services can be started or checked via…
Peter Zaitcev
  • 316
  • 1
  • 14
0
votes
1 answer

How to remove domain user from Administrators group using C#?

I have written the code, which works fine when I try to remove a user. try { Console.WriteLine("user name is " + args[0]); using (PrincipalContext ctx = new PrincipalContext(ContextType.Domain)) { UserPrincipal user =…
Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197
0
votes
1 answer

How to use windows "query user" with a username that has a whitespace?

We can use query user username to get Windows user session information. For instance, query user user1 or query user user_1 returns with appropriate user information and I can see its status, whether it is connected or disconnected. My issue is that…
Brian
  • 4,958
  • 8
  • 40
  • 56
0
votes
0 answers

How can I change the Windows username in SQL Server?

I created a new Windows user (mixael). And soon I deleted it. And when I needed to use SQL Server I encountered an error. I logged in under the wrong user in SQL. and because of this, I could not use diagrams. The question is, how can I change the…
Andrio
  • 1