Provide a value for a Fixlet

(imported topic written by TJessee)

I have a fix let that I am trying to write, and only want to create 1 to use for mulitple cases. What I want is for it to prompt me for the value I want written. I have tried searching the forums and even the fixlets in TEM, but I am not able to find anything that will work. Any help would be greatly.

Here is the relevance

(name of operating system = “Win2003” OR (name of it = “Win2008” or (name of it = “WinVista” and product type of it != nt workstation product type)) of operating system OR name of operating system = “Win2008R2”) AND (NOT exists value “Managed By” of keys “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Software\TSYS\Servers” of native registry)

and action script

action uses wow64 redirection false

delete __createfile
delete wizardedit.reg

createfile until @end_create_reg_file
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Software\TSYS\Servers]
"Managed By"="OP DTOPS"
@end_create_reg_file

move __createfile wizardedit.reg
waithidden regedit /s "wizardedit.reg"

Any help is greatly appreciated

(imported comment written by BrianPGreen)

I think you can get what you want with the “action parameter query” command. I think that would make your actionscript something like:

action uses wow64 redirection false
action parameter query “ManagedBy” with description “Enter ManagedBy value”

delete __createfile
delete wizardedit.reg

createfile until @end_create_reg_file
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Software\TSYS\Servers]
“Managed By”="{parameter “ManagedBy”}"
@end_create_reg_file

move __createfile wizardedit.reg
waithidden regedit /s “wizardedit.reg”

(imported comment written by TJessee)

That worked perfectly. Showed it to the people requesting it and they said it looked great, but for sanitys sake the would like a drop down box with pre populated entries for them to choose from, then take the highlighted selection and use that value. Is that even possible in a fixlet?

(imported comment written by BrianPGreen)

It’s not possible to show a dropdown box like that in a fixlet. I think for more complicated solutions like that you might have to start using a different tool to show the UI that you want, and then use the REST API or COM API to actually take an action from the fixlet with the right value.

(imported comment written by TJessee)

I kind of figured that was going to be the case. Thank you for the knowledge and time.

(imported comment written by Tim.Rice)

I have no idea if it still works, but have you looked at …

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014748953

It’s a bit of a hack, but it might point you in the right direction.

(imported comment written by TJessee)

Brian,

I have found the down side of supporting both Windows and Unix. The above code worked perfectly for Windows registry, but when trying to accomplish something similar on a Unix box I am not able to get it to accept the input params. I have tried 2 differnent methods, but I am not having any luck.

action parameter query “group” with description “Please enter the Unix group responsible for managing the Unix Server. Your choices are OPDTUNIX or UKSVRUNIX.”

echo MANAGED_BY:{parameter “group” of action as string} >> /var/opt/BESClient/tsys_custom/server.properties

and

appendfile #!/bin/bash
action parameter query "group" with description "Please enter the Unix group responsible for managing the Unix Server.  
Your choices are OPDTUNIX or UKSVRUNIX."

appendfile MANAGED_BY:{parameter "group" of action as string} >> /var/opt/BESClient/tsys_custom/server.properties

Again, any help is greatly appreciated. Thanks.