How do display name of logged in user in WIndows OS based machine?

0 favourites
  • 9 posts
From the Asset Store
Advanced inventory mechanics for your RPG game (Array-based). Take Items, split them, pick up them, read the description
  • Hi!

    I have question for making game display name of current logged in user. For example, if user Jhon is logged in display text "User Jhon is on" or if User FlowX6 is logged display "User FlowX6 is on". Basically, what I want is "User "computer username" is on" to be displayed. So, what should be written in "computer username" to display actual username.

    Tagged:

  • I'm not exactly sure what you are asking. Don't you just put the display as "User "&computerUsername&" is on."? Can you go more in depth with your question?

  • I remembered that in Construct Classic there was a plugin called System in which I could get almost all information about the operating system, in C3 I didn't find a plugin about that maybe you have to use the script to get this information

  • In C3 its called "Platform Info"

  • Browsers don't provide this information as it would expose personal information to websites, which would be a serious privacy violation (and may in fact be illegal these days...)

  • I'm not exactly sure what you are asking. Don't you just put the display as "User "&computerUsername&" is on."? Can you go more in depth with your question?

    Hi sorry for late reply. I'm designing game where at end it just bricks itself. Basically, to unbrick it you'll be needed to delete save file folder. And since my game is gonna be on Windows using NWJS that means save file is in AppData folder. So, what I need is to display that folder location and since everyone has different name on PC I need is to display that specific name for example C:\Users\"username"\AppData\Game . "Username" should be replaced by username of computer.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not exactly sure what you are asking. Don't you just put the display as "User "&computerUsername&" is on."? Can you go more in depth with your question?

    Sorry for late reply. I need to display specific name of logged in user in Windows. Since my game is designed to brick itself after completion and to unbrick it you'll be forced to delete save folder and since game is gonna be on Windows using NWJS means save folder is in AppData folder. And so, I need display location of that folder.

  • Browsers don't provide this information as it would expose personal information to websites, which would be a serious privacy violation (and may in fact be illegal these days...)

    Sorry for late reply. So it's not even possible using NWJS? What I needed is simple mechanic where game is aware of computers username.

  • Not possible.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)