Options

Run Script as an Admin

qwertyiopqwertyiop Member Posts: 725 ■■■□□□□□□□
Right now I want to run the dxdiag and silently and export the results to a file on the server.


dxdiag /t \\services\SYSVOL\green.local\scripts\DXDIAG_Config\%computername%.txt

The line was added to my logon script and it does what it is supposed to but my problem is that it needs to run with admin privileges. I need to use the runas command but a batch file would show the password in plain text.

I have thought about creating a msi package that would execute the batch file. If I use this then I would probably be using this to install it via GPO.

My other idea was to use a vbscript to elevate the user privlidge and run the batch file, but I dont know anything about vbscrip.

Comments

Sign In or Register to comment.