Computer Description

(imported topic written by boostaz191)

I am using the script to change the computer description however it is not working the way I wanted, any help would be appreciated.

Script:

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

" “srvcomment”="{value of setting “Physical Location” of client as string}" & " - " & “{string value of select (“username from Win32_computersystem”) of WMI}” & " - " & “{string value of select (“Model from Win32_computersystem”) of WMI}”

Expexted Results:

Bldg 2-1 - mydom\doej - Latitude D820

current Results:

Bldg 2-1

(imported comment written by jessewk)

You’re mixing relevance into your action script without escaping it properly using curly braces. This should do what you want:

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

" “srvcomment”="{value of setting “Physical Location” of client as string" & " - " & “string value of select (“username from Win32_computersystem”) of WMI” & " - " & “string value of select (“Model from Win32_computersystem”) of WMI}”

Jesse

(imported comment written by boostaz191)

Jesse,

thanks for the help unfortunatley it did not work either.

(imported comment written by boostaz191)

Failed regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

" “srvcomment”="{value of setting “Physical Location” of client as string" & " - " & “string value of select (“username from Win32_computersystem”) of WMI” & " - " & “string value of select (“Model from Win32_computersystem”) of WMI}”

(imported comment written by jessewk)

Ooops… I left some extra quotes in there:

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

" “srvcomment”="{value of setting “Physical Location” of client as string & " - " & string value of select (“username from Win32_computersystem”) of WMI & " - " & string value of select (“Model from Win32_computersystem”) of WMI}"

(imported comment written by boostaz191)

still failing and I dont know why.

(imported comment written by BenKus)

Hi boostaz1,

I think since you have a “” in your results, the registry import is failing. Try to add “escape of” to the beginning of the relevance to properly escape the backslash so it is compatible with the registry import:

regset “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters” “srvcomment”="{escape of (value of setting “Physical Location” of client as string & " - " & string value of select (“username from Win32_computersystem”) of WMI & " - " & string value of select (“Model from Win32_computersystem”) of WMI)}"

Ben

(imported comment written by boostaz191)

Ben,

I heard you were the Man and I guess they were right. That worked awesome.

Thank You!