dspent Posted April 12, 2004 Share Posted April 12, 2004 If I set a variable equal to a macro how would I write it... meaning which is correct? $DomainName = "@LogonDomain" or $DomainName = @LogonDomain Thanks Link to comment Share on other sites More sharing options...
esfalk Posted April 12, 2004 Share Posted April 12, 2004 I'd assume the latter. $DomainName = @LogonDomain Link to comment Share on other sites More sharing options...
dspent Posted April 12, 2004 Author Share Posted April 12, 2004 Thanks......that is the correct way....no quotes. Link to comment Share on other sites More sharing options...
ZenKensei Posted April 12, 2004 Share Posted April 12, 2004 Keep in mind that you may not actually need to declare this variable ($DomainName), you may be able to simply use @LogonDomain in the place of the variable within your scripts. The next single line of code returns the same value as the 2 lines of code where the variable is first declared. Example: MsgBox(0, "Window Title", @ComputerName) returns the same info as $CompName = @Computername MsgBox(0, "Window Title", $CompName) Of course it all depends on how your planning to use the variable, but its something you may find useful in certain situations. Z/K Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now