jake1981 Posted December 26, 2006 Posted December 26, 2006 Hi. I need to use createmsi option of paint.net installer, so I gone to getpaint.net and downloaded latest v3.0 beta 3, then I encountered a problem/bug. I used following command-line options /createMsi /auto and also tried without /auto. It didn't help, installer starts up, but bugs about variable called Value to be 27 and that it should be between minimum and maximum, which isn't told by this, but I thought that it means it must be between 0/1-26, also, if I give installer some more options, for e.g. when I asked it to NOT create a desktop icon and to NOT check for updates (which is already disabled when using createMsi option, according to FAQ), it bugged that value is 29 when it should be between minimum and maximum. This happens when installer is creating msi package for x64, AFTER creation of x86 package. Program allows me to continue (ignore this problem) but when I click continue, nothing ever gets done. So I'll press X on then top bar of the window to close program, or kill it's process, good thing here is that I got what I needed, x86 version as MSI package, since there's 2 files in subfolder for MSI's. One for x86 and another for x64. Bad thing is that both of these packages seem to be invalid, when I start them, XP reports something about network problem while reading file, just a moment before progress bar indicating loading of package would end, so this leaves me to think that these packages are in-complete, they must lack some files needed by MS Installer.. Also I thought about that problem with variable Value, I tried to pass it as option for installer (set it to 0 first, then to 1) but this didn't change the outcome, problem was that value was 27 or 29, depending on the options. Progress bar finishes before reaching this problem and I came to think a simple issue which COULD cause this, as I've programmed something in past by myself too, mostly with C to linux, but some stuff for Windows environment too, mostly with Borland's C++ Builder and Delphi.. Okay, let's quit bragging around with my minimal skills And concentrate on cause.. Yes, if I remember correctly, when I used a progress bar or similar object/item on a frame, it had properties for minimum, maximum.. And Value.. I usually set it so minimum would be 0 and maximum 100, this way, for e.g. in situation like this I could make a nice progress bar indicating progress between 0% and 100% and output contents of Value to middle to indicate also a accurate reading to end-user on progress of on-going process. Ofcourse you could set it to anything and make simple calculation to convert it to percents, but this means there's extra calculations which might bloat software, it's un-necessary and also needs some extra time from processor to make this conversation (so less that user shouldn't be able to notice even on a small machine, but anyway ).. And finally, this way I don't have to write so much code as I don't need a routine (even though it's simple) to do this convertion so I can put my time on much important stuff like the program itself Well anyway, I wish that creator(s) of this program would check this and maybe think what I said when tracking down this problem.. Maybe it's there, maybe not, hard to say when I haven't check'd out the source and happen to be busy with my own projects so I won't be even able in some time.. Anyway, thanks for great programmee.. Hmm.. If this problem after all is just on my computer (some mods to XP that brake installer from creating MSI's) and someone has succeeded creating a MSI for paint.net 3.0 beta 3 (that works), please post x86 version to jake1981 at luukku.com Thank you and happy forth-coming new year. -Jake Quote
jake1981 Posted December 26, 2006 Author Posted December 26, 2006 Here's the actual error given by installer. Unhandled exception has occured in a component in your application. If you click Continue, the application will ignore this error and attemt to continue. Value of '27' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'. Parameter name: Value. And when Details is clicked, it opens a textarea with following content. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.ArgumentOutOfRangeException: Value of '27' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'. Parameter name: Value at System.Windows.Forms.ProgressBar.set_Value(Int32 value) at PaintDotNet.Setup.CreateMsiPage.PrepMsi(String msiPath, String dstDir, ProcessorArchitecture platform, Hashtable msiProperties) at PaintDotNet.Setup.CreateMsiPage.CreateMSIs() ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS.1/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- SetupFrontEnd Assembly Version: 3.0.2548.23496 Win32 Version: 3.0.2548.23496 CodeBase: file:///C:/DOCUME~1/JAKE~1.XE4/LOCALS~1/Temp/PdnSetup/SetupFrontEnd.exe ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS.1/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS.1/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.42 (RTM.050727-4200) CodeBase: file:///C:/WINDOWS.1/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- PaintDotNet.Resources Assembly Version: 3.0.2548.23480 Win32 Version: 3.0.2548.23480 CodeBase: file:///C:/DOCUME~1/JAKE~1.XE4/LOCALS~1/Temp/PdnSetup/PaintDotNet.Resources.DLL ---------------------------------------- PaintDotNet.SystemLayer Assembly Version: 3.0.2548.23480 Win32 Version: 3.0.2548.23480 CodeBase: file:///C:/DOCUME~1/JAKE~1.XE4/LOCALS~1/Temp/PdnSetup/PaintDotNet.SystemLayer.DLL ---------------------------------------- PdnLib Assembly Version: 3.0.2548.23481 Win32 Version: 3.0.2548.23481 CodeBase: file:///C:/DOCUME~1/JAKE~1.XE4/LOCALS~1/Temp/PdnSetup/PdnLib.DLL ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box. Quote
jake1981 Posted December 26, 2006 Author Posted December 26, 2006 I tried to use reshacker to change maximum value of progress bar to higher, but unfortunately for me, it's not a standard class like buttons, captions and window properties, it's a custom object so reshacker wasn't able to change this. Quote
Rick Brewster Posted December 26, 2006 Posted December 26, 2006 Whoa man. It's just a bug in the setup wizard. It's written in C# and has no resources for reshacker to look at. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
Rick Brewster Posted December 26, 2006 Posted December 26, 2006 Also, you can't "mix" regular and MSI installations. If you want to try out your MSI you must first uninstall Paint.NET. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
jake1981 Posted December 26, 2006 Author Posted December 26, 2006 Actually, yes there IS resources hackable with reshacker as nearly ALL windows applications have, forms are included as a .res file in exe, as they are in project sources too. Way windows includes multiple files in a single .exe file is already familiar from DOS times, EXE file consists of program code ofcourse, but before that, there is a header, including a 512bytes of information (might have changed in last 5 years, since I haven't needed to do that kind of stuff in a long time), header is also the reason why EXE file never can be as tiny as COM file, which doesn't have header. Okay, anyway, this header includes a byte for executable type, where a specific value means that it runs on DOS, or it's a 32-bit DOS application, 16-bit windows, 32-bit windows appl or maybe NT, 2000, XP or now even Vista. This way system can define that it won't run software which needs higher level OS, well this isn't crucial for this.. What is, is that this header also indicates offset of executable code, most viruses use this information (well, not at these days anymore when REAL viruses rarely even exist anymore, new ones are creations by bunch of script kiddies), they insert virus code to the beginning of program's code part and the last instruction is a jump code to the actual programs beginning, then it changes size of executable code in header to original+size of virus code.. Well, after this program code, there can be anything.. For old dos programs you were able to add data to the end of program file if it didn't have anything there in the first place and it wasn't designed to use this feature, without any modifications to .exe file's header or code.. Well, it's useless but when I was kid, we used to hide data with this way and I hated type MYFILE|more, so I created a program that opened ANY text file in it's end in to a nice viewer, so to convert text files to executables with their own internal simple and nice viewer I did C:\FILES\> copy \dos\viewer.exe 1 file copied C:\FILES\> type MYTEXT.TXT >>viewer.exe C:\FILES\> viewer Well, it was much more commands than using type and more, but atleast I used my time to something more usefull than just playing alleycat.. Which btw. still kicks < no swearing > Anyway, your .res file is included in the end of exe file among with many other stuff used by your program, haven't investigated what's in there, but it definetly is there.. I made a modification to your installer with reshacker for just to check, I checked if your component calculates min and max automaticly by width of component, so I resized your window and your progress bar to take care of my whole screen width (currently 1024) but unfortunately that also was just wasted time.. Quote
jake1981 Posted December 26, 2006 Author Posted December 26, 2006 Not planning to mix 'em, I just need to build my own un-attended installation of windows and I want to include paint.net on it, so I rather use a .MSI file than installer with /auto /skipconfig as MSI can be used as completely silent when installer shows progress and so on.. Yeah, I do know that it ain't a good thing to include BETA code on this kind of stuff but I'm doing it anyway.. Btw.. Could anyone mention if there's somekind of beta expiration date on this 3.0.0 beta 3 ( or beta 4 when this bug is fixed and I actually can finally do this ) Quote
Rick Brewster Posted December 26, 2006 Posted December 26, 2006 Resources of the type you're talking about aren't used for the dialogs and controls in the setup wizard. I wrote the thing -- it's C# and WinForms. It uses code to place controls, not resources. You won't be able to "hack a resource" to change the progress bar. There's just a bug where I accidentally had a 2 instead of a 3 in calculating the maximum value of the progress bar. It'll be fixed for the next release. Until then please just use the /skipConfig or /auto settings. MSI-based installation is really intended for system administrators who want to deploy Paint.NET to a large base of users across the network. For your uses, /skipConfig or /auto are probably more ideal. But hey, it's up to you I guess. Yes, beta 3 expires. On January 21st or something -- alpha, beta, and RC release always expire 30 days after release. Always. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
jake1981 Posted December 26, 2006 Author Posted December 26, 2006 You really sure about that? Extract the archive and open up setup executable into reshacker, it finds 3 forms, can't remember but one of 'em looked like form which is shown on error case, one that looked like a empty windows and one that seems like installation progress window. It's true that my test failed, I forgot to tell that even when I changed attributes, it didn't change outcome AT ALL. When I executed this program it was just like earlier, even though that I had resized progress bar. So, even that you maybe haven't used a wysiwyg editor to create frames.. Maybe compiler of your choice still exports them as a resource file, I mean, atleast you just have to have introducion for components in your code, right? And somewhere is default settings.. So these default settings must have been written as .res compatible to your installer as you can try this even yourself, there IS .res file. Your program just sets up attributes when started, which is intelligent choice, I'd use it that way too, since people can have different resolutions and so on.. Well, this was waste of everyone's time, but I just had to prove that I wasn't telling a lie here, I did investigate and I did do my best to find cause of this before filling a bug, and as I had a slight feeling that someone thought that I'm just talking without having done any of these checks, I had to assure how things really are. --- To next topic, this is supposed for people deploying paint.net to large base of users across the network? Well, my user database is on ldap server, not on AD, so I need to install A IDENTICAL system to all my 20 client machines to make it work, easiest way to do this, is to generate a integrated xp installation disc which installs all required programs during, INSTALL of XP, this way I don't need to install same software identically to all client machines by hand. And in that case, .MSI is most handy way. Thank you for informing about expiration date. This is only a temp solution due to my server upgrade, but as it's so much trouble, I really don't want to make a installation disc that wouldn't work "out-of-the-box" in future, so I'll stick with 2.x version.. Or is there expiration date on latest stable verson too? Anyway, thanks for notifying my bug report and that actions have been taken to fix it to next release and thank you for great work too, I currently would stick using paint.net but I also use GIMP sometimes, it has more filters and effects, but for anything that I CAN do with paint.net, I use paint.net, it's just great. Just a shame that Mac and linux cannot be supported since almost whole code would need to be re-written to another language first Well, can't have it all.. Quote
Rick Brewster Posted December 26, 2006 Posted December 26, 2006 I didn't say there weren't resources -- I'm sure the MSI has vestigal resources that Visual Studio sticks in there just because it feels like it. But they aren't used. And the exe no doubt has a version resource. I said that the setup wizard doesn't use resources in the way you're thinking. So yes, I'm 100% sure of it. I just tested an MSI installation after fixing that small bug I mentioned, and it installed fine on a Windows Server 2003 x64 system. There are caveats for installing on Vista because of UAC, but you stated you're on XP so that shouldn't matter. Final / "stable" versions do not expire. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
jake1981 Posted December 27, 2006 Author Posted December 27, 2006 yes. Version of Vista I'm holding is far too beta to be used for ANYTHING, and all clients in here aren't capable of running such heavy os as vista so I'm sticking with XP until I get my server re-installed and network booting can be used again. So vista doesn't apply for me. I already grabbed a stable version and integrated it as if I again need to perform something like this, I'd rather have fully working tools done once instead of building them everytime again, and as clients aren't being used only for image manipulation, I think we can survive with little less filters Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.