?
Solved

Group policy PRF logon.vbs script error

Posted on 2010-01-11
1
Medium Priority
?
374 Views
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.

Thanks
Adam
0
Comment
Question by:smartsyatton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 31

Accepted Solution

by:
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
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
New style of hardware planning for Microsoft Exchange server.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

743 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