Problem with AD Logon Script referring to VBS file

We run Windows Server 2008 R2. I created a logon script that referred to a VBS file that would map network locations instead of mapped drives since we want to get away from mapped drives. I created two new users that I was testing the script on. Both these users wont map the network locations to their profiles. I then put the script for my logon and it works just fine. What could be wrong with the users profiles or a setting on their computer that would cause the script to not work. I can place the scripts on their desktop and can run it that way but we want it to run when they logon. Note - The script runs fine just wont auto load on logon for the new users that were copied from another.  

Here is the Logon

@echo off

NET USE * /d /y

start C:\design.vbs    (runs off server in reality)

VBS Script

Set WSHShell = CreateObject("WScript.Shell")

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 = "Shortcut"
strShortcutPath = "\\server\folder"

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

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Will SzymkowskiSenior Solution ArchitectCommented:
When you are referencing a script in the Logon Script area under the profile Tab in the AD Account, these scripts need to be located in the Netlogon Share. This Share gets replicated among all of the DC's in the domain.

If you have the script anywhere else other than in the Netlogon Share it will not work.
if you want to run logon scripts from a network location and not the Netlogon Share then you would use GPO's and startup scripts referencing the complete path where the script is located.

Personally, not sure why you wouldn't use Group Policy Preferences for mapping network drives. It is much easier and much more flexible.

Take a look below for more details on this.

bobgrafAuthor Commented:
I've requested that this question be deleted for the following reason:

I figured it out myself
Will SzymkowskiSenior Solution ArchitectCommented:

This ticket has been open all after noon with no comments, and as soon as i post something you state that you resolved this issue on your own with no explanation on how you corrected this issue.


bobgrafAuthor Commented:
Problem was a $ when I was directing it to the server drive example server\C$\folder\design.vbs   removing the $ fixed it. I wasn't running the vbs script off the AD server. The logon script was running from the Netlogon shares but I referred the start file (vbs) to a shared network drive that would allow users permission to run it. As I stated before when I pathed the location I included a C$ which was an admin function which caused the user not to be able to run the file and get an access denied. We don't use GP as unfortunately each user generally has a different set of mapped drives currently. We don't want to use mapped drives due to the randsomware virus and go with network locations that has seemed to prevent the virus from hopping on the server. IF there is GP that will do network locations rather than mapped drives I am open checking it out. I did not refresh the page when I deleted the question so I did not see that you posted and for that I apologize however the answer you gave wouldn't have helped anyway.

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
Will SzymkowskiSenior Solution ArchitectCommented:
Forgot to refesh the page? The question has been open for 4+ hours. Anyways glad you got your answer.

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
Active Directory

From novice to tech pro — start learning today.