Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

REQ Virtual CloneDrive 5111 silent method

- - - - -

  • Please log in to reply
23 replies to this topic

#1
Astalavista

Astalavista

    MSFN loyalist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,338 posts
  • Joined 02-December 03
:hello: anyone have the silent install method for this baby?


How to remove advertisement from MSFN

#2
MHz

MHz

    Just simple

  • Member
  • PipPipPipPipPipPipPip
  • 1,662 posts
  • Joined 02-August 04
  • OS:Windows 7 x64
  • Country: Country Flag
It is a NSIS installer. Use /S to install.
Look out for the unsigned driver window + the reboot dialog, that will popup. :rolleyes:

#3
Astalavista

Astalavista

    MSFN loyalist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,338 posts
  • Joined 02-December 03
@mhz

I got as far as the /s then i get blocked by the Unsigned Driver.

#4
MHz

MHz

    Just simple

  • Member
  • PipPipPipPipPipPipPip
  • 1,662 posts
  • Joined 02-August 04
  • OS:Windows 7 x64
  • Country: Country Flag

@mhz

I got as far as the /s then i get blocked by the Unsigned Driver.

I suspect that may not be a problem with your winnt.sif entry for unsigned drivers?
Though, this Au3 script will check for it. It will close the reboot dialog as well.
Sort the code with the comments showing arrows.

Attached Files



#5
Astalavista

Astalavista

    MSFN loyalist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,338 posts
  • Joined 02-December 03
Is there a way to disable unsigned driver window completely?

is it a service that we can turn of via registry tweaks?

#6
coucou

coucou

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 837 posts
  • Joined 01-January 04
@MHz: I tested today yr .au3 installer with the latest release Virtual CloneDrive 5.1.1.1 , It check for unsigned drivers NOT close the reboot dialog.

Here bellow i made mine which check for unsigned drivers and close the reboot dialog. Tested working

Enjoy
coucou

#7
oskingen

oskingen

    MSFN Friend

  • Member
  • PipPipPipPip
  • 613 posts
  • Joined 20-January 08
  • OS:none specified
  • Country: Country Flag
There is a way to disable the unsigned driver prompt for virtual clone drive in vista sp1. I mean a command line i can use during the silent installation. something like

comand to disable unsigned driver....
start /wait virtualclonedrive....
command to enable unsigned driver...

#8
dbradtbe

dbradtbe
  • Member
  • 8 posts
  • Joined 29-September 03
I am pretty sure I have gotten this to work.
Long winded approach though.

First you need to start the install manually and when it stops at the untrusted driver stage look in the TEMP folder and find the sub folder that contains the extracted Clone Drive Files. Take a copy of the vclone.cat file in this folder.
Cancel the installation. This may still say this has installed but the driver will not work. Just got to Add/Remove programs and remove it.

Using the vclone.cat file from the files you copied right click and select properties.
Select Digital Signatures
Select Elaborate Bytes AG in the Signature list box.
Click Details
On the Digital Signature Details window select the General Tab
Click View Certificate
On the Certificate window select the Details Tab
Click Copy to File
On the Certificate Export Wizard window click Next
I chose the Cryptographic Message Syntax Standard - PKCS #7 Certificates (.P7B) radio button and then ticked the Include all Certificates in the certification path if possible.
Click Next
Save the file to where you want to keep it.
Click Next
Click Finish
Click Ok
Close all the open windows.

Now to pre import the certificate into the certificate store so that the software will install silently I used the following command line with administrative priviledges.
certutil -addstore "TrustedPublisher" vclone.p7b
This import the certificate that we exported before and now run
setupvirtualclone.exe /S
to install silently.

So with a little prepartion it should be possible to completely silently install Virtual Clone Drive
With these two commands.
certutil -addstore "TrustedPublisher" vclone.p7b
setupvirtualclone.exe /S

#9
rodyefew

rodyefew

    Newbie

  • Member
  • 11 posts
  • Joined 02-August 09
Hi There,

I've tried the certificate import method on XP, to no avail.

I've adapted some code, credit to the following:

/* This program turns the Driver signing Policy On/Off for Windows XP
 * Written by Stefan `Sec` Zehl <sec@xxxxxx>, 15.11.2004
 *
 * Thanks to sysinternals.com for regmon and apispy
 *		to msdn.microsoft.com for windows reference
 *		to cygwin for their environment
 */


