Jump to content

Installing Unsigned Drivers


bugs
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

*GERMAN* [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

Link to comment
Share on other sites

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* [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

Link to comment
Share on other sites

disable driver signing for the duration of the script?

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

  • 3 months later...

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?

Link to comment
Share on other sites

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.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

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 editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Spoiler

“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.”

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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")
Spoiler

“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.”

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 years later...

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")

$pRun is a PiD. Will winwait wait for that process' window? I don't think, but correct me If I'm wrong :)

Link to comment
Share on other sites

  • 1 year later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...