cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pice
Engaged Sweeper III
Good Morning,

we currently have a problem with a few hundred hosts with incorrect or no computer description entered. We already found a working solution using psexec.exe from the sysinternals suite to accomplish it via the command line, but we would love to add it to lansweeper as a custom action. We´ve tried to add it in several attempts, but it seems that we are running against a wall.

The Command line is:
PsExec.exe \\hostname reg add HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters /v srvcomment /d "Custom Computer Description" /f

We would love the wenn clicking the custom action, the user is asked to enter the wanted Computer Description Tag and nothing more...

Can somebody help us accomplish that?
1 REPLY 1
dteague
Engaged Sweeper III
Here is what I do, I'm sure I got it from a post here a long time ago...

I Call it "Change Description"
cmd.exe /C {actionpath}change_comp_desc.vbs {smartname}


Change_Comp_desc.vbs
Set WshNetwork = WScript.CreateObject("WScript.Network")

strComputer = Wscript.Arguments.Item(0)
strDescription = Inputbox("Enter Description:")

Set Obj= GetObject("winmgmts:\\" & strComputer).InstancesOf("Win32_OperatingSystem")
For Each x In Obj
x.Description = strDescription
x.Put_
Next

WScript.Quit

Hope That Helps!