See also, at http://www.911cd.net...showtopic=19316


and have come up with the attached exe file. Fixed some basic logic bugs. Works on my XP like this:

@echo off
SigVerifOnOff.exe off
start /wait SetupVirtualCloneDrive5432.exe /S
SigVerifOnOff.exe on
del "C:\Documents and Settings\All Users\Desktop\Virtual CloneDrive.lnk"
cscript /nologo fixLetter.vbs

I also ripped most of this code form somewhere to ensure a drive letter. Note that each instance of VCD will be changing instance numbers, so some more smarts needs to be built into it:

On Error Resume Next 

'Device IDs 
DeviceID1 = "SCSI\CDROM&VEN_ELBY&PROD_CLONEDRIVE&REV_1.4\1&2AFD7D61&0&000" 
DeviceID2 = "SCSI\CDROM&VEN_ELBY&PROD_CLONEDRIVE&REV_1.4\1&2AFD7D61&1&000" 
DeviceID3 = "SCSI\CDROM&VEN_ELBY&PROD_CLONEDRIVE&REV_1.4\1&2AFD7D61&2&000" 
DeviceID4 = "SCSI\CDROM&VEN_ELBY&PROD_CLONEDRIVE&REV_1.4\1&2AFD7D61&3&000" 
DeviceID5 = "SCSI\CDROM&VEN_ELBY&PROD_CLONEDRIVE&REV_1.4\1&2AFD7D61&4&000" 

strComputer = "." 
Dim nRtn, WshShell 
Set WshShell = WScript.CreateObject("WScript.Shell") 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 
Set colItems = objWMIService.ExecQuery("Select * from Win32_CDROMDrive") 

Dim driveFound 
driveFound = False

For Each objItem in colItems 
'WScript.Echo objItem.DeviceID & "=" & objItemDrive
If driveFound Then Exit For
Select Case (objItem.DeviceID) 
   Case DeviceID1
	 x = ChgDrv ("I:", objItem.Drive)
	driveFound = True
   Case DeviceID_2
	 x = ChgDrv ("I:", objItem.Drive) 
	driveFound = True
   Case DeviceID3 
	 x = ChgDrv ("I:", objItem.Drive) 
	driveFound = True
   Case DeviceID4
	 x = ChgDrv ("I:", objItem.Drive) 
	driveFound = True
   Case DeviceID5
	 x = ChgDrv ("I:", objItem.Drive) 
	driveFound = True
  End Select 
Next 


Function ChgDrv(Drive, theDrive) 
If theDrive <> Drive Then 
	wscript.echo theDrive & " => " & Drive 

	 'Create File 
	 strFilename = "chgdrv" & Left(Drive,1) & ".txt" 
	 Set objFSO = CreateObject("Scripting.FileSystemObject") 
	 Set objFile = objFSO.CreateTextFile(strFilename) 
	 objFile.Close 

	 'Write Data to File 
	 Set objFile = objFSO.OpenTextFile (strFilename, 2) 
	 objFile.WriteLine "select volume " & theDrive 
	 objFile.WriteLine "assign letter=" & Drive 
	 objFile.WriteLine "exit" 
	 objFile.Close 

	 'Run Diskpart calling the script just created 
	 strRun = "diskpart /s " & strFilename 
	 nRtn = wshShell.Run(strRun, 2 , True) 
	 
	 'Delete File 
	 objFSO.DeleteFile(strFilename) 
Else
	WScript.Echo "Drive is already " & Drive
End If 
End Function

Let's see if this .exe posts...

Attached Files



#10
rodyefew

rodyefew

    Newbie

  • Member
  • 11 posts
  • Joined 02-August 09
And the single-file source code for the same exe above. Compiles in VS2008.

Doesn't need / use any funny header / resource file (stdafx, etc).

As a person who doesn't understand C++ very well at all, those files confuse the nuts out of me.

Just remove them after creating a new project, paste this source code in, and try to compile.

I hope MS doesn't change the algo.

Edited by rodyefew, 02 August 2009 - 04:56 AM.


#11
rodyefew

rodyefew

    Newbie

  • Member
  • 11 posts
  • Joined 02-August 09
Just want to add that the version posted above relies on VC++ 2008 runtime being installed.

I'm attaching a version that should be statically linked (slightly larger).

Please let me know how you go!

Attached Files


