Jump to content
Sign in to follow this  
headache

Windows blocking excutables from using Objects

Recommended Posts

headache

I apologize if this topic has been covered and I missed it, but I have been all over the forums and searched repeatedly and found nothing that covers it. I have created a script that uses objects-- specifically it opens an excel file, runs a macro, closes the file. I know there are no bugs in the script.

I can run the script with "Go" and it runs like a charm.

I can compile an executable without error.

I can double click on the excecutable in the Windows Explorer and it runs.

I can run the Executable with the "run" command off the Start Menu.

I can right mouse click the executable and run the file if I uncheck the box that says "Protect My computer and Data from Unauthorized Activity".

If I don't unclick that box I get an Object error.

And, if I let this executable run within my larger set of procedures, I get the same Object Error.

This is my code:

$oExcel = ObjCreate("Excel.Application") ; Create an Excel Object

With $oExcel

.Visible = True

.Workbooks.Open ("c:\automation\DBA\programs\DBA_Build_09112008.xls")

$x = .Run("Start_DBABuild")

EndWith

$oExcel.Quit

How do I get around the blocks on the objects? I am convinced it's a security issue on the XP machine I am running it on.

Help, please!

Share this post


Link to post
Share on other sites
99ojo

I apologize if this topic has been covered and I missed it, but I have been all over the forums and searched repeatedly and found nothing that covers it. I have created a script that uses objects-- specifically it opens an excel file, runs a macro, closes the file. I know there are no bugs in the script.

I can run the script with "Go" and it runs like a charm.

I can compile an executable without error.

I can double click on the excecutable in the Windows Explorer and it runs.

I can run the Executable with the "run" command off the Start Menu.

I can right mouse click the executable and run the file if I uncheck the box that says "Protect My computer and Data from Unauthorized Activity".

If I don't unclick that box I get an Object error.

And, if I let this executable run within my larger set of procedures, I get the same Object Error.

This is my code:

$oExcel = ObjCreate("Excel.Application") ; Create an Excel Object

With $oExcel

.Visible = True

.Workbooks.Open ("c:\automation\DBA\programs\DBA_Build_09112008.xls")

$x = .Run("Start_DBABuild")

EndWith

$oExcel.Quit

How do I get around the blocks on the objects? I am convinced it's a security issue on the XP machine I am running it on.

Help, please!

Hi,

i think you have XP with SP2 installed. in boot.ini file you start Windows with /noexecute=optin. this is standard. if you have /noexecute=AlwaysOn or something else, you should change to optin. If this doesn't work, replace /noexecute=xxxxxx with /execute

;-))

Stefan

Edited by 99ojo

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×