Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Mirror driver install causes "Driver installation failed"

Post Reply
segfault
Posts: 1
Joined: 2009-08-09 13:12

Mirror driver install causes "Driver installation faile

Post by segfault »

Hi everyone,

I am trying to perform an unattended install of UltraVNC 1.0.6.4 (including the UltraVNC mirror driver) via repackaging with Wise Package Studio 7.0 SP3 to produce a MSI. The target platform is Microsoft Windows XP SP3 x86.

I have successfully repackaged the files/.INI/shortcuts and even added a Custom Action to execute winvnc.exe -install after the files/.INI/shortcuts are copied to the installation folder to install and start the uvnc_service service. This works without any problems.

Where I am having problems is with the unattended install of the mirror driver as an additional Custom Action. After downloading the drivers.zip file, I can see two options to install the mirror driver in an unattended way:
  • Execute ..\driver\xp\install.bat (which simply executes setupdrv.exe install), or
  • Execute ..\driver\xp\install_silent.bat (which simply executes setupdrv.exe installs)
The first problem is that ..\driver\xp\install_silent.bat file (i.e., setupdrv.exe installs) does not work, as the driver is not installed after executing this (e.g., the mv2.dll file (and other driver related files) are not dropped into C:\Windows\System32 and the mv video hook driver2 is not present in the Device Manager > Display adapters). Is this what everyone else has experienced?

Regardless, this isn't so much of a problem as ..\driver\xp\install.bat (i.e., setupdrv.exe install) does appear to work (more or less silently) -- but only if you execute it manually! Which leads me to the second (i.e., the real) problem:
  • If I add a Custom Action into my MSI installation script to execute "C:\Program Files\UltraVNC\Mirror\setupdrv.exe" install, it fails with a Driver installation failed error and the mirror driver is not installed.
  • If I add a Custom Action into my MSI installation script to execute a VB script to copy the driver files into %Temp% and execute "%Temp%\setupdrv.exe" install, it also fails with a Driver installation failed error and the mirror driver is not installed.
  • If I add a Custom Action into my MSI installation script to execute a VB script to copy the driver files into C:\Temp (i.e., short path with no spaces) and execute "C:\Temp\setupdrv.exe" install, it again fails with a Driver installation failed error and the mirror driver is not installed.
Note: I copy the XP version (from drivers.zip) of setupdrv.exe, driver\mv2.cat, driver\mv2.dll, driver\mv2.inf, driver\mv2.sys into the target destinations above from my MSI as a Custom Action so the files are present on the target system during and after install time. I can run setupdrv.exe install from any of the above locations manually (i.e., from the Start > Run dialog) once my MSI copies the file across and it will execute and install the mirror driver fine which is strange.

Can anyone shed any light on these Driver installation failed errors? Are there any log files (or is it possible to turn logging on) for setupdrv.exe?

I found some older posts (several years old) on this forum that referenced the exact same Driver installation failed error message, but the proposed solutions were not helpful unfortunately.

Thanks in advance!
Last edited by segfault on 2009-08-09 14:22, edited 2 times in total.
hobbes
Posts: 3
Joined: 2009-09-24 18:17

Re: Mirror driver install causes "Driver installation f

Post by hobbes »

I am experiencing much the same problem. Using WPKG, if I set the client to "WPKG user interface" "Show", the unattended install script proceeds correctly. If I uncheck "Show", it doesn't work.

Logged in user rights doesn't seem to impact this at all; I attempted as a limited user as well as an admin.

Seems almost as if the command needs access to the local session to install. Can anybody shed some light on this?
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6865
Joined: 2004-04-23 10:21
Contact:

Re: Mirror driver install causes "Driver installation f

Post by Rudi De Vos »

MS block video driver installation from non local screen.
(using rdp)
You need to be in front of the PC or clone the real console session via vnc.
hobbes
Posts: 3
Joined: 2009-09-24 18:17

Re: Mirror driver install causes "Driver installation f

Post by hobbes »