Edited by rodyefew, 08 August 2009 - 08:16 AM.


#12
deoren

deoren
  • Member
  • 2 posts
  • Joined 12-March 10
  • OS:Windows 7 x64
  • Country: Country Flag

Just want to add that the version posted above relies on VC++ 2008 runtime being installed.

I'm attaching a version that should be statically linked (slightly larger).

Please let me know how you go!


I know this is an older post, but do you have updated source that you could post or link to? Thanks for the tool. I've been looking for a way to automate the installation of VirtualCloneDrive for a while now.

#13
rodyefew

rodyefew

    Newbie

  • Member
  • 11 posts
  • Joined 02-August 09

I know this is an older post, but do you have updated source that you could post or link to? Thanks for the tool. I've been looking for a way to automate the installation of VirtualCloneDrive for a while now.


I've only tested this on XP 32-bit. I dare-say that there may be UAC issues and other untolds with any combination of Win V/7/64. Will be interested in hearing feedback. Here's the somewhat modified code. Full credits where due.

#include <windows.h>
#include <wincrypt.h>
#include <stdio.h>

#define HP_HASHVALUE HP_HASHVAL

/* This program turns the Driver signing Policy On/Off for Windows XP
 * Written by Stefan `Sec` Zehl <sec@xxxxxx>, 15.11.2004
 *
 * Thanks to sysinternals.com for regmon and apispy
 *        to msdn.microsoft.com for windows reference
 *        to cygwin for their environment
 */

