Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login Script error Question

Status
Not open for further replies.

capkirk

Technical User
Jun 4, 2007
92
US
I have an inventory login script that is apparently causing some issues.

Although the first 20 PCs I tested on worked fine, I am now being told that some users are getting an error "invalid file path Line 51".

line 51 has "If (objFSO.FileExists(strFullName)) Then WScript.Quit"

what this script does is write inventory information to a file that resides in a public folder when they login, unless the file already exists, then it skipsthe entire process.

these PCs already have the file existing.

what I am being told (I havent seen this for myself yet) is that the users have login issues when this happens.

they try to open Outlook and it prompts them for domain, username, password as if they were not logged in at all.

it has been suggested that I move this to a logOFF script.

I guess my question is: can a script like this keep someone from logging onto the network? or at least slow down the process?

what is strange is this is only happening to maybe a handful of PCs out of all we have.

 
check that strFullName is in the form of \\server\share and not a drive letter e.g. g:\share

check they have permissions on the share.

It will slow the process down, but they should still be able to logon.

 
I checked, and it is in the form \\server\share.

just how much could it slow down the process?

they are telling me several minutes, although our users have been known to exaggerate from time to time.
 
Depends on the script, and what information you retrieving, and how many wscript.sleep 's you may have.

You may also want to set the script to run only once and not every time they logon. I set mine to run once a day at logon
thanks to Mark D. MacLachlan for his help with this.

ON ERROR RESUME NEXT

'RunLogonScriptOnceADay
'==========================================================================

Dim varToday, Verify, LastRunDate
Set WshShell = CreateObject("Wscript.Shell")

varToday = Weekday(Date)

Verify = "HKLM\SOFTWARE\MyInstallsAndFixes\"

'Check if scan has run today and if so exit
On Error Resume Next
LastRunDate = WshShell.RegRead(Verify & "LogonOnce")
If LastRunDate = cstr(Date) Then
WScript.Quit
Else
WshShell.RegWrite Verify & "LogonOnce",Date,"REG_SZ"
End If
 
thanks to Mark D. MacLachlan for his help with this.

Glad to see you passing on the knowledge GrimR.
rockin2.gif


I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top