|
-
May 2nd, 2007, 08:09 PM
#1
-
May 2nd, 2007, 08:40 PM
#2
Re: Setup and conditions with .Net installer?
 Originally Posted by VBDT
the shortcut doesn’t have condition property.
Exactly. You'll have to create your shortcut's in code using a Custom Action. That way you can add them only under certain conditions. VS Setup projects are relatively limited when it comes to customisation.
-
May 2nd, 2007, 08:51 PM
#3
Re: Setup and conditions with .Net installer?
Thanks Jmcilhinney for the reply and suggestion. I guess I’ll pass this one. Sorry I can’t give you rep, I need to spread some before I give it to you.
-
May 2nd, 2007, 08:53 PM
#4
Re: Setup and conditions with .Net installer?
Is this for a non-vs setup project solution? I could have sworn that you can do it in the "User's Desktop" section of the setup. Just right click on the right hand pane and the context menu popups with "Create New Shortcut"
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 2nd, 2007, 09:03 PM
#5
Re: Setup and conditions with .Net installer?
 Originally Posted by RobDog888
Is this for a non-vs setup project solution? I could have sworn that you can do it in the "User's Desktop" section of the setup. Just right click on the right hand pane and the context menu popups with "Create New Shortcut"
That's quite correct Rob, but the problem here is that that shortcut is created no matter what. There's no way to give the user the option whether to create the shortcut or not, as many installers do.
-
May 2nd, 2007, 09:06 PM
#6
Re: Setup and conditions with .Net installer?
Yup, just realized it too as I was thinking about the condition to conditionally create the User Desktop folder instead of the shortcut file.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 2nd, 2007, 09:10 PM
#7
Re: Setup and conditions with .Net installer?
Hi Rob, this is vs setup project. I don’t have any problems for adding the shortcut but the problem is that it seems I can’t give the user an option to not install the shortcut if they choose. I hope in the next vs version MS would include this functionality in installer.
Thanks for replies!
-
May 2nd, 2007, 09:15 PM
#8
Re: Setup and conditions with .Net installer?
No prob. Just use the custom action like John said and retrieve the checked value or unchecked value from the checkbox dialog and execute your action.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 2nd, 2007, 09:19 PM
#9
Re: Setup and conditions with .Net installer?
 Originally Posted by RobDog888
Yup, just realized it too as I was thinking about the condition to conditionally create the User Desktop folder instead of the shortcut file.
Good suggestion but I tried it too and it didn’t work. May be I am not setting the condition statement right, I don’t know. But when I think about it, it makes since that it doesn’t work because the user desktop is there and it is not matter if we create the folder or not the shortcut is going to be installed anyways.
-
May 2nd, 2007, 09:26 PM
#10
Re: [RESOLVED] Setup and conditions with .Net installer?
Actually using a Custom Action may be wrong for this scenerio. Custom actions are only carried out at the end of the installation.
Using the Checkbox Dialog added to your setup (which I believe you are using)....
 Originally Posted by MSDN Help File
Retrieving User Choices with Checkboxes Dialog Box Properties
When the installer containing the Checkboxes dialog box is run, the user can change the value of any visible check boxes; you can then use that choice to control another phase of installation.
For example, you might create a Checkboxes dialog box that gives the user a choice of installing two optional files, File A and File B. In this case, you would set the Checkbox1Label property to "Install File A" and the Checkbox2Label property to "Install File B". You would also set the Checkbox3Visible and Checkbox4Visible properties to false, since you only need two check boxes.
If you thought that users would usually want to install File A, you could set the Checkbox1Value property to Checked so that it would be checked by default.
In the File System Editor, you would set the Condition property for File A to the value of the Checkbox1Property property, and the Condition property for File B to the value of the Checkbox2Property property.
During installation, the Condition property for each file will be evaluated. If the user checks the check box, the condition will evaluate to true and the file will be installed; otherwise, it will not be installed.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 2nd, 2007, 09:30 PM
#11
Re: [RESOLVED] Setup and conditions with .Net installer?
Using a Custom Action is the correct choice. When the user checks or not one of the check boxes on your installer dialogue it sets the value of a variable. You can pass that variable value to your InstallerClass and there you decide whether to create the shortcut or not based on that value.
-
May 2nd, 2007, 09:34 PM
#12
Re: [RESOLVED] Setup and conditions with .Net installer?
Yes that is what I am doing Rob, but the shortcut doesn’t have the Condition property, files do cool:
Last edited by VBDT; May 2nd, 2007 at 09:46 PM.
-
May 2nd, 2007, 09:45 PM
#13
Re: [RESOLVED] Setup and conditions with .Net installer?
 Originally Posted by jmcilhinney
Using a Custom Action is the correct choice. When the user checks or not one of the check boxes on your installer dialogue it sets the value of a variable. You can pass that variable value to your InstallerClass and there you decide whether to create the shortcut or not based on that value.
I do believe that using the Custom Action is the right way but it has some limitation to since I think I tried it before. For example: let say that the user accidentally deletes some file in the application directory, then if I used the installer shortcut and the user double clicks the shortcut the deleted files are being restored. But if I create the shortcut in the installer class then it won’t have that future and I have to restore these files from somewhere.
-
May 2nd, 2007, 09:46 PM
#14
Re: [RESOLVED] Setup and conditions with .Net installer?
I guess the easy way is not so easy lol.
What about pre-creating the shortcut file with placing % macro paths in the target property?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 2nd, 2007, 09:54 PM
#15
Re: [RESOLVED] Setup and conditions with .Net installer?
 Originally Posted by RobDog888
I guess the easy way is not so easy lol.
What about pre-creating the shortcut file with placing % macro paths in the target property?
I defiantly will give it a try Rob and post the result if I come with one. Thanks again guys for your help.
VBDT
-
May 2nd, 2007, 10:16 PM
#16
Re: [RESOLVED] Setup and conditions with .Net installer?
You could always create the shortcuts the normal way and delete them if the user unchecks the boxes, although that's a bit of a hack. I think you may find that running the app would reinstate the shortcuts each time then though, which can be a very annoying "feature". Also, I think that anyone who accidentally deletes files from a program folder deserves to have to reinstall manually to teach them a lesson for being a bit of a moron.
-
May 2nd, 2007, 10:57 PM
#17
Re: [RESOLVED] Setup and conditions with .Net installer?
John you always have a way with words. 
One more question: Since using the setup project is still a bit cumbersome for your needs, what about some other third party installer program?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 3rd, 2007, 12:57 AM
#18
Re: [RESOLVED] Setup and conditions with .Net installer?
jmcilhinney
Also, I think that anyone who accidentally deletes files from a program folder deserves to have to reinstall manually to teach them a lesson for being a bit of a moron.
I agree!
RobDog888
One more question: Since using the setup project is still a bit cumbersome for your needs, what about some other third party installer program?
Well, Rob this application is not for distribution and it is a simple one so I don’t want to spend any money on this.
As I mentioned in my first post I created it and posted in the UtilityBank forum for the members of VBForums to have an easy way of capturing screen shots.
I updated and posted the application in the same thread so if anyone needs it then you can find it in here.
-
May 3rd, 2007, 01:08 AM
#19
Re: [RESOLVED] Setup and conditions with .Net installer?
We always appreciate the hard work member put into apps so when they post them here for sharing its even more appreciated. 
Well there are free installers/packagers out there but since it sounds like it was just for convienance so then it seems its going to be too much trouble?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 3rd, 2007, 02:26 AM
#20
Lively Member
Re: [RESOLVED] Setup and conditions with .Net installer?
You could have a look at NSIS at http://nsis.sourceforge.net/Main_Page, it's free and OpenSource and has a tonne of examples on how to accomplish all sorts of things during and after installs. I haven't used it myself but it looks great. It was started by the WinAmp guys, IIRC.
Gr,
Mightor
What the world needs is more geniuses with humility, there are so few of us left.
If my post was accidentally useful, please rate it as such, thanks!
Mon aéroglisseur est plein des anguilles.
-
May 3rd, 2007, 02:31 AM
#21
Lively Member
Re: [RESOLVED] Setup and conditions with .Net installer?
 Originally Posted by jmcilhinney
Also, I think that anyone who accidentally deletes files from a program folder deserves to have to reinstall manually to teach them a lesson for being a bit of a moron.
You are assuming that the moron in question will actually learn from it? My experience tells me that most morons will make the same mistake over and over again. I applaud you for your optimism, though!
Gr,
Mightor
What the world needs is more geniuses with humility, there are so few of us left.
If my post was accidentally useful, please rate it as such, thanks!
Mon aéroglisseur est plein des anguilles.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|