473,806 Members | 2,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting up shortcuts in installer

Hi,

I have built a setup project to install an application I
am developing. I would like to be able to prompt the user
whether to install Shortcuts in the following locations:
* Start Menu
* Desktop
* Quick Launch

I have added a UI page that has three checkboxes on it to
let the user choose which shortcuts to install. However,
it seems that a shortcut does not have a Condition
property that I can use to conditionally include the
shortcut based upon a user input.

I have gotten around this by using a hack (making three
copies of the startup executable, setting the condition
property on each, and pointing each of the three
shortcuts to a different target -- if a target is not
created, the corresponding shortcut is not either) but I
need a better solution.

What is the best way to go about this? I started down the
path of letting it create all three shortcuts, then
deleting the unwanted ones in a custom action, but that
seems error-prone.

Thanks,
Luke Wright
Jul 21 '05 #1
6 9430
Hi Luke,

Thanks for posting.

We don't have a formal way to achieve this goal within VS.Net. However, we
can use Platform SDK tools to do this.

I will get back to you as soon as possible with detailed steps.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2
Hi Luke,

I will give you an example on creating a shortcut on desktop only:

1. Create a MSI for your project using VS.Net. Add a "Checkboxes " dialog.
Add a shortcut for the primary output in "Program Menu"

2. Go to the following site to downloand and install Windows Installer SDK:

http://www.microsoft.com/msdownload/...sdk/sdkupdate/

3. Install "Orca.msi" included.

4. Use "Orca.exe" to open the MSI file we have generated.

5. Open "Component" table. There should be one row generated by VS.Net.
Add one row:

Component: Component_Deskt op

Component_ID: {E93098AA-E938-54EC-EEAC-6383E471F0EF}
(This is in fact a GUID. We can get one from the existing component and
change one bit.)

Condition: CHECKBOXA1
(This should be consistent to the property of our check box in VS.Net.)

Leave other fields the same as the existing row.

6. Open "FeatureCompone nts" table. Add one row:

Feature: DefaultFeature

Component: Component_Deskt op

7. Open "Shortcut" table. There should be one row for the shortcut we have
created in Program Menu. Add one row:

Shortcut: Shortcut_Deskto p

Directory: DesktopFolder

Component: Component_Deskt op

Leave other fields the same as the existing row (or empty).

8. Save the MSI file and exit.

Please have a try and see whether this helps.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3
Felix,

