Bug Report - Incomplete %ComputerName%

Discuss new features and functions
Posts: 10
Joined: 1 Oct 2018

harryytm

The name of my laptop is currently named "ASUS-VIVIOBOOK-S14", but when I use %ComputerName% as path it would become "ASUS-VIVIOBOOK-".

I am currently using Windows 11 (Version: 23H2) x86_64
User avatar
Posts: 2453
Joined: 22 Aug 2012

Plerry

It is questionable if this is an FFS bug, as %ComputerName% is a (Windows) environment variable.
What does your computer show when you open a command shell (search for CMD) and type
echo %ComputerName% ?
If that is already incorrect, this is not an FFS issue.
User avatar
Posts: 4059
Joined: 11 Jun 2019

xCSxXenon

The max length for computer names is 15. Change your computer name in Settings
Posts: 1038
Joined: 8 May 2006

therube

Curious.
If you run HOSTNAME from a C: prompt, does that show ASUS-VIVIOBOOK-S14 or ASUS-VIVIOBOOK- ?

C:\> HOSTNAME


(Seems the maximum length can be >15, but certain features, like NETBIOS may not work as expect with longer length names.)
Posts: 10
Joined: 1 Oct 2018

harryytm

Curious.
If you run HOSTNAME from a C: prompt, does that show ASUS-VIVIOBOOK-S14 or ASUS-VIVIOBOOK- ?

C:\> HOSTNAME


(Seems the maximum length can be >15, but certain features, like NETBIOS may not work as expect with longer length names.) therube, 29 Nov 2023, 18:08
Result is ASUS-VIVIOBOOK-S14
User avatar
Posts: 2453
Joined: 22 Aug 2012

Plerry

Note that HOSTNAME and ComputerName are different beasts.
You (harryytm) never reacted to my initial reply about ComputerName ...
User avatar
Posts: 4059
Joined: 11 Jun 2019

xCSxXenon

The max length for computer names is 15. Change your computer name in Settings xCSxXenon, 29 Nov 2023, 17:08
Posts: 10
Joined: 1 Oct 2018

harryytm

You (harryytm) never reacted to my initial reply about ComputerName ... Plerry, 02 Jan 2024, 12:11
Sorry I missed your post, the answer is "ASUS-VIVIOBOOK-".
Posts: 10
Joined: 1 Oct 2018

harryytm

Since I figure out the limitations of %ComputerName% and not a bug in the first place, I make it into a feature request instead.
Feature request - adding internal macro %HOSTNAME%
User avatar
Posts: 2453
Joined: 22 Aug 2012

Plerry

It sounds a bit strange, but the Manual page on Macros suggests FFS does only(?) support the listed (Windows) Environment Variables.
Did you simply try using %HOSTNAME%?

If that fails, it seems that, until HOSTNAME would be added to the supported variables (if ever ...), you can always go the way of defining a custom variable that is assigned the value of HOSTNAME.
This, as described in the example on the Macros Manual page.