Rudi De Vos wrote:MS block video driver installation from non local screen.
(using rdp)
You need to be in front of the PC or clone the real console session via vnc.
That makes me sad. Do we have any idea if that setting can be disabled? I'm digging around in gpedit.msc but not seeing anything useful.
csjjpm
Posts: 4
Joined: 2010-02-26 16:32

Re: Mirror driver install causes "Driver installation f

Post by csjjpm »

I am trying to use WPKG to deploy 1.0.8.2 and am having the same problem.

If I run the bat file or the .exe with install/s switch then it installs but using cmd /c or %comspec% /c is doesn't.

Does anyone know what setupdrv.exe does so that I can try to copy files and create a .reg myself?

Thanks
Paul
sheen
Posts: 3
Joined: 2011-03-21 16:35

Re: Mirror driver install causes "Driver installation f

Post by sheen »

Hi all,

I have the same issue.
I've made a .bat to install / update ultraVNC using PSExec


It works like a charm but I can't install the mirror drivers.
With "install" parameter, setupdrv.exe never end (and does not install)
With "installs" parameter, it does nothing

So I have to use my script to install VNC, then I have to use VNC to go throught a real admin session and install Mirror Drivers then reboot...


Is there really no way to install this driver via a non local session ?
If I have to deploy mv2.dll and launch some command and regedit keys it's not a problem.


Thanks.
Last edited by sheen on 2011-03-21 16:44, edited 5 times in total.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6865
Joined: 2004-04-23 10:21
Contact:

Re: Mirror driver install causes "Driver installation f

Post by Rudi De Vos »

Veirfy
[post=68270][/post]
sheen
Posts: 3
Joined: 2011-03-21 16:35

Re: Mirror driver install causes "Driver installation f

Post by sheen »

Thanks a lot, it works great with devcon =]
sheen
Posts: 3
Joined: 2011-03-21 16:35

Re: Mirror driver install causes "Driver installation f

Post by sheen »

Hi again ^^

I was able to install trusted certificate on Windows Seven and install silently mirror driver with Devcon.

But I can't do the same on Windows XP x86, this is what I'm doing :
- Install uvnc 1.0.9.6 x86
- In setup I check mirror drivers download to get the latest mirror drivers x86.
- I go in properties of mv2.dll and I install manually the certificate (let it export later, before I want to check if that works)
- I can see the certificate into certificate manager, trusted publisher section, in Internet Explorer (like in Windows Seven)
- I use devcon (x86) to install the mirror driver, but I got the warning concerning unsigned driver

I don't understand why because I've installed the mv2.dll certificate it should work like on Windows Seven but it does not : I have the unsigned driver warning.

Do you have any ideas please ?
Last edited by sheen on 2011-04-13 09:20, edited 5 times in total.
csjjpm
Posts: 4
Joined: 2010-02-26 16:32

Re: Mirror driver install causes "Driver installation f

Post by csjjpm »

sheen wrote: - I use devcon (x86) to install the mirror driver, but I got the warning concerning unsigned driver
In XP I got the same error about unsigned driver. I also install the certificate successfully.

Can someone help?
Thanks
bridge
8
8
Posts: 26
Joined: 2008-09-05 11:46

Re: Mirror driver install causes "Driver installation f

Post by bridge »

Have you downloaded the mirror driver recently? Although the mirror
driver files did not change with the release of 1.0.9.6, Rudi updated the
certificate to sometime in 2014. Prior to that change the mirror driver
cert was set to expire around April 10, 2011.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6865
Joined: 2004-04-23 10:21
Contact:

Re: Mirror driver install causes "Driver installation f

Post by Rudi De Vos »

XP does not support authenticode driver signing.

The only driver signing recognized by Windows XP is a WHQL signature.
Drivers need to be signed by MS.... this is to expensive and a paper hell.

For the installer we did a little trick to avoid the popup.

