1 1 Microsoft Vbscript Compilation Error Invalid Character
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might microsoft vbscript compilation error '800a03ea' have Meta Discuss the workings and policies of this site About microsoft vbscript compilation error '800a0400' Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting microsoft vbscript compilation error '800a0401' ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 microsoft vbscript compilation error expected statement million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up VBScript Invalid Character 800A0408 compilation error up vote 16 down vote favorite 2 I get a compilation error when I try to run the following vbs code from a command prompt in Windows 7. Option Explicit Dim objNetwork,
Microsoft Vbscript Compilation Error Expected End Of Statement
strRemotePath1, strRemotePath2, strRemotePath3 Dim strDriveLetter1, strDriveLetter2, strDriveLetter3, strUserName Set objNetwork = CreateObject("WScript.Network") strUserName = objNetwork.UserName strDriveLetter1 = "H:" strDriveLetter2 = "P:" strDriveLetter3 = "S:" strRemotePath1 = "\\test\public\users\" & strUserName & "\" strRemotePath2 = "\\test\public\groups\" strRemotePath3 = "\\test\scans\" 'Section which maps two drives, M: and P: and S: objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1 objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2 objNetwork.MapNetworkDrive strDriveLetter3, strRemotePath3 'Extra code just to add a message box WScript.Echo "Map drives " & strDriveLetter1 & " & " & strDriveLetter2 & " & " & strDriveLetter3 Wscript.Quit It says the issue is with Line 1 Char 1. Any ideas? vbscript share|improve this question asked Jan 10 '10 at 23:27 Mike 1,33462447 15 have you saved your .vbs file as ANSI? –Rubens Farias Jan 10 '10 at 23:29 That was it. Thanks! –Mike Jan 10 '10 at 23:36 add a comment| 3 Answers 3 active oldest votes up vote 45 down vote accepted A possible problem is how your file was encoded; try to sav
XenDesktop 7.x Evaluations SysTools Export Notes Software Testdrive What is Software TestDrive? PowerShell Basic Question and Answers Deleting Files and Folders Copying File/Folder(s) Listing only Files/Folder(s) Executing Commands Unix like Head
Microsoft Vbscript Compilation Error '800a03e9'
& Tail Implementing detailed logging Mapping a Free Drive Letter Convert PS microsoft vbscript compilation error '800a0409' unterminated string constant script into an Exe Process Explorer Password Generator SQL List all active connections List all DBs Sizes in microsoft vbscript compilation error '800a0411' MBs List all DB names in Oracle Kill all sessions connected to SQL DB Search a complete SQL DB Convert UTC Time to Local Time Saving each row from SELECT http://stackoverflow.com/questions/2039104/vbscript-invalid-character-800a0408-compilation-error results set dbo vs. db_owner Others Php - What is my IP Address? ASP - What is my IP Address? Password Generator - Simple String Compiling Perl Modules Fix: Microsoft VBScript compilation error 800A0408: Invalid character gunnalagApril 29, 2011July 9, 2014 Fixing Microsoft VBScript compilation error 800A0408: Invalid character When you run a newly authored VBScript code that you copied http://www.gunnalag.com/2011/04/29/fix-microsoft-vbscript-compilation-error-800a0408-invalid-character/ from an existing/working script, you may possibly receive the “Microsoft VBScript compilation error 800A0408: Invalid character” as shown below. ------------------ Windows Script Host Script: C:TestRunBatch.vbs Line: 1 Char: 1 Error: Invalid character Code: 800A0408 Source: Microsoft VBScript compilation error
------------------ OK ------------------ Analysis: This error usually indicates that there is an invalid character in the script that VBScript compiler can’t understand. Thus it fails with the error. Cause: Very common cause for this error would the File Encoding used by the IDE/Editor software that you used to author/copy this script. Fix: You need to ensure that your VBScript is encoded in ANSI format for the VBScript compiler to successfully execute your script. How to Apply the fix: For the newbie's, they can use any of the latest text editors like Notepad++, Notepad2, etc,. where you have an option to change the File Encoding. My recommendation and much simpler tool is Notepad2 which gives to this option as shown below: Handling it in default Notepad: Share this:EmailPrintLinkedInFacebookTwitterPinterestGooglePocketRedditSkypeLike this:Like Loading... Posted in: Scripting Post navigation PreviousNext 8 thoughts ocompilation error at Line 1 Char 1" while running a vbscript file which contains following code (this is just a sample code). Option Explicit Dim strUser strUser = "Morgan" WScript.Echo "Hello ! " & http://www.morgantechspace.com/2015/07/vbscript-invalid-character-800a0408.html strUser Wscript.Quit I have received below error: Script: C:\Test.vbs Line: 1 Char: http://dan.hersam.com/2012/07/09/vbscript-invalid-character-error/ 1 Error: Invalid character Code: 800A0408 Source: Microsoft VBScript compilation error Fix/Solution: This issue was occurs due to the Encoding method UTF-8 which I used to save the .vbs file. We should use the Encoding method ANSI to save .vbs file. Follow the below steps to fix this issue: microsoft vbscript 1. Open the vbscript file in Notepad 2. Go to File and click "Save as" 3. Under the file name, you will see a drop down menu for Encoding. Choose ANSI. 4. Save the file. loading.. Advertisements Advertisements Posted by Morgan at 06:22 Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: VBScript No comments: Post microsoft vbscript compilation a Comment Newer Post Older Post Home Subscribe to: Post Comments (Atom) Recent Posts Oops! Make sure JavaScript is enabled in your browser. Keywords Account Lockout Analyzer Active Directory Active Directory Report AD Attribute AD Audit AD Management AD Permission ASP.NET ASPX Audit Policy Azure AD BIOS C# Command Prompt Cryptographic CSOM CSS CSV Database Desktop Development DNS Endpoint Secutiy Event ID Exchange Online Exchange Server File Access Auditing File System FIPS Compliance Firewall GPO Graph API Html HTTP Error IIS Indexing IP Address JavaScript JQuery LAN Ldap LDAP Filters Logon Audit Logon Type Mailbox Message Tracking MMC MS Access Name Resolution Network Network Shares News NTFS NTFS Persmission Nuget ODBC Office 2016 Office 365 Office 365 Groups Office 365 License Office Dev PnP OLEDB Outlook Package Manager Password Policy PC Powershell Powershell Remoting Powershell Tips Proxy Registry Remote Administration Remote Desktop (RDP) Schedule Task Security Server Server Manager Services SharePoint SharePoint 2013 SharePoint Online Shortcut SQL Database SQL Server SQLQuery SSMS System Administration Task Scheduler TCP TFS User Logon VBScript Visual Studio WEB SERVER WebService WIn32_API Windows Form Windows Service WMI Workflow Xml XQuery Archiv
character Code: 800A0408 Source: Microsoft VBScript compilation errorOr with Cscript: (1, 1) Microsoft VBScript compilation error: Invalid characterRelated PostsHow to Fix a Delay When Opening Files in Microsoft OfficeGoogle Fonts Hurting PageSpeed Score?Easily Create Windows ShortcutsPHP Truncating POST Datanf_conntrack: table full, dropping packetThe Imminent Demise of Windows XP Comments (1)Computers - ProgrammingComments (Post a comment) | Comments RSS feedSETTING IT TO ANSI DOESNT WORK PLZ HALPPP! Comment by FnafWorldFan123 on January 23, 2016 @ 1:50 pmPost a commentName: (required) E-mail: (required) (will never be visible) URL: (optional) Your comments: - home my projects news links other links about me blog archives docs entertainment experiences funny lists humor intellectual interests music opinions photos web designs tools software webmaster helpBecome a Patron Support this siteMost Popular Pages Riddles Brain teasers Trivia Pickup lines Not bright one linersSign upGet an email when I post or subscribe to the newsfeed Search blog archives CalendarJuly 2012SMTWTFS« JunAug »12345678910111213141516171819202122232425262728293031Random quoteLosing your drivers' license is just God's way of saying "BOOGA, BOOGA!" (See all the quotes) Guest map Say hi on Google+Page loaded in 0.0148 seconds