Jump to content

Makro: @Username


Recommended Posts

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

Link to comment
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>

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...