473,383 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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 9388
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_Desktop

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 "FeatureComponents" table. Add one row:

Feature: DefaultFeature

Component: Component_Desktop

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

Shortcut: Shortcut_Desktop

Directory: DesktopFolder

Component: Component_Desktop

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.microsoft.com (Felix Wang) wrote in message news:<Oj**************@cpmsftngxa06.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_Desktop

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 "FeatureComponents" table. Add one row:

Feature: DefaultFeature

Component: Component_Desktop

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

Shortcut: Shortcut_Desktop

Directory: DesktopFolder

Component: Component_Desktop

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.microsoft.com (Felix Wang) wrote in message news:<QD**************@cpmsftngxa06.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
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 *...
0
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...
0
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...
0
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...
0
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...
3
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
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...
3
by: =?Utf-8?B?UGF0?= | last post by:
How can I create a setup and deploment project which does not create Advertised Shortcuts.
1
!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...
3
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.