Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: OpenXML Development ?? - How to update only certain portions of a file


22 Apr 2011   #1

Windows 7 Ultimate SP1 64
 
 
OpenXML Development ?? - How to update only certain portions of a file

HI, thanks for taking the time to read this; I hope I posted in the right forum.

I'm faced with distributing and versioning a HUGE Powerpoint presentation. I can't use sharepoint or the cloud utility from MS. There's no need for everyone to have to re-download most of the embedded video files, with every update, so I'd like to have them download only the updated files.

Since the OpenXML files (in this case, ppsx) are merely archives, I can use System.IO.Packaging and/or .NET zip components to create a personalized update archive containing only the files a particular user needs to have. Already done that.

Problem is, I'm working with users who have very limited rights on their computers in a network environment - they can't install software. The easiest thing to do would have been to create a small console application to swap out the old and new files in the ppsx package on the user's drive. But I don't have permission to do that.

Anyone have any ideas how I can set this up so the users can swap the files themselves? My thought so far:

1) Ask the user to rename the ppsx file to a zip extension
2) send them (for download) a self-extracting archive of the updated files
3) have them unzip the update package, then highlight all unzipped files and move them into the original presentation .zip
4) delete unzipped files and update .exe
5) rename zip back to ppsx

That will work, but it's a LOT to ask a back-end illiterate user to do. They'd probably rather re-download the whole thing though it takes an hour or more.

So, any thought on how to accomplish this utility without the ability to run a console app on the remote computer or force the user to join Windows Live?

Thanks so much in advance for any insight, information, or assistance you can provide.


My System SpecsSystem Spec
.

22 Apr 2011   #2

Windows 8.1 ; Windows 7 x86 (Dec2008-Jan2013)
 
 

Batch files are not permitted as well?
What is a particular restriction for console applications?
My System SpecsSystem Spec
24 Apr 2011   #3

32bit: XP, Win7 H.P. / 64bit: 2008R2, Win7 Pro, Ultimate / Several flavors of Linux
 
 

Quote   Quote: Originally Posted by Neutron16 View Post
Batch files are not permitted as well?
What is a particular restriction for console applications?
Thinking out loud...batch file approach assumes all users store the files in the same location. I would be the one to cause problems.

Regards,
GEWB
My System SpecsSystem Spec
.


24 Apr 2011   #4

Vista Home Premium x86 SP2
 
 

Hello!

Allow me to provide some insight. I am afraid that I am about to pop one of your happy bubbles.

System.IO.Packaging is not going to work for you.

Allow me to take you through .net Compression:

System.IO.Compression.DeflateStream: This is only part of the picture of .zip files. This is not .zip files.
System.IO.Compression.GZipStream: This is GZip, not Zip, and so is completely wrong.
System.IO.Packaging.ZipPackage: A Zip Package is not a Zip File. This is NOT for extracting or compressing normal zip files. They are similar though. The effect it has is that a ZipPackage includes a [Content_Types].xml file. You cannot use these classes to extract normal .zip files without this .xml, and it cannot create a .zip without this file.

Currently, .net has absolutely no way of creating or extracting normal .zips (although it looks as though .net 5.0 will have it in). You need a 3rd party tool at the moment, because you need to keep to the Office .zip format rigidly.

Most are really, really dodgy. However, one is the most beautiful program I have ever used! It is so nicely done! So perfect! DotNetZip Library

Use Ionic.Zip.Reduced.

I am not a lawyer, but the licence is usually pretty good. Obviously, check the licence out.

Use Ionic.Zip.Reduced, and then use IL Merge to merge in that .dll.

Otherwise, I think Microsoft have IronPython > IronPython_Main > Src > Chiron > Zip.cs.

I know how ridiculous this situation is. Microsoft had better get the most simple of compression technologies into their next .net Framework version!

Right, I have covered the .zip part.

What stops your users running applications. Users can surely run .exe files? They cannot install programs, because installation wizards (and any .exe named setup.exe or installer.exe (I am pretty certain)) will immediately ask for UAC elevation.

However, most systems do not block standalone .exes (my workplace sort of does - I cannot save .exes into my folders or Desktop, I work around this by saving and running them from a memory stick!!!)

If you really cannot run .exe files, then your options are very limited.

Please post back with whether any of this may lead anywhere.

Thanks a lot!

Richard
My System SpecsSystem Spec
25 Apr 2011   #5

Windows 7 Ultimate SP1 64
 
 

Hey all - -thanks so much for your input.

After a lot of research and help from kind folks like you, I've found that the only REAL solutions to me are:

1) for clients who can't have any kind of executable on their system (or don't care to learn how to circumvent it), they'll just have to re-download the whole .ppsx every time (2GB now and climing with each new video). Tough S haha hey I tried.

2) Otherwise, I wrote a console app that morphed into a packaged forms app that uses a 3rd party dll (Chilkat). Server-side, each uploaded .ppsx revision is unzipped (using Chilkat) and the component files compared to the last version, with differences stored in a db.

Remote-side, my app sends last version info to an http listener, which then creates a custom .zip archive of only the files which have changed. That .zip is downloaded to the remote machine, and using ChilKat, the new files are swapped into the .ppsx file

I also decided to use Chilkat's FTP features (because I own the license and because it's easier than writing my own sockets) to downloaded the files uncompressed and then package them into a ppsx file. This allows convenient mullti-threading downloading without having to worry about stiching byte arrays.

Not endorsing Chilkat specifically here - it could certainly be done either by hand or with another of the multitudinous zip/ftp components out there. I just happened to own a license already.

So, for clients that can install a modest app, it's a really convenient thing (also worked out a down and dirty comment system to make it look more useful and it's actually kinda cool now). For the others, I've offered to make my source code available to their IT/IS departments to see if they'll allow it. Otherwise, they're SOL and I'm moving on to smaller and worse things.

Bottom line is, there really is no simple, non-programattic way of updating ppsx files. Would be really nice of MS to consider this a feature for future updates, now that they've gone to embedding video files in the .ppsx package. It would be very easy for them to have the feature of checking a web or ftp location for a newer version of the file, downloading only the modified/added files. Are you listening, Ms????

Thanks again everyone for your thoughts, suggestions, and information!!! I'm keeping this thread monitored in case any more creative solutions pop up =D
My System SpecsSystem Spec
Reply

 OpenXML Development ?? - How to update only certain portions of a file




Thread Tools



Similar help and support threads for2: OpenXML Development ?? - How to update only certain portions of a file
Thread Forum
Solved java development kit for windows 7 64 bit Software
New, Powered-Up USB Spec In Development News
Can someone please recommend a Web Development Forum like this one? Browsers & Mail
Does anyone use game development programs? Gaming
Help Installing Development tools General Discussion
Unreal Development Kit Gaming
Charting Windows 7 Development News

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 09:16 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33