using PSExec to run Reg ... Add

  • Thread starter Thread starter MatthewBrown
  • Start date Start date
M

MatthewBrown

Hello,


I believe the line is:

psexec -u user -p pass reg add
"HKCU\Software\Meditech\Wrkstn\MEDITECH\" /v I /t REG_SZ /d
meditecha.domain.com /f


But that fails. Then I tried to run
reg add HKCU\Software\Meditech\Wrkstn\MEDITECH /v I /t REG_SZ /d
meditecha.domain.com /f

and got "too many command line parameters." Note that I expected to
get Access Denied, as the user doesn't have local administrative
rights.


Anyone have any ideas?


Thanks,

Matt
 
I recommend that you run reg.exe locally, before using
psexec to invoke it on some other machine.

I suspect that reg.exe, same as regedit.exe, does not
report privilege problems. You may have to supply
domain credentials with psexec.exe rather than local
ones.

Lastly I suggest you state which version of reg.exe
you use. Each has its own set of switches.
 
Back
Top