Could really use some help with something simple. I'm stumped

(imported topic written by jcsUTSW)

I’ve got a very simple task I need to perform and I’m close but I can’t get it to work via BigFix.

The task - change the TSM password on each client. We had an administrator leave and rather than touching each one manually I need to figure out a way to do it… Normally I would just do something like this…

dos “{(value “Path” of key “HKLM\SOFTWARE\IBM\ADSM\CurrentVersion\BackupClient” of (if exists x64 registry then x64 registry else registry) as string & “\dsmc.exe set set password oldpassword newpassword” )}”

But that doesn’t work… I even tried piping it to a text file and the file would be blank…

So I tried this…

delete __appendfile

appendfile @ECHO OFF

appendfile dsmc.exe set password oldpassword newpassword > “{(value “Path” of key “HKLM\SOFTWARE\IBM\ADSM\CurrentVersion\BackupClient” of (if exists x64 registry then x64 registry else registry) as string & “\tsmpwdchange.txt”)}”

move __appendfile “{(value “Path” of key “HKLM\SOFTWARE\IBM\ADSM\CurrentVersion\BackupClient” of (if exists x64 registry then x64 registry else registry) as string & “\pwdchange.cmd”)}”

run “{(value “Path” of key “HKLM\SOFTWARE\IBM\ADSM\CurrentVersion\BackupClient” of (if exists x64 registry then x64 registry else registry) as string & “\pwdchange.cmd”)}”

It creates the CMD file just fine but it doesn’t work. The results file is blank. I have to run that command from within that directory. It’s not going to be in the same place on every server so I’m pulling the path via registry… That’s all working just fine. If I let BigFix create the file and I run it, it works just fine. So my assumption is that its trying to run my cmd / batch file from the actionsite directory. How can I tell it to run from inside that folder?

(imported comment written by jcsUTSW)

I found a solution but I dont really like it…

Most of these machines will have TSM installed on the C: but in the rare event that it’s installed on D: it wont work…

All I did was change my batch file to

delete __appendfile

appendfile @ECHO OFF

appendfile C:

appendfile cd “{(value “Path” of key “HKLM\SOFTWARE\IBM\ADSM\CurrentVersion\BackupClient” of (if exists x64 registry then x64 registry else registry) as string)}”

appendfile dsmc.exe set password oldpwd newpwd > “{(value “Path” of key “HKLM\SOFTWARE\IBM\ADSM\CurrentVersion\BackupClient” of (if exists x64 registry then x64 registry else registry) as string & “\tsmpwdchange.txt”)}”

move __appendfile “{(value “Path” of key “HKLM\SOFTWARE\IBM\ADSM\CurrentVersion\BackupClient” of (if exists x64 registry then x64 registry else registry) as string & “\pwdchange.cmd”)}”

Anyone see a better way to do this?

(imported comment written by BenKus)

maybe instead of:

appendfile C:

Use:

appendfile {first 2 of (value “Path” of key “HKLM\SOFTWARE\IBM\ADSM\CurrentVersion\BackupClient” of (if exists x64 registry then x64 registry else registry) as string}

Ben