SharePoint - Group Policy

Asked By rossk
04-Feb-08 10:38 PM
I have what I think fits in this area a question.  Recently I had some
issue with my GP not working, that is now fixed.  The issue comes in
when a user logs into the domain the batch script to mount the drives
and drive letters works but there is no name associated to that
drive.  So they get a M:drive but it says discconected network drive.
The drive is in fact working.
The script looks like this:
net use X: \\Server\pictures /Persistent:No
echo X: pictures

Am I missing something in the batch script?  Is there something with
in grop policy that I am missing?

Thanks
ObjWSHShell.CreateShortcut
(1)
Wscript.Shell
(1)
ObjWSHShell
(1)
ObjShortcut.TargetPath
(1)
ObjShell.Namespace
(1)
StrShortcutPath
(1)
StrShortcutName
(1)
ObjFolderItem
(1)
  Nahed Hatahet replied...
24-Jan-08 05:36 PM
why not using .vbs ...

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 = "Name of the site"
strShortcutPath = "\\this.is.the.site\"

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

cu
nahed
  rossk replied...
04-Feb-08 10:38 PM
I would love to I do not know VBS.  Unless you can write it for me
below:
\\GGMAIN\Clients\Setup\setup.exe /s GGMAIN
net use M: "\\GGMAIN\architecture\Job & Master Files" /Persistent:No
net use O: \\GGMAIN\architecture\Drop /Persistent:No
net use R: \\GGMAIN\architecture\Drawings /Persistent:No
net use V: \\GGMAIN\architecture\Drawings\Verizon /Persistent:No
net use X: \\GGMAIN\architecture /Persistent:No
net use J: \\GGMAIN\architecture\IndustrialDesign /Persistent:No

Also do I write it in a text editor and save as a .vbs?  Then where do
I stick this?  In the same place in the GPO that there currect scipt
is?
Thanks
Ross



531-4072-86c9-3b6b446b775e@m34g2000hsb.googlegroups.com...
  rossk replied...
04-Feb-08 10:38 PM
This is what I have based off what you typed to me:

Const NETHOOD =3D &H13&
Set objWSHShell =3D CreateObject("Wscript.Shell")
Set objShell =3D CreateObject("Shell.Application")
Set objFolder =3D objShell.Namespace(NETHOOD)
Set objFolder =3D objShell.Namespace(NETHOOD)
Set objFolderItem =3D objFolder.Self
strNetHood =3D objFolderItem.Path

strShortcutName =3D "Job & Master Files"
strShortcutPath =3D "\\GGMAIN\architecture\Job & Master Files"
strShortcutName =3D "Drop"
strShortcutPath =3D "\\GGMAIN\architecture\Drop"
strShortcutName =3D "Drawings"
strShortcutPath =3D "\\GGMAIN\architecture\Drawings"
strShortcutName =3D "Verizon"
strShortcutPath =3D "\\GGMAIN\architecture\Drawings\Verizon"
strShortcutName =3D "Architecture"
strShortcutPath =3D "\\GGMAIN\architecture"
strShortcutName =3D "Industrial Design"
strShortcutPath =3D "\\GGMAIN\architecture\IndustrialDesign"

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

This is not working.  I launched it after logging in to the domain and
no drives show up and no drive letters.

Thanks



531-4072-86c9-3b6b446b775e@m34g2000hsb.googlegroups.com...
  Nahed Hatahet replied...
26-Jan-08 11:04 AM
hello!

if u execute the vbs-script from your desktop (without gpo).
just put it on the desktop and double-click it.
what happens? does it work?
(i have to know, if the problem is on the script or on configuring AD /
GPO).
(the script i send u works fine)
so let me know
cu
nahed


This is what I have based off what you typed to me:

Const NETHOOD = &H13&
Set objWSHShell = CreateObject("Wscript.Shell")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(NETHOOD)
Set objFolder = objShell.Namespace(NETHOOD)
Set objFolderItem = objFolder.Self
strNetHood = objFolderItem.Path

strShortcutName = "Job & Master Files"
strShortcutPath = "\\GGMAIN\architecture\Job & Master Files"
strShortcutName = "Drop"
strShortcutPath = "\\GGMAIN\architecture\Drop"
strShortcutName = "Drawings"
strShortcutPath = "\\GGMAIN\architecture\Drawings"
strShortcutName = "Verizon"
strShortcutPath = "\\GGMAIN\architecture\Drawings\Verizon"
strShortcutName = "Architecture"
strShortcutPath = "\\GGMAIN\architecture"
strShortcutName = "Industrial Design"
strShortcutPath = "\\GGMAIN\architecture\IndustrialDesign"

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

This is not working.  I launched it after logging in to the domain and
no drives show up and no drive letters.

Thanks
  rossk replied...
04-Feb-08 10:39 PM
Nothing happens, no drives no errors.  Also how can I assign drive
letters to those drives?

c75-4a40-80ed-5c44b919d6e0@d4g2000prg.googlegroups.com...
roups.com...
  Nahed Hatahet replied...
28-Jan-08 05:16 PM
i didn“t read that you need a drive-letter, this script produces the links
in the network hive
in windows explorer, sorry for that ... but u can subst drive letters to
this areas in e.g. windows vista.
cu
nahed

Nothing happens, no drives no errors.  Also how can I assign drive
letters to those drives?
help
2007 SharePoint Setup Discussions Windows SharePoint Services (1) INTECHPortalBackups (1) SharePoint (1) Scripting.FileSystemObject (1) WScript.Shell (1) ObjShell.CurrentDirectory (1) Database (1) C9317097Content (1) Dear Ken, '- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - 'Just save this code with dt) bkFolder = f.Path bkFolder = Replace(bkFolder, "", " \ ") bkFolder = bkFolder '- -- -- -- -- -- -- -- -- -- -- -- --<Start to backup> - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Set objShell = CreateObject("WScript.Shell") objShell.CurrentDirectory = "c: \ Program Files \ Common Files \ Microsoft Shared \ web server extensions \ 12 \ BIN \ " objShell
Express. Thanks SharePoint Discussions SQL Express (1) SharePoint (1) ObjWMIService.ExecQuery (1) WScript.CreateObject (1) WScript.Shell (1) ObjWMIService (1) ObjFolder.Delete (1) GetObject (1) stsadm is a command line application so extensions \ 12 \ BIN \ stsadm""" +"-o backup -directory drive: \ folder_for_backup -backupmethod full" Set WshShell = WScript.CreateObject("WScript.Shell") Return = WshShell.Run(strBackup, 0, true) Set WshShell = Nothing keywords: WSS, 3.0, schedule, bckup
date))) 'Day of week used to place backup in a particular folder Set objShell = CreateObject("WScript.Shell") 'Find path of SharePoint installation and where stsadm is located strRegKey = objShell.RegRead ("HKEY_LOCAL_MACHINE \ SOFTWARE