473,466 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Create 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 9393
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...
0
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...
0
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...

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.