473,654 Members | 3,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VBScript error

4 New Member
Hi

I am new to vbscripting... Just write this very simple vbscript file Its working perfectly if run from my local PC. If I run this same file from shared drive the script is not executing. Please some one can help to fix this issue.

Code
=====
<html>
<head>
<script language="vbscr ipt" type="text/vbscript">
dim str
dim opt
dim srcPath, mypath

<!-- Procedure to load Group List -->
Sub Window_Onload
ForReading = 1
i=0
set FSO = createObject("s cripting.filesy stemobject")
set Fldr =FSO. GetFolder("./")
srcPath = Fldr.Path & "\Tel"
mypath = srcpath


strNewFile = srcPath & "\Location. txt"
msgbox strNewFile
Set objFSO = CreateObject("S cripting.FileSy stemObject")
Set objFile = objFSO.OpenText File(strNewFile , ForReading)
Do Until objFile.AtEndOf Stream
strLine = objFile.ReadLin e
Set objOption = Document.create Element("OPTION ")
objOption.Text = strLine
objOption.Value = strLine
frm1.Location.A dd(objOption)
i=i+1
Loop
objFile.Close
End Sub

</script>
</head>
<body>
<form name="frm1">
<Center>
<body>
<SELECT NAME="Location" >
</form>

</body>
</html>
Apr 1 '08 #1
2 1114
Scripting
4 New Member
Hi Gurus,

Can some one help me on this please...
Apr 1 '08 #2
jg007
283 Contributor
Hi Gurus,

Can some one help me on this please...
what actually happens when you run the script from the shared drive?, also how are you mapped / accessing the shared drive?
Apr 1 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6819
by: John Davis | last post by:
When I create new documents in Dreamweaver, there are several choices for ASP creation: ASP JavaScript: run at client side?? ASP VBScript: run at server side?? ASP.NET C# ASP.NET VB I don't understand the differences between ASP JavaScript and ASP VBScript?? Because JavaScript is client-side technology, and ASP is server side technology. I think VBScript is used to implement ASP pages.
29
6009
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
16
9343
by: Mike Schinkel | last post by:
Does anyone know if there are bugs in VBScript's GetRef()? I'm using VBScript Version 5.6.8515 on Win2003Server w/ASP. Sometimes it returns an object that VarType() says is a vbObject. Other times it returns VarType() is vbEmpty. This is driving me mad! Also, does anyone know what the properties and methods are for the object returned by GetRef()? TIA.
1
396
by: Ana Rita | last post by:
Hello to all. I'm trying to do call a vbscript sub in one page aspx. My vbscript sub is in a file with the extension (vbs) and it looks like this: Sub Mens (strmens) Msgbox strmens
2
7910
by: Jessard | last post by:
Help! Hi, I'm having a bit (well a lot - it's getting annoying) of trouble using a C# class library within a VBScript on a computer other than the development machine. All the class is needed for at the moment is to create an ADODB.Connection object based on a passed in parameter. The passed in parameter is looked up in an XML document which then creates a connection string. It would then return the ADODB.Connection object. So for...
4
12670
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck Gatto Dan Guzman Apr 27 2000, 12:00 am show options
3
7026
by: Joe Caverly | last post by:
Hi, I'm using Visual C++ 32-bit Professional Edition 5.0 Using Microsoft Knowledge Base Article 181473 as a basis, I'm trying to transform this VB Code; Dim sc As Object Dim code As String Set sc = CreateObject("ScriptControl") sc.Language = "VBScript"
2
2881
by: Beemer Biker | last post by:
I put together a few lines of vbscript so I could dump the contents of a string to my C drive. It worked fine in a small test.htm where I put the vbscript at the top of the file. It failed to work (no error message) in my large program where I needed to dump out the stuff. I did get an error message from FrontPage 2003 but it was not informative. When moved the vbscript to the bottom of the page it worked fine! ========start of...
0
1882
by: thisis | last post by:
Hi All, I'm getting an error on my ASP page: Microsoft VBScript runtime error '800a000d' Type mismatch: 'StoreFileIntoField' I assume - 99.5% - the error is generated because of worng value types, I attemp to pass from my ASP/VBScript page to the VB/DLL function.
1
3458
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8294
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8709
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8494
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.