cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VNC Password Change

VanDutch
Engaged Sweeper
Looking to get a action to prompt to change the VNC password. I have it partial setup to change it using VNCPWD.exe (see http://www.sysworksoft.net/products/vncpwd.html ). Only thing is I would like a Windows prompt to come up and ask me what I want to change it to like the Computer Description action does that ejensen did here : http://www.lansweeper.com/forum/yaf_postst417_Change-the-computer-description.aspx

Thanks-
1 ACCEPTED SOLUTION

Cobra7
Champion Sweeper
By the looks of the message there are a couple things wrong. It looks like a powershell message so I'm going to assume it is unless you say otherwise.

1. It says that is line 1 when it should be line 6 or so, did you copy the entire code?

2. In the script, you need to hard code the path (\\server\share\VNCPWD.exe), not put in {actionpath}.

View solution in original post

5 REPLIES 5

Cobra7
Champion Sweeper
By the looks of the message there are a couple things wrong. It looks like a powershell message so I'm going to assume it is unless you say otherwise.

1. It says that is line 1 when it should be line 6 or so, did you copy the entire code?

2. In the script, you need to hard code the path (\\server\share\VNCPWD.exe), not put in {actionpath}.

VanDutch
Engaged Sweeper
Sorry for the late responce but didn't get a chance to test it until now.

Getting:

Unexpected token 'VNCpwd.ps1' in expression or statement.
At line:1 char:23
+ {axtionpath}VNCpwd.ps1 <<<< GOT112
+ CategoryInfo : ParserError: (VNCpwd.ps1:String) [], ParentConta
insErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken

Any ideas?

Cobra7
Champion Sweeper
This is a Powershell script.

Command should be something like:

powershell.exe -noexit \\server\share\scriptname.ps1 {computer}




if ($args -ne $null) {$PC = $args[0]}
Else {$PC = Read-Host "Enter printer name"}

$pass = Read-Host "Enter the new password"

& "Hard code path here!"VNCPWD.exe /v:$PC /h:$pass /u:DOMAIN1\adminusername /p:adminpassword

write-host "Password for PC " $PC " changed to " $pass


Since I don't have a setup like this I can't test for sure. Let me know if any errors pop up.

Make sure you hard code the path where it says "Hard code path here!".

VanDutch
Engaged Sweeper
Basically what I have now is:
cmd.exe /k {actionpath}VNCPWD /v:{computer} /h:{computer} /u:DOMAIN1\adminusername /p:adminpassword

When I click on this I get a cmd window that says that the VNC password has been changed...

The above code just changes the {computer]'s vnc password to the {computer} name. Which is fine, but I would prefer an input box.

What I want to happen is when I click on it, I would like to get a vbs input box that ask for "Enter new VNC Password:" Then when I click OK, have it enter that text into the VNCPWD code.

If you need more info, let me know.

Thanks-

Cobra7
Champion Sweeper
Not exactly sure what your asking for.

From what I understand, you want to bring up a computer in Lansweeper, click a custom action, have a windows pop up asking for the new password, then run a command line useing that password as part of a text string?

If I am correct, can you please give me the format of the command line you want to use?