Sign in to follow this  
Followers 0
happy2help

Win7 and VNC

7 posts in this topic

Hi All

I'm having problems with my script. It works fine in WinXP with the same VNC installation setup. But when WinVNC runs as a service, there is 2 winvnc.exe in task manager. in XP you can kill them, but in Win7 1 says "access denied" when you try to "close process".

1 option is to not run it as a service, but to run VNC in the "startup" folder (not ideal!)

If ProcessExists("winvnc.exe") Then
        ProcessClose("winvnc.exe")
        Sleep(1000)
        If ProcessExists("winvnc.exe") Then
            ProcessClose("winvnc.exe")
        EndIf
        Sleep(1000)
        If ProcessExists("winvnc.exe") Then
            ProcessClose("winvnc.exe")
        EndIf
        If ProcessExists("winvnc.exe") Then
            ProcessClose("winvnc.exe")
        EndIf
        MsgBox(0,"testing","testing")
        Run("C:\Program Files\UltraVNC\winvnc.exe")
        Exit
    EndIf
    
    If ProcessExists("winvnc4.exe") Then
        ProcessClose("winvnc4.exe")
        Sleep(1000)
        If ProcessExists("winvnc4.exe") Then
            ProcessClose("winvnc4.exe")
        EndIf
        Sleep(1000)
        If ProcessExists("winvnc4.exe") Then
            ProcessClose("winvnc4.exe")
        EndIf
        If ProcessExists("winvnc4.exe") Then
            ProcessClose("winvnc4.exe")
        EndIf
        Run("C:\Program Files\RealVNC\VNC4\winvnc4.exe")
    EndIf

Share this post


Link to post
Share on other sites



Some process in Win7 can't be closed unless your "Admin".

You can find some hacks on the net to change your standard account to have "Admin" rights.

or..

Just run your script as admin (Right-Click Run as Administrator)

Steve


They call me MrRegExpMan

Share this post


Link to post
Share on other sites

Thanks for the help.

I now call the script from another script which has #RequireAdmin at the top.

Then "new" problem is i now get "Open File - Security Warning" when it runs from my Startup folder. How do i permanently authorize AutoIt to run? I don't want to compile it as i like changing it on the fly.

Help!!

Share this post


Link to post
Share on other sites

You need to change UAC in windows7 it sucks, you can turn it off in control panel :D


They call me MrRegExpMan

Share this post


Link to post
Share on other sites

Don't disable UAC. There's nothing wrong with it.

You can't permanently add a program to clear UAC. It's designed to ask every time a program needs administrator access. Otherwise programs could load "UAC cleared" programs and get access through them. And you don't want that since it would defeat the entire security model.

Share this post


Link to post
Share on other sites

I've cracked it!! no more annoying alerts!!

In Win7, if you want to run any scripts without annoying alerts, then create it as a Scheduled Task!

As a Task, it has higher privileges and is started by SYSTEM account.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

You need to change UAC in windows7 it sucks, you can turn it off in control panel :mellow:

UAC sucks, don't be cheap buy a decent AV like ESET and you do not need UAC. Its annoying prevents too much and should of been left on vista.

Edited by Steveiwonder

They call me MrRegExpMan

Share this post


Link to post
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
Sign in to follow this  
Followers 0