473,785 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating internet shortcuts

I've seen the python.faqts page:
http://www.faqts.com/knowledge_base/...d/4475/fid/538 on how to
create windows shortcuts using Python.

Does anyone know if this be adapted to create internet shortcuts on
windows? (as used for Favorites).

Thank you,

--
Richard
Oct 9 '05 #1
2 2027
Pythoncom doesn't directly support the necessary interfaces,
but you can use the Shell COM interfaces to create them.

import win32com.client
wsh=win32com.cl ient.gencache.E nsureDispatch(' wscript.shell')
s=wsh.CreateSho rtcut('c:\\pyth on.url')
s.TargetPath='w ww.python.org'
s.Save()

hth
Roger

"Richard Townsend" wrote:
I've seen the python.faqts page:
http://www.faqts.com/knowledge_base/...d/4475/fid/538 on how to
create windows shortcuts using Python.

Does anyone know if this be adapted to create internet shortcuts on
windows? (as used for Favorites).

Thank you,

--
Richard



----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Oct 10 '05 #2
On Sun, 9 Oct 2005 23:08:45 -0400, Roger Upole wrote:
Pythoncom doesn't directly support the necessary interfaces,
but you can use the Shell COM interfaces to create them.

import win32com.client
wsh=win32com.cl ient.gencache.E nsureDispatch(' wscript.shell')
s=wsh.CreateSho rtcut('c:\\pyth on.url')
s.TargetPath='w ww.python.org'
s.Save()

hth
Roger


Thanks Roger - that works a treat :)

--
Richard
Oct 10 '05 #3

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

Similar topics

6
3253
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle." exception. The problem is that this exception isn't raised somewhere in a method, so it just shows up, and it causes the application to shut down. Is there anyway how to catch this kinds of exceptions? Can I put somewhere a
1
1681
by: Richard Johansson | last post by:
Hi, I want to create an option for creating shortcuts to my application on the users desktop and Start menu in the setup. In my deployment project i have created the necessary checkboxes, and tried to set Conditions on the folders "User's desktop" and "User's Program Menu", but the conditions doesnt seem to affect shortcuts, only physical files... Have anyone else run into these kinds of problems, or am i just missing something obvious...
1
2231
by: Jefferson Cowart | last post by:
I'm looking for a way to create new shortcuts for a user. While I realize I could just pre-create all the shortcuts and just copy them in. I would prefer just to be able to specify the file i want to store it in along with the URL and have it created on demand. Is there a way I can do this?
3
2266
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
1
1669
by: tomp | last post by:
Does anyone know how to create file shortcuts in a VB program?
0
1273
by: | last post by:
Hi all! How can I add "internet shortcuts" in the Start/User's Program Menu while deploying a VB.net setup project? When I try to "create new shortcut", Visual Studio warning me: "You cannot use an internet address here. Enter a path that points to a location on your computer or on the network". I know that "link" files in Windows have .url extension. So these are simply... files. But I can't add them to my setup project :-( Any idea?
1
1097
by: googleboy | last post by:
I need to create about 2000 shortcuts to a batch file. The shortcuts need to have: Name: %parameter%.lnk Target: n:\Path\To\batchfile.bat %parameter% Start In: n:\Path\To\ Where the parameter is filled in by reading in a file with all the
0
2014
by: pemigh | last post by:
I've seen several problems cropping up on computers with Internet Explorer 7. The oddest so far: Shortcuts to .mdb files fail silently when another user on the network has the file open. The more typical manifestation of the problem: You try to open a Microsoft Access file that resides on a different computer, and are told: 'Microsoft Access cannot open this file.
2
1682
by: Dmenace | last post by:
Microsoft blows my mind sometimes, what the hell were they thinking? Oh, wait they weren't, that's right. Anyway, I've got a Setup and Deployment added to my project, and it does everything I want it to, with 1 exception. I have created the infamous fonts folder in order for it to install fonts, but it's only putting shortcuts to them in the fonts folder under the windows directory. Why is this? With only shortcuts to them, I can not use...
0
9485
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
10161
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
10098
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
9958
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
7506
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
6743
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();...
1
4058
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
3662
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2890
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.