Pat,
Still If I put a file on someone's desktop = more whining. Plus users will be sure to delete it if they don't know what it is (especially if it's named "IT Use - DO NOT DELETE")
I have changed the My computer name to "MY Computer @WKSTA" but some of the old naming standards have too long of names, and you get the "My Computer MAN00023..." and the last few digits are important. Never mind that the user is too dull to know that the "..." means there is more to the name, and the responses you get trying to explain that to them.
code:
SetConsole ("Hide")
BREAK ON CLS
;==============================================================================
;Checking for OS. [ 1 ] = Windows NT [ 2 ] = Windows 9x
;==============================================================================
$KEY ='HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}'
SELECT
;--[ Windows XP/2000 ]---------------------------------------------------------
CASE((@INWIN = 1)AND((@DOS = "5.1")OR(@DOS = "5.0")))
$RC = WriteValue($KEY,"LocalizedString","My Computer %%COMPUTERNAME%%","REG_EXPAND_SZ")
; ? @SERROR
;
;--[ Windows NT ]--------------------------------------------------------------
CASE(@INWIN = 1)
$RC = WriteValue($KEY,"","My Computer %%COMPUTERNAME%%","REG_EXPAND_SZ")
; ? @SERROR
;
;------------------------------------------------------------------------------
;--[ Windows ME/98/95 ]--------------------------------------------------------
CASE(@INWIN <> 1)
$RC = WriteValue($KEY,"","My Computer @WKSTA", "REG_SZ")
; ? @SERROR
;
;--[ Unknown OS ]--------------------------------------------------------------
CASE 1
$OS = "Unknown OS"
ENDSELECT
;==============================================================================
Rad,
I have username, need PC name
Rocco
[ 08. January 2003, 16:42: Message edited by: Rocco Capra ]
_________________________
I Love this board!!
--------------------
My DEV PC is running
KIX 4.22 WINXP Pro