void MyHandleError(char *s){
	printf("Error: %s, number %x\n.",s,(unsigned int)GetLastError());
	exit(1);
}
//--------------------------------------------------------------------
int main(int argc, char* argv[])
{

	if ((argc < 2) || (argc > 2))
	{
		printf( "usage: %s [on|off]", argv[0] );
		exit(1);
	}
	//printf("argc = %x\n",argc);
	//for(int i = 0; i < argc; i++)
	//	printf("argv[%x] = %s\n",i,argv[i]);
	//return 0; 
	BYTE ignoreOn;
	if (strcmp(argv[1], "on"))
	{
		ignoreOn=0;
	}
	else if (strcmp(argv[1], "off"))
	{
		ignoreOn=1;
	}
	else
	{
		printf( "usage: %s [on|off]", argv[0] );
		exit(1);
	}

		printf("yay=%x",ignoreOn);
		//exit(1);


	HCRYPTPROV hCryptProv;
	HCRYPTHASH hHash;
	BYTE data[16];
	DWORD len;
	DWORD seed;
	HKEY hkey;
//	BYTE ignoreOn=0; // This is the On/Off toggle
	char input[4];
	int x;

	// HKLM\System\WPA\PnP\seed
	if(RegOpenKeyEx(
			HKEY_LOCAL_MACHINE,
			L"System\\WPA\\PnP",
			0,
			KEY_READ,
			&hkey
			)==ERROR_SUCCESS){
		printf("RegOpenKey sucess\n");
	}else{
		printf("RegOpenKey failure\n");
	};

	len=sizeof(seed);
	if(RegQueryValueEx(
			hkey,
			L"seed",
			NULL,
			NULL,
			(BYTE*)&seed,
			&len
			)==ERROR_SUCCESS){
		printf("RegQueryValue sucess\n");
	}else{
		printf("RegQueryValue failure\n");
	};

	if(hkey)
		RegCloseKey(hkey);

	printf("Seed=%x\n",(unsigned int)seed);


	if(CryptAcquireContext(
		&hCryptProv, 
		NULL, 
		NULL, 
		PROV_RSA_FULL, 	
		0))                        // flag values
	{
		printf("A cryptographic context has been acquired.\n\n");
	}
	else
	{ 
		if (GetLastError() == NTE_BAD_KEYSET)
		{
			if(CryptAcquireContext(
				&hCryptProv, 
				NULL, 
				NULL, 
				PROV_RSA_FULL, 
				CRYPT_NEWKEYSET)) 
			{
				printf("A new key container has been created.\n");
			}
			else
			{
				printf("Could not create a new key container.\n");
				exit(1);
			}
		}
		else
		{
			printf("A cryptographic service handle could not be "
				"acquired.\n");
			exit(1);
		}

	} // End of else.

	//--------------------------------------------------------------------
	// Create a hash object.

	if(CryptCreateHash(
				hCryptProv, 
				CALG_MD5, 
				0, 
				0, 
				&hHash)) 
	{
		printf("An empty hash object has been created. \n");
	} else {
		MyHandleError("Error during CryptBeginHash!\n");
	}
	//--------------------------------------------------------------------
	// Compute the cryptographic hash on the data.

	input[0]=0;
	input[1]=ignoreOn; // This is the Value!
	input[2]=0;
	input[3]=0;

	if(CryptHashData(
			hHash,
			(BYTE*)input,
			sizeof(input),
			0))
	{
		printf("The data has been hashed. \n");
	} else {
		MyHandleError("Error during CPHashData!\n");
	}
	//--------------------------------------------------------------------

	if(CryptHashData(
			hHash,
			(BYTE*)&seed,
			sizeof(seed),
			0))
	{
		printf("The data has been hashed. \n");
	} else {
		MyHandleError("Error during CPHashData!\n");
	}
	//--------------------------------------------------------------------
	len=sizeof(data);
	if( CryptGetHashParam(
			hHash,
			HP_HASHVALUE,
			data,
			&len,
			0))
	{
		printf("The hash has been retrieved. \n");
	} else {
		MyHandleError("Error during CPGetHashParam!\n");
	}

	//--------------------------------------------------------------------
	// Clean up.

	// Destroy the hash object.

	if(hHash) {
		if(!(CryptDestroyHash(hHash)))
			MyHandleError("Error during CryptDestroyHash");
	}

	// Release the CSP.

	if(hCryptProv) {
		if(!(CryptReleaseContext(hCryptProv,0)))
			MyHandleError("Error during CryptReleaseContext");
	}

	printf("Hash: ");
	for(x=0;x<sizeof(data);x++){
		printf("%x ",data[x]);
	};
	printf("\nCreate md5 hash completed without error. \n");

	//--------------------------------------------------------------------
	// HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\PrivateHash
	if(RegOpenKeyEx(
			HKEY_LOCAL_MACHINE,
			L"Software\\Microsoft\\Windows\\CurrentVersion\\Setup",
			0,
			KEY_WRITE,
			&hkey
			)==ERROR_SUCCESS){
		printf("RegOpenKey sucess\n");
	}else{
		printf("RegOpenKey failure\n");
	};

	len=sizeof(seed);
	if(RegSetValueEx(
			hkey,
			L"PrivateHash",
			0,
			REG_BINARY,
			data,
			sizeof(data)
			)==ERROR_SUCCESS){
		printf("RegSetValueEx sucess\n");
	}else{
		printf("RegSetValueEx failure\n");
	};

	if(hkey)
		RegCloseKey(hkey);
	//--------------------------------------------------------------------
	// HKLM\Software\Microsoft\Driver Signing\Policy
	if(RegOpenKeyEx(
			HKEY_CURRENT_USER,
			L"Software\\Microsoft\\Driver Signing",
			0,
			KEY_WRITE,
			&hkey
			)==ERROR_SUCCESS){
		printf("RegOpenKey sucess\n");
	}else{
		printf("RegOpenKey failure\n");
	};

	len=sizeof(seed);
	if(RegSetValueEx(
			hkey,
			L"Policy",
			0,
			REG_BINARY,
			&ignoreOn,
			1
			)==ERROR_SUCCESS){
		printf("RegSetValueEx sucess\n");
	}else{
		printf("RegSetValueEx failure\n");
	};
	if(hkey)
		RegCloseKey(hkey);

	//--------------------------------------------------------------------
	// HKLM\Software\Microsoft\Driver Signing\Policy
	if(RegOpenKeyEx(
			HKEY_LOCAL_MACHINE,
			L"Software\\Microsoft\\Driver Signing",
			0,
			KEY_WRITE,
			&hkey
			)==ERROR_SUCCESS){
		printf("RegOpenKey sucess\n");
	}else{
		printf("RegOpenKey failure\n");
	};

	len=sizeof(seed);
	if(RegSetValueEx(
			hkey,
			L"Policy",
			0,
			REG_BINARY,
			&ignoreOn,
			1
			)==ERROR_SUCCESS){
		printf("RegSetValueEx sucess\n");
	}else{
		printf("RegSetValueEx failure\n");
	};
	if(hkey)
		RegCloseKey(hkey);

	exit(0);
}


