Configuring Quickr Remotely

(imported topic written by SystemAdmin)

Hi everyone. I’m hoping someone can give me a hand with configuring a Quickr Connector remotely. I wrote an analyses which shows several global users using HTTP rather than HTTPS in their server settings.

Combining the information from the Quickr documentation found here: Link:

http://infolib.lotus.com/resources/quickr/connectors/8.5.0/doc/qc850abd001/en_us/connectors_html_wrapper.html#qp_config_autopopulatingconnectorswithcontent

and previous posts on editing lines on a file, I was able to generate a script that works in debugger client, but fails on deployment.

waithidden 
"C:\Program Files\IBM\Places Connectors\QuickrCfg.exe" -export 
"C:\Program Files\IBM\Places Connectors\Quick3.xml"   
//store the file location -- store the file location or ("C:\Program Files\IBM\Places Connectors\Quick3.xml")   parameter 
"filename" = 
"C:\Program Files\IBM\Places Connectors\Quick3.xml"   parameter 
"textToReplace" = 
"http://places.server.com   parameter 
"newText" = 
"https://places.server.com"   
//iterate through the file replacing lines as necessary   appendfile 
{concatenation 
"%0d%0a" of (

if (it contains (parameter 
"textToReplace")) then ((preceding text of first (parameter 
"textToReplace") of it) & (parameter 
"newText") & (following text of first (parameter 
"textToReplace") of it)) 

else it) of lines of file (parameter 
"filename") 
}   
//backup the old file   delete 
"C:\Program Files\IBM\Places Connectors\Quick3.xml.bak"   move 
"{parameter "filename
"}" 
"{parameter "filename
"}.bak"   
//replace with the new file move __appendfile 
"{parameter "filename
"}"   waithidden 
"C:\Program Files\IBM\Places Connectors\QuickrCfg.exe" -

import -replace -suppress 
"C:\Program Files\IBM\Places Connectors\Quick3.xml"

Thanks in advance

(imported comment written by SystemAdmin)

When you right click on the failed computer in the action and choose “show action info”, what line does it fail on?

(imported comment written by SystemAdmin)

That’s lead to even more confusion. I deployed to four machines. Two machines failed on the first command. Two reported as complete, but the change did not take place. That’s when I realized the command’s should happen as Current User, otherwise the settings don’t take affect in their profile.

(imported comment written by SystemAdmin)

Have you used the “runascurrentuser” utility?

http://www-01.ibm.com/support/docview.wss?uid=swg21506033

(imported comment written by SystemAdmin)

It’s currently failing at the parameter “textToReplace” relevance. But it’s because the XML file is not being generated. RunAsCurrentUser doesn’t seem to be working. My first thought was user’s privileges within Program Files, but having it create the XML in a neutral folder didn’t work either.

I think it’s really close. At this point, figuring out the relevance and injection on the parameter felt like a win.

prefetch RunAsCurrentUser-2.0.3.1.exe sha1:ee47505ebfb2790b9da8a20ed70e67158e9753d0 size:342528 http:
//software.bigfix.com/download/bes/util/RunAsCurrentUser-2.0.3.1.exe   
//delete any existing exports delete 
"C:\Program Files\IBM\Places Connectors\Quick3.xml"   
//extract current configuration waithidden __Download\RunAsCurrentUser-2.0.3.1.exe --w --q 
"C:\Program Files\IBM\Places Connectors\QuickrCfg.exe" -export 
"C:\Program Files\IBM\Places Connectors\Quick3.xml" 
//store the file location -- store the file location or ("C:\Program Files\IBM\Places Connectors\Quick3.xml") parameter 
"filename" = 
"C:\Program Files\IBM\Places Connectors\Quick3.xml" parameter 
"textToReplace" = 
"{(preceding text of first "%22/>
" of following texts of firsts "<qkr:val name=%22URL%22 value=%22
" of lines of file "C:\Program Files\IBM\Places Connectors\Quick3.xml
" as string as lowercase)}" parameter 
"newText" = 
"https://places.server.com" 
//iterate through the file replacing lines as necessary appendfile 
{concatenation 
"%0d%0a" of (

if (it contains (parameter 
"textToReplace")) then ((preceding text of first (parameter 
"textToReplace") of it) & (parameter 
"newText") & (following text of first (parameter 
"textToReplace") of it)) 

else it) of lines of file (parameter 
"filename") 
}   
//delete any existing backups and create new backup   delete 
"C:\Program Files\IBM\Places Connectors\Quick3.xml.bak"   
//backup the old file delete 
"C:\Program Files\IBM\Places Connectors\Quick3.xml.bak" move 
"{parameter "filename
"}" 
"{parameter "filename
"}.bak" 
//replace with the new file   move __appendfile 
"{parameter "filename
"}" waithidden __Download\RunAsCurrentUser-2.0.3.1.exe --w --q 
"C:\Program Files\IBM\Places Connectors\QuickrCfg.exe" -

import -replace -suppress 
"C:\Program Files\IBM\Places Connectors\Quick3.xml"

(imported comment written by SystemAdmin)

Is it failing on this line:

parameter “textToReplace” = “{(preceding text of first “%22/>” of following texts of firsts “<qkr:val name=%22URL%22 value=%22” of lines of file “C:\Program Files\IBM\Places Connectors\Quick3.xml” as string as lowercase)}”

If so one possible scenario would be the file “Quick3.xml” is not there or the line you are looking for is not there. One way you might troubleshoot this is to create an analysis and put the relevance in there to see what the response is:

(preceding text of first “%22/>” of following texts of firsts “<qkr:val name=%22URL%22 value=%22” of lines of file “C:\Program Files\IBM\Places Connectors\Quick3.xml” as string as lowercase)

That might give you a clue. Additionally you might add properties such as:

exists file “C:\Program Files\IBM\Places Connectors\Quick3.xml”

lines of file “C:\Program Files\IBM\Places Connectors\Quick3.xml”

(imported comment written by SystemAdmin)

That is where it’s failing, and it is because the file isn’t there. The main issue is that file needs to be created from the RunAs’ line. Quick3.xml is the output of that command. It works without the RunAs’ but the export needs to happen as user, or the xml generated will be the SYSTEM’s not the users.

If I export the XML manually and run the relevance, I get the correct output.

To summarize,

QuickrCfg.exe -export (filename).xml

needs to run as current user. The xml will then be checked for the URL value of the server and replaced with the correct address. Then, as current user,

QuickrCfg.exe -import -replace -suppress (filename).xml

will complete the script.