Jump to content

Alligning commands with @Comspec


Recommended Posts

  • Moderators

Change the /c to a /k so the window stays open and you can see the error message in the command window

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

You must use #RequireAdmin if the UAC is enabled.

Also, you can get the error stream with 2>&1 :

Local $TPM = 'wmic /namespace:\\root\cimv2\security\microsofttpm path win32_tpm get IsEnabled_InitialValue > C:\Temp\TPMStatus.log 2>>&1'
Run(@ComSpec & ' /c ' & $TPM, "", @SW_HIDE)


Edited by jguinch
Link to comment
Share on other sites

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...