Windows Server 2008 – Permanent Network Share Mapping

I recently found the need for permanently mounted network shares on a Windows server. Not an obvious thing to do, unfortunately…

What do I mean by permanent? When mapping a share on Windows as a user, when that user logs off… the share will disconnect. For an installed Windows Service that requires access to defined network shares – this is unworkable. We need to create network shares that retain their connection no matter whether or not a particular user is logged on.

Why do I need to do this? For a server-based AIR project ;D

Took a lot of searching – but here is how to do it!


First, we need to get into the Windows Server Group Policy Editor. The simplest way to access this is to type “gpedit” into the start menu search. The Group Policy Editor will now appear.

Using the left navigation menu, drill down through Computer Configuration > Windows Settings > Scripts (Startup/Shutdown). Double-click on Startup to open the Startup Properties dialog.

From the Scripts tab, we will want to click on the Show Files… button to open a File Explorer window.

Right-click in this window to create a new text file called mapping.bat (or whatever you want to call it). This needs to be a .bat file though to execute commands properly.

Edit the file and add the following lines of code:
net use m: \\servername\share

Add one command like this for each share you wish to add.

Now, return to the Startup Properties dialog and click Add… to browse to and select the .bat file we just created. It will appear in the list of startup scripts.

Exit the dialog by clicking OK.

You’ll now need to restart the server for this to take effect. This will allow the startup process to run the required commands to mount these network shares without any user being logged on.

Questioning the Viability of Flex

I often get private messages through the contact form on this blog. These are normally requests for advice, resources, or project inquiries. From time to time, a question comes in that I see as useful to a wider audience.

Such is the case with the email reproduced below regarding Flex. I’ve asked permission from the individual author but have blanked out his name for reasons of privacy.

Greetings Joseph.
I have several decades of programming experience on desktops and (in the old old days) mainframes, using a variety of languages and technologies.

I am interested in application development for mobile platforms, both Android and the Apple platforms. However I am unable to find anyone who can give an unbiased and straightforward answer to this question: Is the Adobe Flex platform (1) a good choice to devote my limited time resources to for learning mobile development (2) is it or is it not true that the Adobe Flex platform is dying / going away / not really a good choice etc. etc. etc.

Would you be kind enough to give me some guidance regarding this? I don’t have enough time available to learn every technology so I must focus and get the biggest bang for my buck.

What do you recommend?

Thank you so much for your guidance with this.

-Xxxxx

My response [though slightly modified for this public post] follows.

Hi Xxxxx.

I don’t think anyone has 100% fool-proof, solid-as-stone answers around this just yet… but I’ll answer you the best I can.

1) I believe that AIR/Flex is still quite valuable for mobile apps. Buried amid the 11/9 announcements is a repeated statement that Adobe is “doubling-down” on AIR for mobile. One of the reasons cited for dropping mobile Flash Player in the browser was to divert resources to mobile AIR. Furthermore, Adobe’s new line of Touch Apps for Android are (almost) all built upon AIR for Android (though my understanding is that Flex was not used).

2) Flex is now an Apache incubator podling. Assuming that the Apache Flex team is able to organize everything enough to put out a release or two (normally achievable over 4-6 months), the project is expected to graduate to full Apache project status – putting it on the same level as ANT, Tomcat, HTTPD, and other well-known, popular projects used worldwide. Note that PhoneGap was also contributed to Apache by Adobe directly after the Nitobi acquisition – so this is by no means a death sentence or dismissal of the framework.

With Flex in the hands of the wider community, there are actually more resources available in light of the number of individual contributors. Even if not an Apache contributor yourself, if you have a patch for Flex that would be useful for others – get in touch with a contributor to see whether they might see value in the patch and perform the contribution in your stead. Don’t forget that a number of contributors are Adobe engineers and that they the company has stated that even though the runtimes are still under their care – they will align releases in light of what is going on at Apache.

I am confident that we will see some great things come out of the Apache Flex effort from members of the Spoon project and the greater community.

I hope this is helpful.

-Joseph

I hope this is useful for others out there. If you want to gather information on-the-ground, be sure to check out the 360|Flex conference in April!

Packaging AIR 3 Captive Runtime for Windows Distribution

This is the first post of 2012 and an attempt to get the year started off well! I wasn’t able to post nearly as much “useful” information in 2011 since I was tied up with so much other stuff… but am definitely working toward changing that by producing more content like this. Happy New Year, all!

Adobe AIR 3 allows a developer to package an AIR app along with the AIR runtime for distribution. This is known as “captive runtime” and is useful because it provides a method of application distribution that does not require a separate runtime installation. With Windows, an additional step must be taken; we have to package the application files into a custom installer for the best user experience on that platform. Thankfully, to do this is a fairly simple task as demonstrated in the recording below.

Here’s an additional recording on other options within Advanced Installer:

New Books: What’s New in Flash Player 11 + What’s New in Adobe AIR 3

O’Reilly has published a set of books that I was able to get together over the past few months, leading up to the new Flash Platform runtime releases in October: “What’s New in Flash Player 11” and “What’s New in Adobe AIR 3“. These books are companion pieces as there is obvious overlap between what is new in each runtime, but are unique enough to require this manner of separation per volume.

The books are currently only available in digital format (ePub, Mobi, PDF) and can actually be acquired for FREE*! They will soon also be available from Amazon.com (Kindle), Barnes and Nobel, Safari Books Online, and other online retailers.

Details of both books are below, along with links to the publisher’s website which includes download of all source code and project assets. I do hope that many people do get access to these and build great stuff using Flash Player 11 and AIR 3 – so please spread the word!!!


What’s New in Flash Player 11

Quickstart Guide for Browser-Based Experiences

What's New in Flash Player 11

Author: Joseph Labrecque
Publisher: O’Reilly Media (December, 2011)
ISBN-10: 1-4493-1109-1
ISBN-13: 978-1-4493-1109-4
Pages: 78

This book will detail the various enhancements, new functionalities, and general improvements available in this new version of Adobe Flash Player. Each item is explained in detail and when possible, a series of screen captures and a full code examples will be provided, enabling you to both grasp the new feature in a visual way, and integrate the feature into your own code quickly, based upon example.


What’s New in Adobe AIR 3

Quickstart Guide for Desktop and Mobile Development

What's New in Adobe AIR 3

Author: Joseph Labrecque
Publisher: O’Reilly Media (December, 2011)
ISBN-10: 1-4493-1107-5
ISBN-13: 978-1-4493-1107-0
Pages: 104

This book will detail the various enhancements, new functionalities, and general improvements available in this new version of Adobe AIR. Each item is explained in detail and when possible, a series of screen captures and a full code examples will be provided, enabling you to both grasp the new feature in a visual way, and integrate the feature into your own code quickly, based upon example.


*I’d like to note that this price has absolutely nothing to do with recent announcements from Adobe. Offering the books for no cost to readers was a mutually beneficial decision made between myself and the publisher months before.

StageText (AIR 3 for Mobile)

This is another new features demonstration which I originally wrote for my upcoming AIR 3 book showing the StageText class in action on a device!

Native Text Input UI (mobile) — Mobile apps can now take advantage of the native text input controls on mobile platforms, including platform-specific user interaction behaviors such as magnification and text selection. Native text controls are available on Android, BlackBerry Tablet OS, and iOS operating systems.