Jump to content

TightVNC Installation on Windows 7


Recommended Posts

Ok, I've been working at this for several weeks, searching around Google and anywhere else for a similar like issue that I am having. I have about 300 computers to deploy TightVNC (it has to be this due to a control switch used that only works with TightVNC) so naturally I want to automate it. The script that I have been using worked fine when the company was on Windows XP, but we have now started migrating over to Windows 7. Yes, it's been a headache, leave the grief of it behind, I know.

The only minor changes I had to do to it was change on where the installation was going to be coming from. Everything else seemed to have worked until the final step.

9sw3f9.png

This is the part that would never fill out completely. I've tried numerous options, commands, anything and everything. Below is the code. I know there is a big area commented out, that is only because I have been trying numerous methods of what I was doing and kept a history of what I have been doing. Obviously, the information in the password area is not, nor will be, the passwords used at this establishment. It is there as a "keep-place" holder for the real deal and is here for reference to see what the error could possibly be.

#RequireAdmin
;Runs the installer
ShellExecute("C:\BUSAPPS\FIFO_ACSA\1as Admin\tightvnc-2.7.10-setup-64bit.msi")
WinWaitActive("TightVNC Setup")
ControlClick("TightVNC Setup","",853)

;Accepts the terms of License Agreement
WinWaitActive("TightVNC Setup", "accept the terms in the License Agreement")
ControlClick("TightVNC Setup","", 918)
Sleep(500)
ControlClick("TightVNC Setup","",853)

;Chooses the type of installation
WinWaitActive("TightVNC Setup", "Choose Setup Type")
ControlClick("TightVNC Setup", "", 964)

WinWaitActive("TightVNC Setup", "File associations:")
ControlClick("TightVNC Setup", "", 853)

WinWaitActive("TightVNC Setup", "Ready to install TightVNC")
ControlClick("TightVNC Setup", "", 886)

;This is where it hangs
WinWaitActive("TightVNC Server: Set Passwords")
;ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] )
;ControlSend ( "title", "text", controlID, "string" [, flag = 0] )
;Send ( "keys" [, flag = 0] )
ControlClick ( "TightVNC Server: Set Passwords", "", 1091, "left" )
ControlClick ( "TightVNC Server: Set Passwords", "", 1084, "left" )
Send( "bfg")
ControlClick ( "TightVNC Server: Set Passwords", "", 1087 )
ControlSend ( "TightVNC Server: Set Passwords", "", 1087, "bfg" )
ControlClick ( "TightVNC Server: Set Passwords", "", 1086 )
ControlSend ( "TightVNC Server: Set Passwords", "", 1086, "bfgadmin" )
ControlClick ( "TightVNC Server: Set Passwords", "", 1088 )
ControlSend ( "TightVNC Server: Set Passwords", "", 1088, "bfgadmin" )
ControlClick ( "TightVNC Server: Set Passwords", "OK", 1 )
;Send ( "{TAB}" )
;Send ( "bfg" )
;Send ( "{TAB}" )
;Send ( "{TAB}" )
;Send ( "bfgadmin" )
;Send ( "{TAB}" )
;Send ( "bfgadmin" )
;Send ( "{ENTER}" )
;ControlClick ( "TightVNC Server: Set Passwords", "Protect control interface with an administrative password", 1094 [, button = "left" ] )
;ControlClick("TightVNC Server: Set Passwords", "", 1084)
;ControlSend("TightVNC Server: Set Passwords","password",1084,"bfg")
;ControlFocus("TightVNC Server: Set Passwords", "", "bfg")
;ControlSend("TightVNC Server: Set Passwords", "", "bfg", "bfg")
;Send("{TAB}ftwid") ;Types in password
;ControlClick("TightVNC Server: Set Passwords", "", 1094)
;ControlClick("TightVNC Server: Set Passwords", "password", 1086)
;Send("bfgadmin")
;ControlClick("TightVNC Server: Set Passwords", "password", 1088)
;Send("bfgadmin")
;ControlClick("TightVNC Server: Set Passwords", "", 1)

WinWaitActive("TightVNC Setup")

I even tried running a batch of the msi installer with the required options and even got errors on launching that.

Any help would greatly be appreciated as I am stumped on how to automate the whole process and not have to type in the passwords each and every time.

Thank you

Link to comment
Share on other sites

  • Moderators

Hi, semipcgeek, welcome to the forum. Is there a reason you're not doing this as a silent install? TightVNC has allowed silent installs since v.2.5.2, which would save you from all the GUI manipulation.

 

Edit: You can add all the properties you need, as well. To set the password, for example, you would do something like this:

ShellExecute("msiexec.exe", "/i <path to msi> SET_USEVNCAUTHENTICATION=1 VALUE_OF_USEVNCAUTHENTICATION=1 SET_PASSWORD=1 VALUE_OF_PASSWORD=PASS /qb")
Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

 

Hi, semipcgeek, welcome to the forum. Is there a reason you're not doing this as a silent install? TightVNC has allowed silent installs since v.2.5.2, which would save you from all the GUI manipulation.

 

Edit: You can add all the properties you need, as well. To set the password, for example, you would do something like this:

ShellExecute("msiexec.exe", "/i <path to msi> SET_USEVNCAUTHENTICATION=1 VALUE_OF_USEVNCAUTHENTICATION=1 SET_PASSWORD=1 VALUE_OF_PASSWORD=PASS /qb")

Because I would then always get this error when trying to run it in silent mode:

wjgz2d.png

Also tried various options under that method as well to ensure I get the passwords in place to no avail.

Link to comment
Share on other sites

  • Moderators

Just as an FYI, that is not an error - it is the msiexec executable telling you your syntax is incorrect.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...