All 6 entries tagged Windows
View all 19 entries tagged Windows on Warwick Blogs | View entries tagged Windows at Technorati | There are no images tagged Windows on this blog
February 07, 2007
Insight shipped a while ago. It is deployed as a ClickOnce application. The bootstrap setup.exe created by the .NET SDK is excellent in that it detects missing pre-requisites on a user’s machine, downloads and installs them.
The problem is that a non-admin user will not be able to install components such as the .NET Framework, Microsoft Reporting Library, etc.
“Right-click, RunAs admin” on the setup.exe works except that the Start Menu entry for the application is put in the Administrator’s start menu and home directory. This means the user has to run Setup.exe again as themself! Argh, imagine the support calls on that one…
My solution is to make a ZIP file containing setup.exe, Install.bat and part2.bat.
@echo off set _User_=%USERDOMAIN%%USERNAME% set _wd_=%CD% echo Installing Insight for %_User_%. runas /u:%COMPUTERNAME%\Administrator "cmd.exe /c CD \"%_wd_%\" && part2.bat \"%_User_%\" \"%_wd_%\""
which upon running prompts:
Installing Insight for WORK\Andrew Davey. Enter the password for WORK\Administrator:
The user types the admin password, hits enter. That runs part2.bat:
@echo off echo Giving %1 temporary Administrator status net localgroup Administrators %1 /ADD echo Running Insight install program runas /u:%1 "cmd.exe /c CD %CD% && setup.exe" echo Removing %1's Administrator status net localgroup Administrators %1 /DELETE
That adds the user to the Administrator group, then runs setup.exe as the user (but now with admin permissions). Afterwards, the user is removed from the Administrator group.
I took the idea from the MakeMeAdmin.cmd batch file. I could not seem to pass the current directory using MakeMeAdmin, so it could not find setup.exe. That’s why I have two batch files.
Maybe someone can point out how it should be done.
So the result is I can tell someone to download the ZIP, extract and double-click Install.bat. Whilst that’s not exactly “ClickOnce” anymore, it slightly better than the alternative! Of course once installed, any later application updates go into the user’s directory so no admin permissions are required.
I hope Microsoft update the bootstrapper in the next version so that it can handle non-admin users better.
May 27, 2006
You can now download the plug–in. It's still in beta and comes with no guarantees, so use at your own risk. If you find any bugs, etc please let me know.
You must be using IE 7 (Beta 2) for this to work. The plug–in uses the new feed subscription feature of IE 7 to pull in podcasts. Subscribe to feeds within IE 7 and make sure you check the "Download attached files" box – this will make it download podcasts.
May 11, 2006
I ditched the slow and ugly grid for a nicer custom item list view control. Un–played shows are indicated by an icon. Click play starts a show playing. Clicking "Show Notes" opens a window to read HTML show notes.
I want to add sync stuff next and also scan show notes for time codes (hh:mm) and then skip playback to those locations.
May 10, 2006
[Description("Example plug-in using Equin library.")]
public class MyPlugin : PluginBase
public override System.Windows.Forms.Control CreateUI()
Label label = new Label();
label.Text = "Hello, world!";
public class Installer : PluginInstaller<MyPlugin>
The class uses some custom attributes to describe the plug–in. These are used by the PluginInstaller to set WMPs registry settings.
If anyone is interested in developing WMP plug–ins using .NET then leave a comment. I'll probably make the library source available online if there is sufficient interest…
May 09, 2006
IE7's feed subscription engine will download enclosures if you tell it too (it's a per–feed setting). However the IE feed browser does not have a direct way to see which items have enclosures. So I decided to create a plug–in for Windows Media Player. The plug–in reads the user's "common feed list" looking for downloaded audio enclosures. These are then listed in a simple grid directly within WMP. I can then simply click a file to start playing.
I wrote the plug–in in just a few hours using VS.NET 2005 with C#2.0! There are still enhancements required, but it does work great already.
Having the MS feed engine syncing all my feeds (podcasts, news, blogs, everything!) and using different applications to view aspects of them is better than trying to have one application do everything.
I may add support for searching and browsing podcast specific content (podcast alley, etc). No need to install iTunes at all! :D
September 20, 2005
I re-installed XP today and decided to try out running as a standard user, not as an administrator. (I did only switch once I got Office and Visual Studio installed.)
When I do need to be admin, I use this tool: link This prompts for the Administrator password, then mine, which adds me to the Administrators group for the context of a command prompt. Anything I run from that prompt runs with my increased privileges.
I'm going to give it a week or so and see how I get on.