Sign in to follow this  
Followers 0
afoster

Macro To Pull Domain Name

5 posts in this topic

Is there or will there be a macro that can be used in the runasset command that will pull the domain name that a user is currently logged in as, or that the workstation is currently joined to?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Think its an environment variable called USERDOMAIN so this can be retrieved in the following way:

EnvGet("USERDOMAIN")

edit: the 3.0.92 has the following extra Macros:

@USERPROFILEDIR, @HOMEDRIVE, @HOMEPATH, @HOMESHARE, @LOGONSERVER, @LOGONDOMAIN, @LOGONDNSDOMAIN

so maybe the @LOGONDOMAIN is what you are looking for....

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

The unstable v3.0.92 has added the following macros:

@UserProfileDir - Path to current user's Profile folder.

@HomeDrive - Drive letter of drive containing current user's home directory.

@HomePath - Directory part of current user's home directory. To get the full path, use in conjunction with @HomeDrive.

@HomeShare - Server and share name containing current user's home directory.

@LogonServer - Logon server.

@LogonDomain - Logon Domain.

@LogonDNSDomain - Logon DNS Domain.

Edited by jlandes

Sincerely yours,Jeremy Landesjlandes@landeserve.com

Share this post


Link to post
Share on other sites

OK Thanks, but is there one to pull the Domain that the Workstation is logged in to? We have three different domains and as such our workstations are joined to one of those three domains. When we use the runasset command we want it to use the domain name of whichever domain the computers is joined to.

Thanks,

Share this post


Link to post
Share on other sites

OK Thanks, but is there one to pull the Domain that the Workstation is logged in to?  We have three different domains and as such our workstations are joined to one of those three domains.  When we use the runasset command we want it to use the domain name of whichever domain the computers is joined to.

Thanks,

@LogonDomain should give you the domain that the user is logged into.

Sincerely yours,Jeremy Landesjlandes@landeserve.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0