Jump to content

Recommended Posts

Posted

Hi

 

i have a script to activate Office 2019 as a bat file, which i which to run through SCCM as a script to execute

please can someone help

cd C:\Program Files\Microsoft Office\Office16\
cscript ospp.vbs /setprt:
cscript ospp.vbs /unpkey:6MWKP >nul
cscript ospp.vbs /inpkey:
cscript ospp.vbs /unpkey: >nul
cscript ospp.vbs /inpkey:
cscript ospp.vbs /sethst:
cscript ospp.vbs /act

i have removed my keys for now

Posted
1 hour ago, Jos said:

What exactly is the AutoIt3 question?
Help with what?

Jos
 

i need to convert it to run in CMD and run as admin automatically and avoid AUC, or for it to auto accept AUC dialog box after its run

Posted (edited)

so, if it's a batch file (.bat or /cmd extension) why can't you just set it to run as admin by default by creating a shortcut? right click on the batch file shortcut, choose properties, then click Shortcut tab, then click the Advanced... button, then choose to run as administrator so whenever  it is run it runs as admin by default.

but it is possible to run your batch as admin in AutoIt script. use the RunAs() function. You can read about it in the great Help file that is included with AutoIt

then we can have a look at the UAC UDF on this forum for the other part.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

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
  • Recently Browsing   0 members

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