Jump to content

Recommended Posts

Posted

This is what i have so far but I am unable to install it as a service silently. Is there a switch or something I'm missing?

Cheers

If FileExists("C:\Program Files\Tightvnc\WinVNC.exe") Then
        RunWait("C:\Program Files\Tightvnc\WinVNC.exe -install", "", @SW_HIDE) 
        Sleep(500)
    Else
    EndIf
Posted (edited)

Are you sure this is an AutoIt problem and not a WinVNC problem? Anyway after you install it as a service the popup window goes away within a few seconds.

Add: I was actually trying this at work a couple weeks ago using "sc create", but I couldn't get it working. Still trying...

Edited by MrMitchell
Posted

SC.exe is VERY picky, but finally got it working. Haven't tested if the service actually works though ^_^ I know it will start using "sc start winvnc" or after reboot, but it still needs a default password set. So...I think you might need to find a way to create a .vnc file then have your new service use it. I'm not sure how WinVNC works like that though so good luck!

sc create winvnc binPath= "\"C:\Program Files\TightVNC\WinVNC.exe\" -service" start= auto DisplayName= "VNC Server" type= own type= interact

Result:

[sC] CreateService SUCCESS

  • 2 weeks later...
Posted

Nice I never thought about going in that direction. I'll give it a try. To set the default password I just use regwrite before running the service.

RegWrite("HKEY_CURRENT_USER\Software\ORL\WinVNC3", "Password", "REG_BINARY", Binary('0x' & $Password))
RegWrite("HKEY_CURRENT_USER\Software\ORL\WinVNC3", "PasswordViewOnly", "REG_BINARY", Binary('0x' & $PasswordViewOnly))

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
×
×
  • Create New...