Simples
asked on
Simple VB script needed
Hi all,
I would like someone to write a VB script for me if they would be so kind.
I need to run RealVNC in reverse mode.
What I need is a dialog box that can run from a shortcut from the Windows 7 desktop. the dialog box should accept the computer name or IP address and put the data typed in by the user into the address bit of this command : "C:\Program Files\RealVNC\VNC4\winvnc4 .exe" -service -connect address
Additionally I would also like the above RealVNC command to run as administrator as no user has admin rights to their PC but this is required fro the command to run successfully.
Many thanks
S.
I would like someone to write a VB script for me if they would be so kind.
I need to run RealVNC in reverse mode.
What I need is a dialog box that can run from a shortcut from the Windows 7 desktop. the dialog box should accept the computer name or IP address and put the data typed in by the user into the address bit of this command : "C:\Program Files\RealVNC\VNC4\winvnc4
Additionally I would also like the above RealVNC command to run as administrator as no user has admin rights to their PC but this is required fro the command to run successfully.
Many thanks
S.
Simples, did the code in the last post here help you out https://www.experts-exchange.com/questions/28212410/VNC-script-for-users.html or do you need something different. If the bottom answer is what worked, we can get that answer changed.
ASKER
No sorry it's a very clunky looking DOS box ( showing my age here). I'd like a decent looking dialog box ! Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for this info. I am getting an error when running the script however. (I copied and pasted it so no typo's). the correct version of VNC is installed at the correct location and the exe file is there. I can run
I enter the ip address and then I have an error window appearing from Windows Script Host telling me that at at line5, char 1 there is a Type mismatch:'[string:C:\Progr am Files\Rea"]. and the code is 800A000D.The source is Microsoft VBScript runtime error. I am logged into the PC as the local admin.
The command C:\Program Files\RealVNC\VNC4\winvnc4 .exe -service -connect " & address, 1, false does run perfectly when in a command prompt window but not from the script
I enter the ip address and then I have an error window appearing from Windows Script Host telling me that at at line5, char 1 there is a Type mismatch:'[string:C:\Progr
The command C:\Program Files\RealVNC\VNC4\winvnc4
it could be escape character related ie the backslash so you could try
WshShell.Run "C:\\Program Files\\RealVNC\\VNC4\\winv nc4.exe -service -connect " & address, 1, false
or even the space in Program Files
WshShell.Run "C:\""Program Files""\RealVNC\VNC4\winvn c4.exe -service -connect " & address, 1, false
or a combination of the both :)
WshShell.Run "C:\\""Program Files""\\RealVNC\\VNC4\\wi nvnc4.exe -service -connect " & address, 1, false
WshShell.Run "C:\\Program Files\\RealVNC\\VNC4\\winv
or even the space in Program Files
WshShell.Run "C:\""Program Files""\RealVNC\VNC4\winvn
or a combination of the both :)
WshShell.Run "C:\\""Program Files""\\RealVNC\\VNC4\\wi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.