473,398 Members | 2,380 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,398 software developers and data experts.

Shortcut target with spaces in file name

md
Hi everybody -

I am writing an application to change the target and start in folder in
shortcuts. I am using Mattias Sjögren's ShellLink library (thanks!) but I
found a problem I was hoping someone knows a solution for. I don't think
it's a problem with Mattias's code, but it appears to happen in the call to
the API to change the link target. If I have a path like this:

"\\server\department\division\staff\jsmith\ACR MEETING.doc" (there are two
spaces between ACR and MEETING)
I want to change this to H:\ACR MEETING.doc

However, when I pass this to the .Path property of Mattias's library and
then look at the .Path property it is set to H:\ACR__MEE.doc. I have checked
and I am passing the correct path to the library.

Has anyone seen this before? Does anybody know of a solution?

Thanks very much for your help

Matt
Jul 21 '05 #1
1 2979
md
After more experimentation it appears this problem only manifests itself if
I am trying to set the shortcut target to a mapped drive. If it's a UNC path
this doesn't seem to happen. Wierd.

Matt

"md" <so*****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi everybody -

I am writing an application to change the target and start in folder in
shortcuts. I am using Mattias Sjögren's ShellLink library (thanks!) but I
found a problem I was hoping someone knows a solution for. I don't think
it's a problem with Mattias's code, but it appears to happen in the call to the API to change the link target. If I have a path like this:

"\\server\department\division\staff\jsmith\ACR MEETING.doc" (there are two spaces between ACR and MEETING)
I want to change this to H:\ACR MEETING.doc

However, when I pass this to the .Path property of Mattias's library and
then look at the .Path property it is set to H:\ACR__MEE.doc. I have checked and I am passing the correct path to the library.

Has anyone seen this before? Does anybody know of a solution?

Thanks very much for your help

Matt

Jul 21 '05 #2

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

Similar topics

0
by: Jack S. | last post by:
Hi all, I create a merge module using .Net 2003 Deploment project. I added a shortcut and used this merge module in InstallShield project. After installing the product, when click the...
1
by: Tom | last post by:
I created an msi using the Setup Wizard, but don't seem to be able to create a shortcut to the applicaton on the desktop (or prompt for one) or the menu. Also, I would like to add an "uninstall"...
2
by: Benjamin | last post by:
I have a very strange problem. I have developed a .NET solution. To set up user clients I have also included a "Deployment Project" in the solution: Using "File System Editor | User's Program...
1
by: md | last post by:
Hi everybody - I am writing an application to change the target and start in folder in shortcuts. I am using Mattias Sjögren's ShellLink library (thanks!) but I found a problem I was hoping...
1
by: Steve M | last post by:
Below is some code adapted from something I think was written by Mark Hammond. Originally I needed to create a Windows shortcut (link), and this code does the trick, requiring only the target...
6
by: Eric | last post by:
I am using remote desktop to access our Access database. I created a shortcut to the Access file on my desktop, but when i double click it, nothing happens. Even when I try to double click the...
2
by: Jorgen Bodde | last post by:
Hi all, This is slightly OT but it drives me nuts. Whenever I create a shortcut in the start menu (in Windows) of a python script, it will only execute it when the path where the script resides...
2
by: Ilya | last post by:
Hi, all! Some weird thing happens... I'm trying to create a shortcut programmatically in C#. I need to create a shortcut with the "target" parameter using slash. Actually I'm creating a...
4
by: Coolfusion | last post by:
Hi there, I want the programe to search for the shortcut exe file on the desktop and display the file path of the file. To obtain the file path manually, right-click the shortcut exe file and go...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...
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...

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.