Run section of vbscript code with elevated privilages

Hi,
Hope this is in the right topic area, couldn't see one dedicated to vbscript.  I've been asked to add the following code to our logon script to disable microsoft firewall on all clients.

Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
objPolicy.FirewallEnabled = FALSE

This code runs fine as an administrator but users unsuprisingly get a permission denied error.  My question is this, can I run these 3 lines of code as an administrator?  I want all other code in the script to run as the logged in user.  

Many Thanks
bon3sAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TaconvinoCommented:
Maybe you can make these three lines as another script and run it as a startup script instead of a logon script.  Check this for push in the right direction:

http://www.rlmueller.net/LogonScriptFAQ.htm

Hope this helps!

TCV

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bon3sAuthor Commented:
Thanks Taconvino, although this doesn't directly answer my question (I assume it cannot be done?), your solution is actually a far better way to do this.  Much better than having administrator username and password hard coded in the script.  I would have encrypted it, but still they're easy enough to unencrypt so it would have been a concern.

Much appreciated.
TaconvinoCommented:
You are very much welcome!  

I'm not sure if this can be done or not... using RunAs is not an option, and I can't think of any other way.

+TCV
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.