Group policy PRF logon.vbs script error

Posted on 2010-01-11
Medium Priority
Last Modified: 2012-05-08
Dear All,

I am setting up a PRf outlook file and trying to apply it to my Logon script but with errors.
Win3K DC Domain and exchange 2003 sp2. the PRF file works great when run on it's own. When i add the lines in the VBS and try and run i get line errors. I have tried a number of differant lines and all error.
Dim objShell, shellthis, shellcmd

outlook.exe /importprf \\smart8\ezaudit\smart systems.prf

shellthis = "\\smart8\ezaudit\ezstart.exe"
shellcmd = Chr(32) & "/auto"

Set objShell = CreateObject("WScript.Shell")
objShell.Run Chr(34) & shellthis & Chr(34) & shellcmd ,1,False
Set objShell = Nothing

Set objShell = Wscript.CreateObject("Wscript.Shell")
objShell.Run "\\smart8\ezaudit\bginfo.exe /accepteula \\smart8\ezaudit\BGinfo.bgi

/silent /timer:0"


Can someone please advise where i am going wrong.

Question by:smartsyatton
1 Comment
LVL 31

Accepted Solution

Henrik Johansson earned 2000 total points
ID: 26285658
The line with outlook.exe isn't VB-code. Executing the command line that way will work if it's a CMD-script, but not a VB-script.
Execute the command line through objShell.run method.

outlookcmd="outlook.exe /importprf \\smart8\ezaudit\smart systems.prf"
objShell.Run outlookcmd

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You finally migrated Public Folders to Office 365, decommissioned the Public Folder mailbox database and since then, when you send an email from on-premise to mail-enabled Public Folders, you get the following error: "Misconfigured public folder mai…
Upgrading from older Exchange server to the latest Exchange server can be tiresome, error-prone and risky, without being a seasoned exchange server administrators. It can become even problematic if you're an organization that runs on tight timeline…
This video discusses moving either the default database or any database to a new volume.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question