sharepoint network shortcut

Please read all of this before you respond.

I have a sharepoint site that I need to create a network share and I need it to have a clean appearance.

What I want I can not seem to have, if I create a network shortcut from the gui in windows 7, explorer, computer, map network drive, select "connect to a Web site ..." what I get is a very clean looking shortcut under the mapped drive letters with very clean names.

I need to either be able to do this task 1. from a command prompt 2. from a vbs script 3. by a manual manipulation of the registry.

I can create a folder using net use but what I get is not a clean share, this is not about me this is about my user community that does not like change, and will not like shares with dirty names, it just confuses them.

Can anyone help
LVL 1
john15nltAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris GralikeSpecialistCommented:
Hi John,

What does 'clean' mean in this context? could you please elaborate on this?

rgrds,
0
john15nltAuthor Commented:
this is the difference between a clean share and a dirty share
Users was created with net use, johnshared was created via the map network drive interface in explorer.  I know there has to be a way to programmatically/command line create the second one.
0
Chris GralikeSpecialistCommented:
Hi John,

You post is somewhat confusing.
The folder that you see is in fact a shortcut, not a network location.

The network shortcuts are stored at:
C:\users\{username}\AppData\Roaming\Microsoft\Windows\Network Shortcuts\{Location}\target.lnk
C:\users\{username}\AppData\Roaming\Microsoft\Windows\Network Shortcuts\{Location}\desktop.ini

You can programmically create them using vbs. I didnt test it, but this might do the job:
http://ss64.com/vb/shortcut.html
http://community.spiceworks.com/scripts/show/229-add-shares-to-my-network-places

A quick glance at the script makes me wonder if the path / pathtrees are right. But those are easly altered.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

john15nltAuthor Commented:
Ok now we are getting somewhere.. the scripts are close but are pretty much what I have already been dealing with they create a shortcut in C:\users\{username}\AppData\Roaming\Microsoft\Windows\Network Shortcuts\ however when you create this link via the gui it creates a directory and then the link is inside that folder.

I was able to modify the script to get it to create a folder and the link inside that folder, however instead of opening that link in explorer (which is what I am after) it opens a browser.. notice also the links are not the same.

Set WSHShell = CreateObject("WScript.Shell")
Dim oFSO
Set oFSO = CreateObject("Scripting.FileSystemObject")

Const NETHOOD = &H13&

Set objWSHShell = CreateObject("Wscript.Shell")

Set objShell = CreateObject("Shell.Application")

Set objFolder = objShell.Namespace(NETHOOD)
Set objFolderItem = objFolder.Self


strNetHood = objFolderItem.Path


strPath = objFolderItem.Path & "\*.*"
On Error Resume Next
objFSO.DeleteFile strPath, true

strShortcutName = "NewShare"
strShortcutPath = "https://XXXXXX/users"

strNetHood = strNetHood & "\" & strShortcutName
wscript.echo strNetHood
oFSO.CreateFolder strNetHood

Set objShortcut = objWSHShell.CreateShortcut _
(strNetHood & "\target.lnk")
objShortcut.TargetPath = strShortcutPath
objShortcut.Save


WSCript.Quit


Any thoughts?
networkshares.JPG
0
Chris GralikeSpecialistCommented:
Hi John,

Give me a few moments.

I will see if i can script something for you.
This might take a short while because i need to finish something else first.

I hope you dont mind ;-)
0
Chris GralikeSpecialistCommented:
Please give this a try:
Const NETHOOD = &H13&

Set objWSHShell = CreateObject("Wscript.Shell")
Set objShell = CreateObject("Shell.Application")

Set objFolder = objShell.Namespace(NETHOOD)
Set objFolderItem = objFolder.Self
strNetHood = objFolderItem.Path

strShortcutName = "Testfolder"
strShortcutPath = "\\sp.company.nl@SSL\SITENAME\Shared Documents\"

Set objShortcut = objWSHShell.CreateShortcut _
    (strNetHood & "\" & strShortcutName & ".lnk")
objShortcut.TargetPath = strShortcutPath
objShortcut.Save

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Chris GralikeSpecialistCommented:
Just tested it.
It opens up an explorer window like expected.
0
john15nltAuthor Commented:
Great job thanks,
0
john15nltAuthor Commented:
This is a followup, this works on windows 7 without a hitch.  It will also create the shares in windows xp without a problem.  the issue is that in windows xp they will not work.  I am not sure where the breakdown is (some where in the windows web services api) or somewhere else.

If someone could help me navigate this issue that would be great.
0
Chris GralikeSpecialistCommented:
webdav is required. im not sure windows xp its explorer proces supports webdav without additional config.

rgrds Chris
0
Chris GralikeSpecialistCommented:
webdav is required. im not sure windows xp its explorer proces supports webdav without additional config.

rgrds Chris
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.