Jump to content



Photo

Installing Unsigned Drivers


  • Please log in to reply
11 replies to this topic

#1 bugs

bugs

    Seeker

  • Active Members
  • 7 posts

Posted 13 January 2012 - 11:21 AM

Hi Everyone,

Apologies first as this topic may have been covered many times before, but having looked through the forum I havnt been able to find a difinitive answer.

I have some drivers for a Roland Dr Stika cutting machine which are unsigned, meaning when I try and install them I get a dialog box displays asking me to confirm installation of unsigned drivers. I would like to automate the installation so I can install the drivers on our RM CC4 network. The drivers come in 3 forms I have the raw driver files an EXE and an MSI all unstall the drivers just they all display this box.

Im new to Autoit and scripting isnt my forte (dont mind learning though) could someone point me in the right direction of creating this script?

Thanks







#2 ProgAndy

ProgAndy

    You need AutoItObject

  • MVPs
  • 2,508 posts

Posted 13 January 2012 - 12:44 PM

I think, you will have to create your own CA, and deploy it to the machines. Then create a certificate using your own CA and sign the driver.
Edit: http://wrongpc.blogspot.com/2008/03/how-to-self-sign-64-bit-driver-on-vista.html
http://msdn.microsoft.com/en-us/library/windows/hardware/ff553467%28v=vs.85%29.aspx

Edited by ProgAndy, 13 January 2012 - 12:53 PM.

*GERMAN* Posted Image [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

#3 bugs

bugs

    Seeker

  • Active Members
  • 7 posts

Posted 13 January 2012 - 12:48 PM

I have already bin through this with no success, I thought Autoit might be able to automate the mouse click?

#4 ProgAndy

ProgAndy

    You need AutoItObject

  • MVPs
  • 2,508 posts

Posted 13 January 2012 - 01:00 PM

Try to find the Control identifier with AutoIt WIndow Info and then try ControlClick or ControlCommand. Since MS is protecting many secuirty dialogs from automation I don't know if it'll work.
*GERMAN* Posted Image [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

#5 boththose

boththose

    that means two things

  • Active Members
  • PipPipPipPipPipPip
  • 904 posts

Posted 13 January 2012 - 03:08 PM

disable driver signing for the duration of the script?
Spoiler

#6 bugs

bugs

    Seeker

  • Active Members
  • 7 posts

Posted 23 April 2012 - 02:02 PM

Iv tried using this code:

Opt("WinTitleMatchMode", 2)
$pRun = ShellExecuteWait("C:DRIVER SV-8.msi", "/qn")
While ProcessExists($pRun)
If WinActive("Windows Security") Then Send("!i")
WEnd

but the dialogue is still displayed

Thanx for the replies but how can I find the control identifier?

#7 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 7,053 posts

Posted 23 April 2012 - 02:09 PM

ShellExecuteWait
Runs an external program using the ShellExecute API and pauses script execution until it finishes. That might be why it's not working for you.

How to ask questions the smart way!

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.

Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.

_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.

GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.

Posted Image


#8 bugs

bugs

    Seeker

  • Active Members
  • 7 posts

Posted 23 April 2012 - 02:30 PM

found If I removed the exclamation mark from this line it works
WinActive("Windows Security") Then Send("!i")

but, Iv just tried it on another PC and it doesnt (I have move the msi the the C: drive of the other PC)

iv alo noticed the installs runs very quick, the icon in the system tray appears for about 1 second

Edited by bugs, 23 April 2012 - 02:31 PM.


#9 Mechaflash

Mechaflash

    Sons of Anarchy

  • Active Members
  • PipPipPipPipPipPip
  • 1,361 posts

Posted 23 April 2012 - 02:45 PM

As Brewman said, you'll want to use ShellExecute() instead of ShellExecuteWait() as your sendkeys will never run until AFTER the called application terminates.

found If I removed the exclamation mark from this line it works
WinActive("Windows Security") Then Send("!i")


As you should know "!" = alt so you're sending ALT + i. Based on your above code however, whether you have "!" or not shouldn't matter because of ShellExecuteWait(), unless the app opens another process and terminates the current one, which then you'll want additional checks for windows/processes to ensure you're sending the keystrokes with correct timing and focus.
“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

#10 bugs

bugs

    Seeker

  • Active Members
  • 7 posts

Posted 23 April 2012 - 03:27 PM

OK so, now I have changed the ShellExecuteWait() to ShellExecute() and I have re-added back in the exclamation mark.

It compiles and builds OK but when I run it the icon in the tray appears for a second. I have checked in the driver repository and the driver hasnt been installed.

#11 Mechaflash

Mechaflash

    Sons of Anarchy

  • Active Members
  • PipPipPipPipPipPip
  • 1,361 posts

Posted 26 April 2012 - 01:49 PM

Iv tried using this code:

Opt("WinTitleMatchMode", 2)
$pRun = ShellExecute("C:DRIVER SV-8.msi", "/qn")
While ProcessExists($pRun)
If WinActive("Windows Security") Then Send("!i")
WEnd

but the dialogue is still displayed

Thanx for the replies but how can I find the control identifier?

If it's exiting automatically based on the above code, I would think that your $pRun doesn't exist yet... or that process spawns a different process. Try using a WinWait() targeting the HWND in the title. Then WinActivate() & WinWaitActive() and send()

Opt("WinTitleMatchMode", 2) $pRun = ShellExecute("C:DRIVER SV-8.msi", "/qn") WinWait($pRun, "") WinActivate($pRun,"") WinWaitActive($pRun,"") Send("!i")

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

#12 bugs

bugs

    Seeker

  • Active Members
  • 7 posts

Posted 30 April 2012 - 11:57 AM

Thanx mechatflash, but I still doesnt work it just displays the windows security dialogue. If I add the classname behind winwaitactive then it doesn't display the box but, just sits there and doesnt install anything.

Thanx

Craig




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users