Link to home
Start Free TrialLog in
Avatar of military donut
military donutFlag for United States of America

asked on

need help creating a VBS for running cmd.exe as admin

hello,

Need help in how to do a vbs file for doing the below procedure:

Fixing DameWare to run on Windows10
            a. Copy file from //myDomain/Support/DameWare/dwdrvinst64.exe to c:/MyLogFile/
            b. Run CMD as Administrator
            c. cd ..
            d. cd /MyLogFile
            e. dwdrvinst64 -remove smartcard
            f. dwdrvinst64 -install smartcard


Don't know of a better way, or even run an *exe to do this...

Please help.
Avatar of Jeremy Weisinger
Jeremy Weisinger

How are you invoking this? Are you needing/wanting to embed admin credentials in the script? A simple .cmd file that you launch As Administrator would work but I don't know if that fits what you're trying to do.
Avatar of military donut

ASKER

Hello,
I was hoping to get a full way to do this... I wanted or was thinking to add it to our SCCM, but not sure if it would be better to just run as a vbs opening powershell as an option.  

But either way the cmd.exe needs to be as administrator to run remove and install OPTIONS..
ASKER CERTIFIED SOLUTION
Avatar of Jeremy Weisinger
Jeremy Weisinger

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sounds great... Thank you very much
Glad to help. :)