#14
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,821 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag
I appreciate you sharing the source, I always learn something by looking through the inner workings of a software project. But would you mind also sharing a compiled copy for convenience? Thanks in advance.

Cheers and Regards

Posted Image


#15
rodyefew

rodyefew

    Newbie

  • Member
  • 11 posts
  • Joined 02-August 09

I appreciate you sharing the source, I always learn something by looking through the inner workings of a software project. But would you mind also sharing a compiled copy for convenience? Thanks in advance.

Cheers and Regards


Ah - there's two versions linked a few posts back in this thread (just tried to download and it worked).

One version requires VC2008 runtime and the other (larger) one doesn't.

#16
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,821 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag
Oh, sorry. Thanks. I misunderstood. I thought you said the code you posted was "somewhat modified". Thanks again.

Cheers and Regards

Edited by bphlpt, 14 March 2010 - 09:07 AM.

Posted Image


#17
rodyefew

rodyefew

    Newbie

  • Member
  • 11 posts
  • Joined 02-August 09

Oh, sorry. Thanks. I misunderstood. I thought you said the code you posted was "somewhat modified". Thanks again.

Cheers and Regards


Hi,

This is the (somewhat) modified code (above).

The original is here: http://www.911cd.net...showtopic=19316

I couldn't get the original code to compile for some reason. Probably just a bad copy / paste job.

Regards,
rodyefew

#18
ThinkPsy

ThinkPsy
  • Member
  • 4 posts
  • Joined 20-November 07
To get rid of the driver warning you can install the digital signature from the setup.exe and add it to local certificate store.

  • Copy attached certmgr.exe (*) to a temporary directory, e.g. c:\TEMP
  • Right-click SetupVirtualCloneDrive5440.exe --> Properties --> Digital Signatures
  • Open Details --> Show certificate
  • Go to details tab and copy the certificate to a temporary directory, e.g. c:\TEMP\ElaborateBytesAG.cer
  • Open a command prompt and enter the following command:

c:\TEMP\certmgr.exe -add -c c:\TEMP\ElaborateBytesAG.cer -s -r localMachine TrustedPublisher


  • Install Virtual CloneDrive with the following command

SetupVirtualCloneDrive5440.exe /S /noreboot


Et voilĂ  :)

Regards,
ThinkPsy

(*) The certificate manager is a tool provided by Microsoft. You can get it with Windows Server 2008 Ressource Kit.

Attached Files



#19
deoren

deoren
  • Member
  • 2 posts
  • Joined 12-March 10
  • OS:Windows 7 x64
  • Country: Country Flag
Very cool, thanks for posting that info.

#20
jezza333

jezza333

    Newbie

  • Member
  • 22 posts
  • Joined 23-February 06

  • Copy attached certmgr.exe (*) to a temporary directory, e.g. c:\TEMP
  • Right-click SetupVirtualCloneDrive5440.exe --> Properties --> Digital Signatures
  • Open Details --> Show certificate
  • Go to details tab and copy the certificate to a temporary directory, e.g. c:\TEMP\ElaborateBytesAG.cer
  • Open a command prompt and enter the following command:

c:\TEMP\certmgr.exe -add -c c:\TEMP\ElaborateBytesAG.cer -s -r localMachine TrustedPublisher


You can actually use Windows' inbuilt certificate manager in Win7/2K8R2 to alleviate the need for another file if you have these OS: certutil.exe -addstore "TrustedPublisher" [cert_file_name.cer]

Thanks for the process though, very handy! :)

Edited by jezza333, 01 March 2011 - 10:45 PM.


#21
sebus

sebus
  • Member
  • 3 posts
  • Joined 21-November 01
Anybody has a working drive letter change script that works with Win7?
The one above works fine with XP only

Thanks

sebus

#22
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • Joined 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag
Maybe this ?

#23
sebus

sebus
  • Member
  • 3 posts
  • Joined 21-November 01
Do not know, as the link it dead

sebus

#24
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,403 posts
  • Joined 14-September 05
  • OS:none specified
  • Country: Country Flag
Go here instead. New (working) link inside the Topic.

edit -
Uhhh... that's just a Silent Installer.... Unzipped, then Split to inspect, so... it doesn't satisfy either the DriverSigning or the ChangeLetter mentioned previously.

Edited by submix8c, 08 February 2013 - 10:25 AM.

Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users