JERRYG Posted February 20, 2008 Posted February 20, 2008 I am using AUTOIT to start an install of a .msi file using the command 'ShellExecuteWAIT("Photorepappsetup.msi").... The install starts by giving a window with the title 'Open File - Security Warning'--- I think this window is comming from Windoes xp and not the .msi file. I cannot get the script to respond to this window.... Does anyone have an advice????? Thanks.....
Zedna Posted February 20, 2008 Posted February 20, 2008 Use ShellExecute with AdLib instead of ShellExecuteWAIT. Resources UDF ResourcesEx UDF AutoIt Forum Search
JERRYG Posted February 20, 2008 Author Posted February 20, 2008 Can you give me an example of the ShellExecute command with the .msi file and the 'adlib' you are talking about???? Thanks for your help.....
Swift Posted February 20, 2008 Posted February 20, 2008 AdLib() AdLibEnable() AdLibDisable() ShellExecute() All In the helpfile... every function...has a example...
scaleman Posted June 13, 2011 Posted June 13, 2011 AdLib()AdLibEnable()AdLibDisable()ShellExecute()All In the helpfile...every function...has a example...I've got the same problem (Security warning dialog preventing further execution). I've tried using AdlibRegister (code shown below), with no success - the thing just sits there haunting me. Can anyone help me to retain what little hair I have left?if FileExists("C:\SLP-V Install Files\SLP-V3.05.msi") Then AdlibRegister("_WinTitle") ShellExecuteWait("C:\SLP-V Install Files\SLP-V3.05.msi") AdlibUnRegister("_WinTitle") ExitEndIfFunc _WinTitle() If WinActive('Open File - Security Warning') Then ControlClick('Open File - Security Warning',"","&Run") EndIfEndFunc
JohnOne Posted June 13, 2011 Posted June 13, 2011 I think I've seen this before and requires DEP to be disabled. If you google that you will easily find how to disable it. People will be reluctant to help with disableing security measures via script. I'm with them, this is a setting that an administrator of computer should make the decision to manually disable. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
PpsSupport Posted May 21, 2012 Posted May 21, 2012 I think I'm a little late regarding the solution. However I post it for further reference. The solution is very simple, just add a file type assostion in the policies registry. regwrite("HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesAssociations", "LowRiskFileTypes", "Reg_SZ", ".pif; .exe; .bat; .zip; .rar") You can add more file type as long as you separate then with ";". However, I do recomend to delete the file type assostion due security issues regdelete("HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesAssociations")
KaFu Posted May 21, 2012 Posted May 21, 2012 (edited) In the article of this nice NirSoft tool AlternateStreamView v1.32 is the following paragraph: "About Alternate Streams in NTFS File System NTFS system has a feature that allows you to add multiple streams in addition to the main file stream. When you open or view the file, only the main file stream is visible, while other additional streams are hidden from the user. Here's 3 examples of alternate streams usage in Windows operating system: [*]Favorites of Internet Explorer: When You add a Web site link into your 'Favorites', a .url file containing the url and description is created. However, if the Web site also have an icon (favicon), the icon is saved as alternate stream for the same url file. The stream name of the icon is :favicon:$DATA [*]Downloaded files of Internet Explorer: When you download and save a file with Internet Explorer, it automatically add a zone information for the saved file. This zone information is used for identifying the file as downloaded file from the Internet. The stream name in this case is :Zone.Identifier:$DATA [*]Summary information of files: When you right-click on a file in Explorer and go to the 'Summary' tab, you can add summary information for the file, like title, subject, author, and so on. This summary information is also saved into alternate stream. The stream name in this case is SummaryInformation:$DATA.", Esp. see bullet two. Searching for some info on streams I've found this article: http://www.flexhex.com/docs/articles/alternate-streams.phtml I've tried FileDelete() and @comspec del, which didn't work out, but _WinAPI_DeleteFile() from Yashied's excellent works fine and removes the stream without a problem. _WinAPI_DeleteFile(@ScriptDir & "test.exe:Zone.Identifier") Func _WinAPI_DeleteFile($sFile) Local $Ret = DllCall('kernel32.dll', 'int', 'DeleteFileW', 'wstr', $sFile) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) EndIf Return 1 EndFunc ;==>_WinAPI_DeleteFile Edited May 21, 2012 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Zedna Posted May 21, 2012 Posted May 21, 2012 I've tried FileDelete() and @comspec del, which didn't work out, but _WinAPI_DeleteFile() from Yashied's excellent works fine and removes the stream without a problem. _WinAPI_DeleteFile(@ScriptDir & "test.exe:Zone.Identifier") ... Thanks for sharing!! Works fine. My MP3 files downloaded from web executed from file manager invoke Window's alert messagebox. With this script I can remove it Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now