PDA

View Full Version : Help Required building a simple App for SMB Access in a Secondary School




sM3e
Mar 8, 2012, 10:13 AM
I am looking for someone willing to take on the simple task of designing an App for our Secondary School to enable Students to access their Documents Drive on the Windows Network from a Mac on the Mac Network.

This can already be done manually by typing the address but I need to make this as foolproof for them as possible.

This would make our lives here much simpler and finally give us a way to push out a bridge to cross the divide between the two networks.

Here is a small design brief for anyone that is interested

http://cl.ly/470U2R243f2i0b1U3Y0S/H-Drive-Connect.png

Thank you in advance

Scott



thejadedmonkey
Mar 8, 2012, 10:27 AM
It's been a while, but I believe you can just create an Apple script using automator. Create an input for name, an input for password, and then a connect to server action, using the name and password inputs.

sM3e
Mar 8, 2012, 10:42 AM
It's been a while, but I believe you can just create an Apple script using automator. Create an input for name, an input for password, and then a connect to server action, using the name and password inputs.

Sounds fantastic! However will I be able to use the inputName within the address for the Connect to Server Action? That is the most important part of the process

willfurnell
Mar 8, 2012, 11:30 AM
I can make you a quick applescript with a nice user interface.

I will edit the post when I have finished :D

sM3e
Mar 8, 2012, 11:32 AM
I can make you a quick applescript with a nice user interface.

I will edit the post when I have finished :D

Legend! Thank you

willfurnell
Mar 8, 2012, 12:59 PM
Legend! Thank you

Is this alright? Very basic, but that's what you want I guess.

http://willfurnell.com/downloads/Connect%20to%20Server.zip

sM3e
Mar 8, 2012, 01:38 PM
Is this alright? Very basic, but that's what you want I guess.

http://wfv.me/dev/data/Connect%20to%20Server.zip

Thank you for that, and so quickly too! Looks the business just afraid it doesn't do anything when you press connect

willfurnell
Mar 8, 2012, 02:00 PM
Thank you for that, and so quickly too! Looks the business just afraid it doesn't do anything when you press connect

Sorry about that!

Have a try with this version:

http://willfurnell.com/downloads/Connect%20to%20Server2.zip

sM3e
Mar 8, 2012, 02:27 PM
Sorry about that!

Have a try with this version:

http://wfv.me/dev/data/Connect%20to%20Server2.zip

It Works on my System - 10.7.3

Its better than anything I could ever produce (I know minimal code and doe everything as .command files - not too end user friendly.) Thank you

However not getting anything happen when I try it on a Students Machine.

The only difference is that they are on 10.6.5 (Pre App Store) and slightly locked down using WorkGroup Manager - I will try on a 10.6.5 machine without Workgroup Manager Settings and see if its something I can loosen a little.

However typing the SMB address into Safari works fine...

Any other ideas?

----------

Works fine on the same machine with an Admin logged on,

Means its Workgroup Manager....

Let me see what I can loosen up without giving too much away. Seems I need to enable connect to server?


GOOD NEWS!------

All works 100%, I just need to polish up my Workgroup Manager settings.

Thank you so much!

If theres anything I can do to help you, recommend you etc just let me know

willfurnell
Mar 8, 2012, 04:16 PM
I'm glad it is working for you. This should work on 10.6 and above :D

sM3e
Mar 8, 2012, 04:29 PM
Thanks for your help again :-)

Would it be at all possible to add a bit to the script that opens Finder showing the contents of the Documents Folder each time you press connect?
At the moment I have had to enable "Connected Servers" to be vissible on the desktop so they can access it after it mounts and this shows the USERS drive where everyone's home folders are stored. Not a massive issue as they are locked down but kids being kids will start dropboxing each other stuff and I can't really let that happen. I have tried to enable connected servers in Finder but this shows the root of FDC4450 (again not ideal) and I can't create an alias that points to Volumes/Documents to put in all Users Docks as I can't create an alias to a drive that doesn't exist until its mounted using your App.

I hope what i have said here makes sense, If it is not possible do not worry, what you have done is magnificent and solves with ease a major issue we had here. I am most grateful and can't wait to get it rolled out.

sM3e
Mar 9, 2012, 10:32 AM
By dissecting your App, looking at the Apple Script and installing and learning XCode 4.3 in a day I have managed to add an extra button that opens the Documents folder in Finder every time it is pressed. The connect button mounts an then opens.

http://cl.ly/043g3Y333Q0g0c0Z1W3I

Took me a while to get my head round 4.3 as it was using SDK for 10.7

Thanks for all your help

willfurnell
Mar 9, 2012, 11:16 AM
It looks great! Good luck.

sM3e
Mar 9, 2012, 05:12 PM
It looks great! Good luck.

Would never of been able to do it wothout your help though, thanks!

Don't suppose you know how to add an image to the MainMenu.nib do you? Every time I drag one on in any kind of holder the project won't run and I can't find anything that covers it on the web.

I want to add our ICT.Media Support Logo to the bottom left.

Also do you have any problems with me sharing your code with other schools i similar circumstances? We use a forum called Edugeek. I will obviously keep your name in the credits of anything I need to adjust for their network environments

willfurnell
Mar 10, 2012, 03:43 AM
I have no problem with you sharing the code, I am a student myself!

To insert the image, you need to add it to your Xcode project, then you need to go the the media library, and drag the image onto your nib from there:

http://wfv.me/i/Screen%20Shot%202012-03-10%20at%2009.26.02.png

If you can't see the media library, go to:
View > Utilities > Show Media Library

sM3e
Mar 12, 2012, 09:02 AM
Hi Will,

Fantastic help again, thanks!

Got this now

http://cl.ly/3N421q1z2s3L403L023h/Screen%20Shot%202012-03-12%20at%2013.58.46.png

With a staff and a student edition :)

Next question if I may? I would love to either have a light next to the "Mount" button that is Red and Turns Green if the mount command is successful or Make the Open H Drive Button unclickable until the mount command is successful. I know this must be possible but cannot seem to find a way to make it work in the AppleScript.

Thanks again

Scott