• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 562
  • Last Modified:

logon script is not working

I wrote a VBS script below:

set wshshell=createObject("wscript.shell")
wshShell.Run("RegEdit /s " & "RoamingProfile.reg")

To run this reg file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"ParseAutoexec"="1"
"ExcludeProfileDirs"="Local Settings\\Temporary Internet Files;Local Settings\\History;Local Settings\\Temp"


Its to remove this registry entry so that roaming profiles will move the Outlook folder. I put it in the logon script section for group policy but it does not run. If I run it on the local machine it works. Is there something I need to change in the script since it is going through group policy and loading off a server instead of just clicking and running from the local machine?
0
Thomas N
Asked:
Thomas N
1 Solution
 
Krys_KCommented:
HI There
Other than use VBscript to actually write thos keys into the registry, you could also make use of this area in the GPO
'User Config\Admin Templates\System\Logon\Run these programs at user logon'

See if that helps?
Regards
Krystian
0
 
Krys_KCommented:
Also, is the ..reg file located with the logon script?
Krystian
0
 
Thomas NSystems Analyst - Windows System AdministratorAuthor Commented:
Yes, Its in the same folder as the logon script. I also added an additional rule under software restrictions in the GPO to give users unrestricted access to the folder where the script is at.
0
 
Justin_W_ChandlerCommented:
could it be easier to just use REG DELETE /F HKLM\Software\Windows\CurrentVersion\Etc instead of writing a VBS script that merges a REG file?
0
 
JustWorkingCommented:
You might try calling regedit.exe in your vb
Dim Shell
Set Shell = CreateObject("WScript.Shell")
shell.Run "C:\windows\regedit.exe /s \\server\yourshare\RoamingProfile.reg"

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell┬« is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now