Link to home
Create AccountLog in
Avatar of TrustGroup-UAE
TrustGroup-UAE

asked on

Run a CMD in C# Winform

Hi Exeperts,

Hope everyone is well?

Im banging my head trying to find the answers for this one!

I need to be able to run a command in C# (PSEXEC File). I need to be able to run it as the following:-

C:\Windows\system32\PsExec -u "string.username" -p "string.password" cmd /c "msiexec.exe /i string.filepath string.setup.msi TRANSFORMS=string.transforms /qb"

string.username, string.password, string.filepath, string.setup.msi, string.transforms are all strings within my application.

could somebody possible point me at somes example code or share some with me?

Cheers
TME
SOLUTION
Avatar of Snarf0001
Snarf0001
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account