archrival Posted November 27, 2004 Share Posted November 27, 2004 (edited) My roommate asked me if there was a way to start/stop/connect to a network machine via VNC through Network Neighborhood. I didn't know, couldn't find anything relevant, so I decided to write my own. I decided to make this as an installer as well. It will write to HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall, has a versioning system, allows upgrades, selection of installation directory, VNC type etc. This probably needs a README, but I haven't made one yet. I hadn't planned on releasing this, but I find it rather useful. I also have plans to add an option to display all services running on remote machine, firstly I have plans for remote desktop. This currently needs psservice.exe from sysinternals.com and a vncviewer (by default I use ultravnc). There is also a configuration file (vncview.ini in the installation directory), that allows you to set options. I have it only work as an executable and not a script as well. I think if you just take a look at my sloppy code, you can figure it out. What I'd really like is some feedback, this is my first real attempt at organized code. Find problems with my code, ineffeciencies, mistakes, etc. To install it, just double click on it after compiling. It will not attempt to install when run from the directory it was installed to. I've also included the ultravnc icon to make it pretty. I'll make sure to post each revision as I make it.http://www.autoitscript.com/fileman/users/public/archrival/vncview.au3http://www.autoitscript.com/fileman/users/public/archrival/vnc.icoIf you have any questions about my script, please ask.Edit:Current version: 1.42.9.7Changes to 1.42.9.4:Display installation defaults when electing to no change defaults.Code cleanup.Changes to 1.42.9.7:Remove unneeded () from EndFuncImproved upgrade process, will now query file version and will not blindly copy over the same file version. I know this will cause problems with different vncviewer types, but I assume if you are upgrading you will be copying the same vncviewer. Will probably change to only copy vncview.exe in the future.Added option to specify machine name in INI file, the only 2 options available are in this example:[Location]psservice=C:\VNCView\psservice.exevncviewer=C:\VNCView\vncviewer.exescale=100port=5900view=nofull=notoolbar=noauto=noimplementation=ultra[archrival]view=yesport=4321 Edited November 30, 2004 by archrival Link to comment Share on other sites More sharing options...
archrival Posted November 27, 2004 Author Share Posted November 27, 2004 (edited) All changes are now in VNC Plugin Ver. 2 Edited December 2, 2004 by archrival Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 27, 2004 Share Posted November 27, 2004 I'm sorry, I dont quite understand what your application does. I just got done automating what I want on VNC. I need remote machines to email me ip/port/password changes. I have created a script that will do just that. I may be able to use it with your script to make it more handy, though I am not sure as I am not certain as to what your script does. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
archrival Posted November 27, 2004 Author Share Posted November 27, 2004 Let me clarify a little:We worked at a company with 1000+ NT & XP Pro. machines in the domain. We used VNC to connect remotely to setup email, remove spyware and basically for whatever else we could do without leaving our desk. We had a 3rd party program called Hyena which is a fairly robust domain management tool that had some VNC connectivity built in. I wanted to make a freeware program that mainly offered the VNC connectivity part. So what I came up with allows you to right click on a machine name in your domain or workgroup in Network Neighborhood/View Workgroup Computers and it gives you these 4 options:---> Start VNC Service and Connect---> Check Status Of VNC Service---> Start VNC Service---> Stop VNC ServiceThose should all be self explanatory. It wil tell you whether or not the service is started, disabled, stopped, does not exist or if access is denied while retrieving the service list. It's a relatively simple concept that I've probably made way too complicated. It's configured through an INI file. You can basically change the port to connect to, whether you want it to be fullscreen and the flavor of the VNC viewer you are using (ultra, real or tight). That was the end of my initial program. I let it sit around for a while and then decided I wanted to see if I could make the file self install. That was a days worth of work, but it works and it's alot easier to distribute now since it will add the proper registry entries, move the files to the proper place, etc. Like I said, I do have plans to extend the functionality, like added support in the INI file for configuring each machine differently (mainly a different port). I also have plans for Remote Desktop and maybe down the road implementing the starting and stopping of any service. I hope that clears it up. Link to comment Share on other sites More sharing options...
JSThePatriot Posted November 28, 2004 Share Posted November 28, 2004 It does... that is excellent. I have seen your code and am still looking it over. There are alot of lines. It looks really good from what I have seen thus far. I like it. Good work, JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
archrival Posted November 28, 2004 Author Share Posted November 28, 2004 Yeah, there's a lot lines... :"> I like to be precise, I was trying to account for any and every situation. Parts of the code I'm sure could be streamlined a lot better. That's part of the reason why I posted it. Link to comment Share on other sites More sharing options...
trids Posted November 29, 2004 Share Posted November 29, 2004 Very nice .. Thanks, this will come in handy! Link to comment Share on other sites More sharing options...
bcording Posted November 29, 2004 Share Posted November 29, 2004 A little dated, but along the same lines, is Gencontrol. It takes TightVNC and makes it act like DameWare Remote Control.Gencontrol Homepage Link to comment Share on other sites More sharing options...
archrival Posted November 29, 2004 Author Share Posted November 29, 2004 A little dated, but along the same lines, is Gencontrol. It takes TightVNC and makes it act like DameWare Remote Control.Gencontrol Homepage<{POST_SNAPBACK}>Looking at that site gave me the idea of searching for all machines with the VNC service running. It should be rather easy to do. This has become one of those "Ok, I'll add this and this just to see if I can do it." It's handy for me though, so that's all that matters. Link to comment Share on other sites More sharing options...
erebus Posted November 30, 2004 Share Posted November 30, 2004 You may want to change some lines like this: Func CheckFileExist() If FileExists($psservice) Then Sleep(0) Else ... EndIf To: Func CheckFileExist() If Not FileExists($psservice) Then ... EndIf By using a NOT there is no need to do a Sleep(0) just to fill the first If statement.. I hope it is clear.. Pretty good job though Link to comment Share on other sites More sharing options...
archrival Posted November 30, 2004 Author Share Posted November 30, 2004 You may want to change some lines like this:Func CheckFileExist() If FileExists($psservice) Then Sleep(0) Else ... EndIfTo:Func CheckFileExist() If Not FileExists($psservice) Then ... EndIfBy using a NOT there is no need to do a Sleep(0) just to fill the first If statement.. I hope it is clear..Pretty good job though <{POST_SNAPBACK}>Yeah, I wrote those before I realized I could use NOT in those statements. I also don't like the length of my variable names, I did it for ease of use, and even then I'm confused by some of them. Thanks for the input! Like I said, it's my first real structured script. I'd like to learn C/C++ and I figure this is a better stepping stone (than just forcing myself to learn it) for me because it allows me to learn the most efficient way of accomplishing a task. I've done mostly batch files, I needed a scripting language I could compile into an .exe file, mainly because virus checkers like to disable vb scripts. AutoIt has been perfect for me. It allows me to do pretty much everything I've needed! I love it. Link to comment Share on other sites More sharing options...
erebus Posted December 1, 2004 Share Posted December 1, 2004 I've done mostly batch files, I needed a scripting language I could compile into an .exe file, mainly because virus checkers like to disable vb scripts. AutoIt has been perfect for me. It allows me to do pretty much everything I've needed! I love it.<{POST_SNAPBACK}>Same here.. Link to comment Share on other sites More sharing options...
archrival Posted December 1, 2004 Author Share Posted December 1, 2004 Updated yet again to 1.43.0.1:Changes since 1.42.9.7:Rewrote status functions into one function, Status()Hopefully improved accuracy of status checking. Probably need to add check for user rights, obviously if you don't have access rights to the machine you are checking you can't start or stop the service and you also can't check to see if it's disabled.Fixed If FileExists issues thanks to Erebus.If upgrading to newer version, you only need vncview.exe as long as the currently installed directory still has the vnc viewer and psservice.That's probably the end of my VNC changes, next will be a major overhaul to add Remote Desktop support and to fix user rights issues which will probably take me a little longer to implement. You don't need to know every change anyway, I'll just make and update the readme file from now on. Link to comment Share on other sites More sharing options...
JDaus Posted September 2, 2008 Share Posted September 2, 2008 dam ... would have liked to have had a look at this, but the file is no longer available. ask a silly question and remain a fool for 5 minutes...don't ask, and remain a fool for life__JD - YTS | VNC2Me - Secure remote Desktop Support Solutions Link to comment Share on other sites More sharing options...
weaponx Posted September 2, 2008 Share Posted September 2, 2008 dam ... would have liked to have had a look at this, but the file is no longer available.Perhaps you could use VNC Neighborhood Link to comment Share on other sites More sharing options...
JDaus Posted September 3, 2008 Share Posted September 3, 2008 Perhaps you could use VNC Neighborhoodthanks for the link, but i wanted to incorporate some of the features into my own apps i just noticed that the author is still active, perhaps he still has a copy (fingers crossed) ask a silly question and remain a fool for 5 minutes...don't ask, and remain a fool for life__JD - YTS | VNC2Me - Secure remote Desktop Support Solutions Link to comment Share on other sites More sharing options...
dmob Posted September 3, 2008 Share Posted September 3, 2008 (edited) i just noticed that the author is still active, perhaps he still has a copy (fingers crossed)I hope so too. I use VNC a lot and I would like to automate it. Edited September 3, 2008 by dalisuit Link to comment Share on other sites More sharing options...
archrival Posted September 5, 2008 Author Share Posted September 5, 2008 (edited) dam ... would have liked to have had a look at this, but the file is no longer available. I wish it were still available too, I'd like to see it... I did find an old version of it in my email, from 9/24/2004. Maybe you'll find it useful. vncview.zip Edited September 5, 2008 by archrival Link to comment Share on other sites More sharing options...
dmob Posted September 7, 2008 Share Posted September 7, 2008 Thank you, will check it out. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now