473,765 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error while creating desktop shortcut

2 New Member
Hi All,

Iam using the following JavaScript to create desktop shortcut

Expand|Select|Wrap|Line Numbers
  1. function createShortcut() {
  2.         if (ActiveXObject) {
  3.             // Create desktop shortcut
  4. WshShell = new ActiveXObject( "WScript.Shell" );
  5.             strDesktop = WshShell.SpecialFolders("Desktop");
  6.             oShellLink = WshShell.CreateShortcut(strDesktop + "\\My Shortcut.lnk");
  7.             oShellLink.TargetPath = url;
  8.             oShellLink.WindowStyle = 1;                
  9.             oShellLink.Description = "some description";
  10.             oShellLink.WorkingDirectory = strDesktop;
  11.             oShellLink.Save();
  12.                                }
  13. }
For most of the browser this is working fine but for some a javascript error is shown at line number pointing to oShellLink.Desc ription = "some description";

the error is as follows :

Line: 343
Char: 7
Error: Object doesn't support this action

Code: 0


Can anyone tell what might be the problem? Is it the browser version or OS version or some security setting??

Thanks in advance
Rahul
Feb 7 '07 #1
2 2517
acoder
16,027 Recognized Expert Moderator MVP
This will only work in IE.

See this page on MSDN which deals with a similar example to yours. Maybe you can leave out the description line and see if that works.
Feb 7 '07 #2
urrahul
2 New Member
Thanks for your reply.
Do we have any restriction on the Windows operating system or Internet explorer browser version for this to function without any problems?


Thanks
rahul
Feb 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2310
by: Roy G. Vervoort | last post by:
I would like to create a shortcut on my desktop and be able to start a program (.exe) from the prgram tree (start > Programs > name program). Normally it wil be created with the setup program but i can not use this. thanks for any suggestions, Roy The Neterlands
5
16258
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information Server might not be running or the path exists and is redirected to another machine. Please check the status of this virtual directory in the Internet Services Manager."
4
1745
by: NaterPotater | last post by:
I can't seem to get my head around the Visual Studio's Deployment Projects: I want the user, at install-time, to be able to specify if they want a icon placed on the desktop or not (I'm trying to use Checkboxes(A)). Seemingly you can just place the Checkbox1Property Name into the User's Desktop Condition but that does not work. I actually saw an article that highlighted this process as "the way to do it", so I downloaded the source and...
6
4752
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
3
2265
by: Marius Rus | last post by:
I have an application write in c# and i want to offer to the user to create himself shortcuts with icons for the main menu items. I will very much appreciate if will receive an helping hand. Thank you
7
5022
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
7
31263
by: GrandpaB | last post by:
I would appreciate assistance learning how to create a Desktop shortcut in my setup project. In the left pane of the Setup/File System window I right-clicked User's Desktop. From the contex menu I clicked Create Shortcut to User's Desktop. In the right pane of the setup/File System window the object Shortcut to User's Desktop appeared. When I selected the object and checked it's properties the Target and WorkingFolder are User's...
2
7535
bartonc
by: bartonc | last post by:
There are many applets and other goodies on Windows that must be run by using a command: The normal way to access these tools is to go to the Start menu and click Run. Then type in the name of the command that you want to run. It's not the most productive or efficient way to get to XP's tools and goodies. That's where desktop shortcuts really come in handy! http://bytes.com/images/howtos/687862_startrun.gif One tool that I often...
15
2510
by: Mike Driscoll | last post by:
Hi, I've had this niggling issue from time to time. I want to create a shortcut on the user's desktop to a website that specifically loads Firefox even if Firefox is not the default browser. I usually use COM as it allows very specific settings of the shortcut, such as the Working Directory and the Target Path. However, the following will not work for some reason:
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
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
10007
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
9951
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
9832
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7375
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...
1
3924
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
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.