I want to add a shortcut on the user's desktop, the shortcut is a URL to a
website (like http://www.microsoft.com)
How can I do it with c#? 10 1826
It use COM, can .NetFramework do it?
"Michael Nemtsev" <ne*****@msn.com>
???????:9c**************************@msnews.micros oft.com... Hello ad,
Sample is here http://groups.google.com/group/micro...22870899983618
a> I want to add a shortcut on the user's desktop, the shortcut is a URL a> to a a> website (like http://www.microsoft.com) a> How can I do it with c#? --- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche
Hello ad,
No way for .net. What's wrong with COM calls?
a> It use COM, can .NetFramework do it?
a>
a> "Michael Nemtsev" <ne*****@msn.com>
a> ???????:9c**************************@msnews.micros oft.com...
a> Hello ad,
Sample is here http://groups.google.com/group/micro...languages.csha rp/tree/browse_frm/thread/7a2f327b31b53f3c/66066db85daa0595?rnum=1&q= C%23+create+shortcut&_done=%2Fgroup%2Fmicrosoft.pu blic.dotnet.languag es.csharp%2Fbrowse_frm%2Fthread%2F7a2f327b31b53f3c %2Fb622870899983618 %3Flnk%3Dst%26q%3DC%23+create+shortcut%26rnum%3D2% 26#doc_b62287089998 3618
a> I want to add a shortcut on the user's desktop, the shortcut is a URL a> to a a> website (like http://www.microsoft.com) a> How can I do it with c#? --- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
>> No way for .net.
Surely this can't be right?
Why can't you do it in .NET?
A website like that is just a text file that follows a certain format.
The file must have a .URL extension. And the text must look something
like this:
[DEFAULT]
BASEURL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288
[InternetShortcut]
URL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288
Modified=60013FB312DCC50107
IconFile=https://imagesak.godaddy.com/assets/godaddy.ico
IconIndex=1
As you can tell, this is a link to GoDaddy's WHOIS function (one of my
most used web shortcuts).
So all you need to do is write this file, and stick it on the desktop.
You can do this for either the current logged in user, or all users.
Once again, its just a folder to write to. You can get the path through
system environment variables, or if you definately know that the
folder: "C:\Documents and Settings\All Users\Desktop\" exists, then
just write it there.
Steven Nagy
Thanks,
I have use SpecialDirectories.Desktop to Get the user's Desktop folder.
But I can't find how to get the Dedktop folder of All user.
"Steven Nagy" <le*********@hotmail.com>
???????:11*********************@e56g2000cwe.google groups.com... No way for .net.
Surely this can't be right? Why can't you do it in .NET?
A website like that is just a text file that follows a certain format. The file must have a .URL extension. And the text must look something like this:
[DEFAULT] BASEURL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288 [InternetShortcut] URL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288 Modified=60013FB312DCC50107 IconFile=https://imagesak.godaddy.com/assets/godaddy.ico IconIndex=1
As you can tell, this is a link to GoDaddy's WHOIS function (one of my most used web shortcuts).
So all you need to do is write this file, and stick it on the desktop. You can do this for either the current logged in user, or all users. Once again, its just a folder to write to. You can get the path through system environment variables, or if you definately know that the folder: "C:\Documents and Settings\All Users\Desktop\" exists, then just write it there.
Steven Nagy
Impersonate the Everyone Account.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:OZ*************@TK2MSFTNGP10.phx.gbl... Thanks, I have use SpecialDirectories.Desktop to Get the user's Desktop folder. But I can't find how to get the Dedktop folder of All user.
"Steven Nagy" <le*********@hotmail.com> ???????:11*********************@e56g2000cwe.google groups.com... No way for .net.
Surely this can't be right? Why can't you do it in .NET?
A website like that is just a text file that follows a certain format. The file must have a .URL extension. And the text must look something like this:
[DEFAULT] BASEURL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288 [InternetShortcut] URL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288 Modified=60013FB312DCC50107 IconFile=https://imagesak.godaddy.com/assets/godaddy.ico IconIndex=1
As you can tell, this is a link to GoDaddy's WHOIS function (one of my most used web shortcuts).
So all you need to do is write this file, and stick it on the desktop. You can do this for either the current logged in user, or all users. Once again, its just a folder to write to. You can get the path through system environment variables, or if you definately know that the folder: "C:\Documents and Settings\All Users\Desktop\" exists, then just write it there.
Steven Nagy
How to impersonate the Everyone Account?
Could someone give me an example?
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> ¼¶¼g©ó¶l¥ó·s»D:%2****************@TK2MSFTNGP12.phx .gbl... Impersonate the Everyone Account.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer
Presuming that God is "only an idea" - Ideas exist. Therefore, God exists.
"ad" <fl****@wfes.tcc.edu.tw> wrote in message news:OZ*************@TK2MSFTNGP10.phx.gbl... Thanks, I have use SpecialDirectories.Desktop to Get the user's Desktop folder. But I can't find how to get the Dedktop folder of All user.
"Steven Nagy" <le*********@hotmail.com> ???????:11*********************@e56g2000cwe.google groups.com...> No way for .net.
Surely this can't be right? Why can't you do it in .NET?
A website like that is just a text file that follows a certain format. The file must have a .URL extension. And the text must look something like this:
[DEFAULT] BASEURL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288 [InternetShortcut] URL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288 Modified=60013FB312DCC50107 IconFile=https://imagesak.godaddy.com/assets/godaddy.ico IconIndex=1
As you can tell, this is a link to GoDaddy's WHOIS function (one of my most used web shortcuts).
So all you need to do is write this file, and stick it on the desktop. You can do this for either the current logged in user, or all users. Once again, its just a folder to write to. You can get the path through system environment variables, or if you definately know that the folder: "C:\Documents and Settings\All Users\Desktop\" exists, then just write it there.
Steven Nagy
Hello Steven,
Your way is a bit tricky, and totally depends on the creating file knowing
this stucture.
It may sounds a bit snobby, but using standard classes guarantee that your
code is independed if MS change structure for shortcut.
SN> Surely this can't be right?
SN> Why can't you do it in .NET?
SN> A website like that is just a text file that follows a certain
SN> format. The file must have a .URL extension. And the text must look
SN> something like this:
SN>
SN> [DEFAULT]
SN> BASEURL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288
SN> [InternetShortcut]
SN> URL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288
SN> Modified=60013FB312DCC50107
SN> IconFile=https://imagesak.godaddy.com/assets/godaddy.ico IconIndex=1
SN>
SN> As you can tell, this is a link to GoDaddy's WHOIS function (one of
SN> my most used web shortcuts).
SN>
SN> So all you need to do is write this file, and stick it on the
SN> desktop. You can do this for either the current logged in user, or
SN> all users. Once again, its just a folder to write to. You can get
SN> the path through system environment variables, or if you definately
SN> know that the folder: "C:\Documents and Settings\All
SN> Users\Desktop\" exists, then just write it there.
SN>
SN> Steven Nagy
SN>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Hello ad,
Use this way
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine;
key = key.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\Curr entVersion\\Explorer\\Shell
Folders");
String commonDesktop = key.GetValue("Common Desktop").ToString();
a> How to impersonate the Everyone Account?
a> Could someone give me an example?
a> "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com>
a> ¼¶¼g©ó¶l¥ó·s»D:%2****************@TK2MSFTNGP12.phx .gbl...
a> Impersonate the Everyone Account.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer Presuming that God is "only an idea" - Ideas exist. Therefore, God exists. "ad" <fl****@wfes.tcc.edu.tw> wrote in message news:OZ*************@TK2MSFTNGP10.phx.gbl...
Thanks, I have use SpecialDirectories.Desktop to Get the user's Desktop folder. But I can't find how to get the Dedktop folder of All user. "Steven Nagy" <le*********@hotmail.com> ???????:11*********************@e56g2000cwe.google groups.com...
>> No way for .net. >> Surely this can't be right? Why can't you do it in .NET? A website like that is just a text file that follows a certain format. The file must have a .URL extension. And the text must look something like this:
[DEFAULT] BASEURL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288 [InternetShortcut] URL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288 Modified=60013FB312DCC50107 IconFile=https://imagesak.godaddy.com/assets/godaddy.ico IconIndex=1
As you can tell, this is a link to GoDaddy's WHOIS function (one of my most used web shortcuts).
So all you need to do is write this file, and stick it on the desktop. You can do this for either the current logged in user, or all users. Once again, its just a folder to write to. You can get the path through system environment variables, or if you definately know that the folder: "C:\Documents and Settings\All Users\Desktop\" exists, then just write it there.
Steven Nagy
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Here's an example: http://msdn.microsoft.com/library/de...ClassTopic.asp
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:OH**************@TK2MSFTNGP12.phx.gbl... How to impersonate the Everyone Account? Could someone give me an example?
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> ¼¶¼g©ó¶l¥ó·s»D:%2****************@TK2MSFTNGP12.phx .gbl... Impersonate the Everyone Account.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer
Presuming that God is "only an idea" - Ideas exist. Therefore, God exists.
"ad" <fl****@wfes.tcc.edu.tw> wrote in message news:OZ*************@TK2MSFTNGP10.phx.gbl... Thanks, I have use SpecialDirectories.Desktop to Get the user's Desktop folder. But I can't find how to get the Dedktop folder of All user.
"Steven Nagy" <le*********@hotmail.com> ???????:11*********************@e56g2000cwe.google groups.com... >> No way for .net.
Surely this can't be right? Why can't you do it in .NET?
A website like that is just a text file that follows a certain format. The file must have a .URL extension. And the text must look something like this:
[DEFAULT] BASEURL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288 [InternetShortcut] URL=https://www.godaddy.com/gdshop/whois.asp?se=%2B&ci=288 Modified=60013FB312DCC50107 IconFile=https://imagesak.godaddy.com/assets/godaddy.ico IconIndex=1
As you can tell, this is a link to GoDaddy's WHOIS function (one of my most used web shortcuts).
So all you need to do is write this file, and stick it on the desktop. You can do this for either the current logged in user, or all users. Once again, its just a folder to write to. You can get the path through system environment variables, or if you definately know that the folder: "C:\Documents and Settings\All Users\Desktop\" exists, then just write it there.
Steven Nagy
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Top Gun |
last post by:
I am trying to get the output from a setup project to place an entry on the
menu plus a shortcut on the option, but setting the property's in User's
Desktop and User's Programs Meny to true doesn't...
|
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"...
|
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...
|
by: Mark Howell |
last post by:
When working with VS.Net's Setup solutions, I can set it to put a shortcut
on the User's desktop and during installation it will prompt the user if
this program should be installed for all users or...
|
by: I_AM_DON_AND_YOU? |
last post by:
There is one more problem I am facing but didn't get the solution. In my
Setup Program I am not been able to create 2 things (when the program is
intalled on the client machine ) : (1) create...
|
by: DraguVaso |
last post by:
Hi,
I want my appliation to Run a Shortcut on my Desktop. This should be done
regardless the fact if the Shortcut is in the All Users\Desktop or
MyProfile\Desktop and regardless the version of...
|
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...
|
by: TN |
last post by:
I think I am losing my mind. I've got a simple application for which I
have a setup project to install the application. I create a shortcut to
the applications project in the user's desktop. ...
|
by: peter.bittner |
last post by:
I have developed a Windows application in Visual Studio .NET 2003 and
created a Setup project for it. In the File System Editor I have added
a shortcut to the User's Desktop folder to point to the...
|
by: Michael7taylor |
last post by:
Hi All,
This one is doing me in.
I have a deployment project that install my app just fine, creating a shortcut the points to the Primary Output and places it on the the desktop of all users.
...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |