Sign in to follow this  
Followers 0
Flok3r

Makro: @Username

5 posts in this topic

Hi,

This is probably simple:

Where are information for makros like @username and @desktopdir, which include the username, grabbed from?

I need to do it manually, because my script starts before user logon (as system) and shouldn't be restarted for that purpose.

So is there any key in the registry?

For Win 7 i found this, but unfortunately it doesn't exist in XP.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser

I appreciate any help giving me the currently logged on username,

Thanks in advance,

Flok3r

Share this post


Link to post
Share on other sites



HKLM\Software\Microsoft\WindowsNT\CurrentVersion\WinLogon

Value: "DefaultUserName"


#include <ByteMe.au3>

Share this post


Link to post
Share on other sites

Thanks, i ve already read about it, but somehow didnt find it in win 7.

However, i ll simply use this in xp and the other in win 7.

Share this post


Link to post
Share on other sites

You could you @OSVersion to switch between the different operating systems. That will make it so you don't have to write two different scripts for various systems.

If @OSVersion = "WIN_XP" Then
    RegRead.....
Else
    RegRead.....
EndIf

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites

Ye, as i thought, thanks.

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