The setupdrv.exe we use detect the popup and press the ok button :D
This trick only works when you have a desktop, setupdrv need to be able
to detect the popup window. (Running setupdrv from some service without a logon is likely to fail to press the ok button.)
Bamzi
Posts: 1
Joined: 2011-08-30 07:42

Re: Mirror driver install causes "Driver installation failed

Post by Bamzi »

I looked through all your requirements and followed all of them, and now it all worked out. It works perfectly with devcon:)
Atticus
Posts: 2
Joined: 2012-12-16 21:01

Re: Mirror driver install causes "Driver installation failed

Post by Atticus »

Wrote a powershell script which seems to work on Win7 and WinXP boxes. The setupdrv.exe line would cause the HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce key to run whatever was in it, so I disabled it for the line. This is only a section of a bigger script which reboots and runs while starting. I renamed the folders to xp32, xp64, vista32, and vista64 (no W2K folder). Needed to rename them to keep the code short. I exported the certificate from mv2.dll (Properties > Digital Signatures > Details> View Certificate > Details > Copy to File...). Here is the section of script:

Code: Select all

function Import-509Certificate {
	#http://www.orcsweb.com/blog/james/powershell-ing-on-windows-server-how-to-import-certificates-using-powershell/
	param(
	[String]$certPath,
	[String]$certRootStore,
	[String]$certStore
	)    
  
   $pfx = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2    
   $pfx.import($certPath)    
  
   $store = New-Object System.Security.Cryptography.X509Certificates.X509Store($certStore,$certRootStore)   
   $store.open(“MaxAllowed”)    
   $store.add($pfx)    
   $store.close()    
}   
Import-509Certificate (Resolve-Path .\driver\sign.cer | select -ExpandProperty Path) LocalMachine TrustedPublisher
$Global:os = (Get-WmiObject -Class  Win32_OperatingSystem).Version
$Global:arch = (Get-WmiObject -Class  Win32_Processor).AddressWidth
if ( $os -ge 6 ) {
	$folder = "vista"
	netsh advfirewall firewall DELETE rule name="VNC server for win32" | Out-Null
	netsh advfirewall firewall DELETE rule name="winvnc.exe" | Out-Null
	netsh advfirewall firewall ADD rule NAME="VNC server for win32" DIR=in ACTION=allow PROGRAM="$(Resolve-Path winvnc.exe | select -ExpandProperty Path)" | Out-Null
} else { 
	$folder = "xp"
	netsh firewall DELETE AllowedProgram PROGRAM="$(Resolve-Path winvnc.exe | select -ExpandProperty Path)" | Out-Null
	netsh firewall ADD AllowedProgram PROGRAM="$(Resolve-Path winvnc.exe | select -ExpandProperty Path)" NAME="VNC server for win32" MODE=ENABLE SCOPE=Subnet | Out-Null
}
Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce -Name Update
Push-Location .\driver\$folder$arch\
.\setupdrv.exe install
Get-Process setupdrv | Wait-Process
Pop-Location
New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce -Name Update -PropertyType String -Value "$PSHOME\powershell.exe `"$(((New-Object -ComObject Scripting.FileSystemObject).GetFile((Resolve-Path .\Main-Switch.ps1))).ShortPath)`"" -Force >$null
Hope this helps someone.
Driver
Posts: 1
Joined: 2012-12-21 15:23

Re: Mirror driver install causes "Driver installation failed

Post by Driver »

Atticus wrote:Wrote a powershell script which seems to work on Win7 and WinXP boxes. The setupdrv.exe line would cause the HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce key to run whatever was in it, so I disabled it for the line. This is only a section of a bigger script which reboots and runs while starting. I renamed the folders to xp32, xp64, vista32, and vista64 (no W2K folder). Needed to rename them to keep the code short. I exported the certificate from mv2.dll (Properties > Digital Signatures > Details> View Certificate > Details > Copy to File...).
Can you explain more how to run this on every computer in a domain? Is it possible to deploy this in GPO? Where to put this script and how to run it?
Post Reply