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

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 2005
Pythoncom doesn't directly support the necessary interfaces,
but you can use the Shell COM interfaces to create them.

import win32com.client
wsh=win32com.client.gencache.EnsureDispatch('wscri pt.shell')
s=wsh.CreateShortcut('c:\\python.url')
s.TargetPath='www.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.client.gencache.EnsureDispatch('wscri pt.shell')
s=wsh.CreateShortcut('c:\\python.url')
s.TargetPath='www.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
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."...
1
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...
1
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...
3
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...
1
by: tomp | last post by:
Does anyone know how to create file shortcuts in a VB program?
0
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...
1
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...
0
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
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...
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.