jowen Posted October 12, 2010 Share Posted October 12, 2010 I have the following error after my login script as processed;Code 800A01AD - ActiveX component can't create object: 'Scripting.FileSystemObject' which refers to line 15 of my script;Option ExplicitDim objNetwork, strUNCPrinter, bForce, bUpdateProfile, loop_counterDim strDriveLetter, fs, WinDir, strComputer, GroupObj, WSHPrintersDim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, PathDim hp_present, mc_present, lp_present, hp2_presentSet objNetwork = CreateObject("WScript.Network") ' wscript.echo "Starting"!! THIS LINE!!Set fs = CreateObject("Scripting.FileSystemObject")I have wscript version 5.6 and running server 2003 R2 64 bit SP2, any ideas??Many thanks Jo Link to comment Share on other sites More sharing options...
cluberti Posted October 12, 2010 Share Posted October 12, 2010 It doesn't make sense if you've Dim'd it out, although using fs instead of objFSO or oFSO is technically bad form. Can you run the script after the user's logged in manually, or create a new one that just writes a test file similarly to see if it's a user permissions error? Link to comment Share on other sites More sharing options...
jowen Posted October 13, 2010 Author Share Posted October 13, 2010 thanks,this isn't my script I've inherited it and your right this doesn't run after login, I am coming to conclusion to rewrite the entire script will be quicker in the long run than pickng my way through problems. Its' not dim'd out in the script I just put the remark to show which line is failing. Link to comment Share on other sites More sharing options...
CoffeeFiend Posted October 13, 2010 Share Posted October 13, 2010 using fs instead of objFSO or oFSO is technically bad formNot everyone is that much into hungarian notation (there's quite a bit of people against that; but yeah vbscript is untyped...) Using just "fso" is just as good IMO. I tend to heavily use "shorthand" names like "fso" or "wsh" in vbscript. It's still rather obvious what it is (you kind of have to know what it is to actually make use of it in the first place), and it's quicker to type (yes, I *am* lazy). Link to comment Share on other sites More sharing options...
jowen Posted October 14, 2010 Author Share Posted October 14, 2010 Whoops hope I haven't started an angry debate with this one. Thanks for all your comments, I'm probably going to go away andjust write a basic batch file now for my logins :0) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now