Streaky Posted October 9, 2019 Posted October 9, 2019 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
Developers Jos Posted October 9, 2019 Developers Posted October 9, 2019 What exactly is the AutoIt3 question? Help with what? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Streaky Posted October 9, 2019 Author Posted October 9, 2019 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
Developers Jos Posted October 9, 2019 Developers Posted October 9, 2019 Assume you mean UAC and isn't that what SCCM does for you already when the execution is set the correct way? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Earthshine Posted October 9, 2019 Posted October 9, 2019 (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 October 9, 2019 by Earthshine My resources are limited. You must ask the right questions
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