Hiding Menu's

View previous topic View next topic Go down

Hiding Menu's

Post by alunmjones on Fri Oct 12, 2012 8:58 am

Im going to try and deploy OWATray to all users within my Domain environment as we have just migrated to Exchange 2010, i think ive got most of it worked out, install it via a script or msi, on user login run a script to open and edit the xml file to change the settings to whats needed and run the program.

I have three things im not sure of

1) Is there a way i can get it to automatically set that OWATray passes mailto: to OWA when the program loads?

2) is there a way i can hide the Options menu that pops up when you right click the icon, as i dont want users messing with options and it throws an error for the test kid users ive used as they dont have the rights to modify the file anyway.

3) is there a way to remove exit from the right click menu as i want it always running and only exitable from a task manager call?

alunmjones

Posts : 4
Join date : 2012-10-12

View user profile

Back to top Go down

Re: Hiding Menu's

Post by admin on Fri Oct 12, 2012 12:19 pm

Alun,

1. Once OWAtray has been configured to become the Default Mail Handler via the Shell Integration menu then, unless any other program grabs this back, it shall remain the default from that point forward. There is no method at the moment for automatically allocating this status without manually invoking it (at least once) from that menu.

2. Yes. There is a setting in the application config file (DrunkenBakery.OWAtray.GUI.exe.config) called "
LockDown"
. Setting this to True will do what you need.

3. No, not at the moment.
avatar
admin
Field Marshal
Field Marshal

Posts : 310
Join date : 2009-08-27
Age : 48
Location : Scotland

View user profile http://www.owatray.com

Back to top Go down

Re: Hiding Menu's

Post by alunmjones on Fri Oct 12, 2012 12:41 pm

if i run DrunkenBakery.OWAtray.ShellIntegration.exe from a script would that set the intergration to mailto:?

ive tried setting LockDown to true but the options are still available when you right click and still editable

thanks

alunmjones

Posts : 4
Join date : 2012-10-12

View user profile

Back to top Go down

Re: Hiding Menu's

Post by admin on Fri Oct 12, 2012 4:20 pm

Ah, I've just reminded myself how this works. LockDown=True disables the 'Options' item on the tray menu so that getting in to change anything is impossible.
Now that only works if the app starts minimized, which it will once it has connected successfully to the configured email server.
If you are distributing the application with pre-configured email settings then setting the 'Autostart' property to True in the config file you distribute will tell it to attempt to connect on first run after installation.

Running 'DrunkenBakery.OWAtray.ShellIntegration.exe' with the 'registry' argument will switch on Shell Integration (running it with the 'restore' argument will switch it off)

Hope that helps.
avatar
admin
Field Marshal
Field Marshal

Posts : 310
Join date : 2009-08-27
Age : 48
Location : Scotland

View user profile http://www.owatray.com

Back to top Go down

Re: Hiding Menu's

Post by alunmjones on Mon Oct 15, 2012 10:16 am

options lockout is now working, ive created a script to change the e-mail address and then run the program, but it look like its not loading the senario.xml file, every setting is blank, is there a way i can tell it to load the senario file? when i run it from a shortcut or directely it starts up fine

Code:

Dim objUser, objADSysInfo
Set WshShell = WScript.
CreateObject("
WScript.
Shell"
)
Set objADSysInfo = CreateObject("
ADSystemInfo"
)
Set objUser = GetObject("
LDAP:
//"
&
objADSysInfo.
UserName)
'WScript.
Echo objUser.
Mail

'on error resume next

'***Edit for your needs.

'Define what the values that you want to inject into the XML file.

semailaddy = objUser.
Mail

'Create XMLDoc object
Set xmlDoc = CreateObject("
Microsoft.
XMLDOM"
)

'****Edit to your needs.

'Here's where you would want to reference the file path to the configuration file.

'load up the XML file and place it into xmldoc
xmlDoc.
load "
C:
\Program Files\OWAtray\scenario.
xml"


'***Edit to your needs.

'Select the node we want to edit
'The text IS case sensitive
Set nemailaddy = xmlDoc.
selectsinglenode ("
//Scenario/Connections/Connection/EmailAddress"
)

'***Edit to your needs.

'Set the text node with the new value
nemailaddy.
text = semailaddy

'***Edit to your needs.

'Save the xml document with the new settings.

strResult = xmldoc.
save("
C:
\Program Files\OWAtray\scenario.
xml"
)

WScript.
sleep 2000

WshShell.
Run "
"
"
C:
\Program Files\OWAtray\DrunkenBakery.
OWAtray.
ShellIntegration.
exe"
"
-register"
, 0, True
WshShell.
Run "
"
"
C:
\Program Files\OWAtray\DrunkenBakery.
OWAtray.
GUI.
exe"
"
"
, 0, False

alunmjones

Posts : 4
Join date : 2012-10-12

View user profile

Back to top Go down

Re: Hiding Menu's

Post by alunmjones on Mon Oct 15, 2012 10:24 am

got it, when i run the vbs at the desktop, the senario.xml files is created on the desktop, if its run in the owatray folder it loads the one from there, any way to change that?

EDIT: found a way round it, if you create a lnk file in the owa tray folder and then run that instead of the exe, it loads the correct xml file

Code:
Dim objUser, objADSysInfo
Set WshShell = WScript.CreateObject("
WScript.Shell"
)
Set objADSysInfo = CreateObject("
ADSystemInfo"
)
Set objUser = GetObject("
LDAP://"
&
objADSysInfo.UserName)
'WScript.Echo objUser.Mail

'on error resume next

'***Edit for your needs.
'Define what the values that you want to inject into the XML file.
semailaddy = objUser.Mail

'Create XMLDoc object
Set xmlDoc = CreateObject("
Microsoft.XMLDOM"
)

'****Edit to your needs.
'Here's where you would want to reference the file path to the configuration file.
'load up the XML file and place it into xmldoc
xmlDoc.load "
C:\Program Files\OWAtray\scenario.xml"


'***Edit to your needs.
'Select the node we want to edit
'The text IS case sensitive
Set nemailaddy = xmlDoc.selectsinglenode ("
//Scenario/Connections/Connection/EmailAddress"
)

'***Edit to your needs.
'Set the text node with the new value
nemailaddy.text = semailaddy

'***Edit to your needs.
'Save the xml document with the new settings.
strResult = xmldoc.save("
C:\Program Files\OWAtray\scenario.xml"
)

WScript.sleep 1000

WshShell.Run "
"
"
C:\Program Files\OWAtray\DrunkenBakery.OWAtray.ShellIntegration.exe"
"
-register"
, 0, True
WshShell.Run "
"
"
C:\Program Files\OWAtray\OWAtray.lnk"
"
"
, 0, False


Last edited by 198 on Mon Oct 15, 2012 1:40 pm; edited 1 time in total

alunmjones

Posts : 4
Join date : 2012-10-12

View user profile

Back to top Go down

Re: Hiding Menu's

Post by admin on Mon Oct 15, 2012 12:37 pm

Good stuff.

You can also pass the location of the scenario.xml file to the EXE as a parameter when you run it.
avatar
admin
Field Marshal
Field Marshal

Posts : 310
Join date : 2009-08-27
Age : 48
Location : Scotland

View user profile http://www.owatray.com

Back to top Go down

Re: Hiding Menu's

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum