Question : Vbscript help. Simple pathing issue I think?

Here is my code.  
I got this far with this question:
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_26275520.html

Just need help finishing it up.
Here is what I got so far.

This is a combo of my other post plus some other stuff I used in the past. I am a vb hack so please feel free to make suggestions.

I think my error lies on the pathing to the file im checking.  I get the same result if i create the file or not.  (using msg box inplace of shown "then" statement)  

Thanks
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
' VBScript that will disable outlook profile wizard and create a an outlook profile FOR NEW USERS ONLY
'
Set WSHShell = WScript.CreateObject("WScript.Shell")
Dim fso, WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, Path
'
Set fso = CreateObject("Scripting.FileSystemObject")
Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")
DomainString = Wshnetwork.UserDomain
UserString = WSHNetwork.UserName

On Error Resume Next


if NOT fso.FileExists("\\fileserv\users\" & UserString & "." & DomainString & "\Application  Data\Microsoft\Outlook\Outlook.NK2") then
      WshShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup\FirstRun"
      WshShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup\First-Run"
      WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup\ImportPRF","c:\outlook.prf","REG_SZ"
end if
'
'Clean Up Memory We Used
set fso=nothing
set UserObj = Nothing
set GroupObj = Nothing
set WSHNetwork = Nothing
set DomainString = Nothing
set WSHSHell = Nothing

 
'Quit the Script
wscript.quit

Answer : Vbscript help. Simple pathing issue I think?

Random Solutions  
 
programming4us programming4us