Scripts to save and close Office documents in a Right-to-Left Menu

(imported topic written by Niv91)

Hi,

I need to create a Close and Save documents task using the Power Managent site. The Office applications are in Hebrew, so the VB script need to send keys that capable of closing Office documents in both English and Hebrew menu.

How do I manage pushing the VB scripts from the server to the clients?

I’ve seen that the updated VB scripts on the client would be regularely overwritten periodically, how do I manage do send the new updated files instead of the older ones?

Thanks,

Niv

(imported comment written by BenKus)

Hi Niv,

You have 2 options:

  1. Put the vbscript on a webserver somewhere (or use the BigFix software distribution wizard) and then download the file before running it.

  2. Create the file in actionscript… It would look like this:

createfile until __END

__END

move __createfile myvbs.vbs

waithidden cscript.exe myvbs.vbs

Ben

(imported comment written by Niv91)

Hi Ben,

I modified several vb scripsts in the C:\Program Files\BigFix Enterprise\BES Client__BESData\BES Power Management. The reason is so that it can deal with Hebrew menu in closing documents.

I made the update on the BS server, on the client folder.

The files are: shutoffice.vbs, shutapp.vbs, termapp.vbs.

How do I distribute the modified files to the clients, so that they will not be overwritten by the older files? Is there a way to update the source files directly?

This is urgent, as we need to rollout by Friday.

Thanks for your help,

Niv

Ness Technologies

(imported comment written by BenKus)

Hi Niv,

The two methods I mentioned are your best bet.

You cannot update the files in the Fixlet site on the server or client because they will either be overwritten or they will cause a signature error because all the files in those folders are digitally signed and if they are changed, the relays/agents will reject them.

Using a Fixlet action or a download as I mentioned will be the best way to get the files to the agents.

Ben

(imported comment written by Niv91)

Hi Ben,

Thanks.

I’ve set up a task to download files as follows:

download http://servername:52311/Uploads/shutapp.vbs

download http://servername:52311/Uploads/shutoffice.vbs

download http://servername:52311/Uploads/termapp.vbs

Is it right to use the /wwwrootbes/Uploads folder as a permanent location to download the files from?

The files are downloaded to:

C:\Program Files\BigFix Enterprise\BES Client__BESData\actionsite__Download

Any problem with having the files Run from that location?

One more, if I may:

I’m trying to save the Power Management task, “Save and Close open Documents” under a new Custom Copy.

When I try to ran the same action script under the new name, it fails to run.

I’m getting:

Failed runhidden besshutapp.exe “\shutapp.ini”

I’m trying to add my changes for the downloaded file locations, to the action script.

Any idea why it is failing?

Many thanks,

Niv

(imported comment written by BenKus)

Hi Niv,

I think keeping them in the upload folder is just fine and running them from the download folder is fine too (although note that they will get cleared out whenever the agent is done with the action).

The reason you are getting your “Failed” to run is likely due to a “current working directory” issue… Try this:

runhidden “{pathname of parent folder of regapp “BESClient.exe”}__BESData\BES Power Management\besshutapp.exe” “\shutapp.ini”

Ben