AutoHotkey Community

It is currently May 27th, 2012, 5:33 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: March 12th, 2010, 1:40 pm 
Offline

Joined: March 12th, 2010, 1:26 pm
Posts: 26
Hi,

I would be extremely happy if anyone can provide me with a simple script that can do the following:

Simply click on the "Enable Macros" button when Excel starts, as soon
as AutoHotkey detects the "Security Warning" window appearing.

This is required for a shared workbook that needs to run macros.

Thanking you in advance.

Kevin Broadfield


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 12th, 2010, 2:43 pm 
A perfect attempt to start unwanted macros/malware! :shock:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 12th, 2010, 4:05 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
I dont want to jump to any conclusions here so I'm trying to fully understand the question.
To the OP, do you mean click on this?
Image

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 12th, 2010, 4:29 pm 
Hi again,

Can I say at the outset, if my intentions were not noble, this request could have been very easily been disguised with a different window and button text.

As stated, my reason for this request is to force all users of a particular Excel file to be under total control of workbook macros, which is a perfectly legitimate reason for its use.

A staggering number of users on the internet seem to have this problem and are seeking resolutions.

Obviously, to prevent brain-dead idiots from viewing the script, I would expect it to be delivered in a Private Message or a direct email to me at zorro@blackmask.fsnet.co.uk.

As I can program a little in VB, it will be a relatively easy task to prevent any other users from utilizing the script, when the script is buried within an EXE that is in itself within another EXE.

I hope that I have assured you of my integrity.

In answer to the last entry, when you open an Excel file that contains macros, you are confronted with a window whose text is "Security Warning" and you are provided with 3 choices Disable Macros, Enable Macros and More Info.

Any help via a PM or email will be greatly appreciated.


Kevin Broadfield


Report this post
Top
  
Reply with quote  
PostPosted: March 12th, 2010, 7:19 pm 
Problem Resolved.

Thank you all for your interest and comments.

It was only a few simple lines of Autohotkey code, which will not be divulged
by me to any potential hacker.


Best regards,

Kevin Broadfield


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 12th, 2010, 7:52 pm 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
If you are the creator of the Excel macros, a better way to achieve this and keep malware at bay is to digitally certify your macros (see http://office.microsoft.com/en-us/help/ ... 71033.aspx . I must admit I've never have to do this yet) and have the settings changed for Excel to only accept certified macros. With the code you were provided (which I am sure is not complicated), you are allowing any macro to run and is therefore equivalent to changing the setting of Excel to accept all macros as shown below (xl 07).
Image

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 12th, 2010, 10:40 pm 
Thank you for additional information regards digital signatures.

It is my experience that creating the digital certificate is quite easy and the authority works as soon as you re-open the file.

Unfortunately, it is my experience that these signatures which are still present on the system, become disengaged from the file itself and authority is lost until you choose the certificate again.

Can I just add that I was not provided with the script from anyone except the Autohotkey tutorial itself - i.e. I got the answer myself.

Regards your comment that I am in effect setting the option to LOW and thus allowing any macro to have authority is completely wrong.

To elaborate slightly on what I have mentioned earlier regards the scripts execution - the Excel invocation and the call to the Autohotkey script ( which is now an EXE ) is contained within the Visual Basic EXE.

The path is hard-coded within the EXE and as a result, it cannot be used
for any other file or macro - especially when I have additional checks on the path given.

I can also split the path string into two unrecognisable strings that have to be OR'ed before the true name is discovered - this way, the path cannot be read even when viewed by a HEX editor.

So you see, I am keeping everything quite safe.

I hope that I have cleared any lingering doubt regards using this method.

Regards,

Kevin


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 12th, 2010, 10:47 pm 
Offline

Joined: February 27th, 2009, 9:11 am
Posts: 693
Location: Burbank, California
Thanks for clarifying. Makes a lot more sense now.

_________________
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom" but let's start to get the data...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 12th, 2010, 10:56 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
whenever excel is opened via COM weather its vbs jscript or ahk etc this prompt is bypassed
perhaps look at http://www.autohotkey.com/forum/viewtop ... highlight=

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: dra, HotkeyStick, rbrtryn, XstatyK and 64 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group