I followed your instructions, - ran the resulting .msi file, and got a
2356 error. - which means "Couldn't locate cabinet in stream: [2]."
(errors on page: http://msdn.microsoft.com/library/de...ons_action.asp)

It appears that the new .msi file that orca saved is about 50% smaller
than the original .msi file, and I am suspecting that somehow some of
the enclosed contents weren't saved back to the new file.

Do you know how to avoid this truncation when saving from orca?

thanks

Anatoly
v-*****@online.mi crosoft.com (Felix Wang) wrote in message news:<Oj******* *******@cpmsftn gxa06.phx.gbl>. ..
Hi Luke,

I will give you an example on creating a shortcut on desktop only:

1. Create a MSI for your project using VS.Net. Add a "Checkboxes " dialog.
Add a shortcut for the primary output in "Program Menu"

2. Go to the following site to downloand and install Windows Installer SDK:

http://www.microsoft.com/msdownload/...sdk/sdkupdate/

3. Install "Orca.msi" included.

4. Use "Orca.exe" to open the MSI file we have generated.

5. Open "Component" table. There should be one row generated by VS.Net.
Add one row:

Component: Component_Deskt op

Component_ID: {E93098AA-E938-54EC-EEAC-6383E471F0EF}
(This is in fact a GUID. We can get one from the existing component and
change one bit.)

Condition: CHECKBOXA1
(This should be consistent to the property of our check box in VS.Net.)

Leave other fields the same as the existing row.

6. Open "FeatureCompone nts" table. Add one row:

Feature: DefaultFeature

Component: Component_Deskt op

7. Open "Shortcut" table. There should be one row for the shortcut we have
created in Program Menu. Add one row:

Shortcut: Shortcut_Deskto p

Directory: DesktopFolder

Component: Component_Deskt op

Leave other fields the same as the existing row (or empty).

8. Save the MSI file and exit.

Please have a try and see whether this helps.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #4
Hi Anatoly,

Thanks for posting. However I don't think that modifying the tables as I
suggest in the previous post will cause the MSI becomes 50% smaller. I have
also been using Orca for some time and generally it does not truncate the
MSI package (except for file system failures).

Based on the error message, it seems that your issue is related to cabinet.
Cab files are stored in a hidden table "_Streams" and are their information
is recoreded in the "Media" and "File" table. There does not seem to be a
direct relation to the original shortcut issue. It is likely that a Cab
file is not properly imported into the "_Streams" table here.

I suggest that you first test my steps on a bare-bone VS.Net MSI. If they
work, then let's apply the steps to a more complicated MSI.

I hope this helps.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #5
Felix,

Evidently Orac doesn't copy all streams when you do "Save As.." which
is what I used by mistake. If you save into original file, it works
fine.

http://groups.google.com/groups?hl=e...TNGP11.phx.gbl

-Anatoly

v-*****@online.mi crosoft.com (Felix Wang) wrote in message news:<QD******* *******@cpmsftn gxa06.phx.gbl>. ..
Hi Anatoly,

Thanks for posting. However I don't think that modifying the tables as I
suggest in the previous post will cause the MSI becomes 50% smaller. I have
also been using Orca for some time and generally it does not truncate the
MSI package (except for file system failures).

Based on the error message, it seems that your issue is related to cabinet.
Cab files are stored in a hidden table "_Streams" and are their information
is recoreded in the "Media" and "File" table. There does not seem to be a
direct relation to the original shortcut issue. It is likely that a Cab
file is not properly imported into the "_Streams" table here.

I suggest that you first test my steps on a bare-bone VS.Net MSI. If they
work, then let's apply the steps to a more complicated MSI.

I hope this helps.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #6
Hi Anatoly,

Thanks for the information. Previously I was not aware of this, as I always
copy the file first and then edit it.

If you have any concerns regarding my steps, please feel free to post.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
378
by: Luke Wright | last post by:
Hi, I have built a setup project to install an application I am developing. I would like to be able to prompt the user whether to install Shortcuts in the following locations: * Start Menu * Desktop * Quick Launch I have added a UI page that has three checkboxes on it to
0
1355
by: Jim | last post by:
I want the users to have the ability to control the installation of shortcuts to an application on the desktop. While a shortcut to the desktop can either be assigned to the Users Desktop folder or not in the deployment project, how can you make this a choice at installation. I have tried controlling it through a 3 button dialog, but the installer is ignoring the choice
0
1065
by: SPE - Stani's Python Editor | last post by:
Thanks to Jose Galvez, there is a now a working python installer for python2.4 SPE 0.7.5.b now features a remote, encrypted and embedded python debugger of Nir Aides. Stani Spe is a free python IDE with auto indentation & completion, call tips, syntax coloring & highlighting, UML diagrams, class explorer, source index, auto todo list, sticky notes, pycrust shell, file browsers,
0
1244
by: TC | last post by:
I know .NET setup projects use "Windows Installer" shortcuts instead of ordinary shortcuts, but I'm having trouble with those, so I'd like to hard-code some ordinary shortcuts in the user's start menu. The problem is, the setup project will let me put every kind of file in the start menu except .lnk files. The one file type I need is the one file type which seems to be rejected. Perhaps there is some trick I don't know about. For the...
0
1195
by: GeorgeF | last post by:
How can I conditionally deploy shortcuts to my application? I have created a custom installer dialog box to give my users the option of creating desktop/start menu shortcuts, but the shortcuts do not have a Condition property that allows conditional deployment. I have tried using the Condition property of the folder where the shortcuts are being installed to, but the shortcuts get installed whether the options are selected or not. I have...
3
4196
by: Michael D. Murphy | last post by:
Hi, I am searching for a way to creat desktop shortcuts when running the setup files that were created within a VB solution using the setup wizard. Thanks, Michael
3
1587
by: sagar | last post by:
Hello everyone, I am developing a AJAX based IM application. I use javascript to dynamically generated small windows using nested <div> within the web-page. I use the following ways to set attributes & styles e.g. .style.height=10; for styles .setAttribute("id","outer") for attributes
3
2419
by: =?Utf-8?B?UGF0?= | last post by:
How can I create a setup and deploment project which does not create Advertised Shortcuts.
1
1436
!NoItAll
by: !NoItAll | last post by:
Hi: I'm using the following script to find a shortcut with a specific string in it. In the code below the example is the word "font" My problem is that this code looks everywhere EXCEPT the individual users desktop - it does find all of the shortcuts in All Users, but not in specific users. I am executing the code AS the user whose desktop I need to search so there shouldn't be a security issue. I have to write a small routine to add...
3
4442
by: jctwin9 | last post by:
I've been trying to clean up the installer I created using vb 2005 as best as possible to finalize a project I am working on. I have my installer deploying a .pdf file in the application folder. I want the installer to create a shortcut to that .pdf file in the start menu. I do this by right clicking on the .pdf file that I have included on the setup project in the application folder of the files system editor and making a shortcut. After that I...
0
9597
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10369
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10372
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9187
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4329
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3851
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.