A
ad
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#?
website (like http://www.microsoft.com)
How can I do it with c#?
Steven Nagy said: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=+&ci=288
[InternetShortcut]
URL=https://www.godaddy.com/gdshop/whois.asp?se=+&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
ad said: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 said: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=+&ci=288
[InternetShortcut]
URL=https://www.godaddy.com/gdshop/whois.asp?se=+&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
Kevin Spencer said:Impersonate the Everyone Account.
--
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
ad said: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 said: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=+&ci=288
[InternetShortcut]
URL=https://www.godaddy.com/gdshop/whois.asp?se=+&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.
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" <[email protected]>
???????:[email protected]...
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=+&ci=288
[InternetShortcut]
URL=https://www.godaddy.com/gdshop/whois.asp?se=+&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
ad said:How to impersonate the Everyone Account?
Could someone give me an example?
Kevin Spencer said:Impersonate the Everyone Account.
--
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
ad said: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" <[email protected]>
???????:[email protected]...
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=+&ci=288
[InternetShortcut]
URL=https://www.godaddy.com/gdshop/whois.asp?se=+&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
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.