I need to write a VBScript script to check the state of a dial-up connection, perform the dial up if disconnected, hang up the connection etc. I know this can be done using RAS API functions, so I'm wondering if there's any way to call these functions from VBScript? If not, how else can I manage dial-up connections using VBScript? Can so...
Try running this in a .VBS file
MsgBox(545.14-544.94)
You get a neat little answer of 0.199999999999932!
This rounding issue also occurs unfortunately in Sin(2 * pi) since VB can only ever see the (user defined) variable pi as accurate as 3.14159265358979.
Is rounding it manually (and loosing accuracy) the only way to improve the re...
i am using vbscript to call a batch file. my script looks like:
dim shell
set shell=createobject("wscript.shell")
shell.run "a.bat"
set shell=nothing
my batch file is simple and looks like:
D:
cd D:\d
winzip32.exe -min -a D:\a
i want to pass a variable from a script to the batch file. lets say the destination f...
can i integrate asp and aspx pages wchich are not concerned with session so there wont be any session related issues but are there some other issues? i am not getting how to call c# function from my asp page
...
Does anyone have a macro that copy data from one sheet to another based on the current date?
I am working with a single workbook of three sheets. Sheet one will hold the manual input of daily production figures for multiple plants, sheet two is to hold ongoing daily data, keyed on sheet one. The macro will be associated with a button,...
Hi, guys.
Here's a sample code, that opens an internet explorer window, navigates to google, and gets some element on the page by its unique id:
set ie = CreateObject("InternetExplorer.Application")
ie.navigate("www.google.com")
ie.visible = true
while ie.readystate <> 4
wscript.sleep 100
WEnd
set some_object = ie.document.gete...
i use following code to call a batch file:
dim shell
set shell=createobject("wscript.shell")
shell.run "a.bat D:\a"
set shell=nothing
how do i call more than 1 batch files, so that when 1st file's execution is over, the 2nd file is executed.
as always, i really appreciate any help offered.
...
i want to call a batch file from another batch file and also want to pass a variable to it. lets say i want to call b.bat from a.bat. my b.bat copies files. so while calling it from a.bat , i want to pass the path of the destination folder to b.bat.
well to b more clear, the destination path will b entered by user, so it will b stored in...
i want to pass a variable from vbscript to batch file.
i used :shell.run "c.bat D:\d"
and in c.bat recieved it as %1
i.e xcopy %1 D:\o\ /E
it works fine. but actually the path is to be entered by user. so it is saved in a variable say x. how do i pass this variable to the batch file?
...
Hi all,
I have my users DOB as a string (don't ask), how can I reliably check to see if they are over 18? Would I use DateDiff? How would I convert the string to a date first? The date is in dd/mm/yyyy format.
Many thanks
Jonathan
...
i have created a C# dll file on my machine as shown below:
namespace myDLL
{
public class myClass
{
public string myFunction()
{
return "I am Here";
}
}
}
then i created a tlb file with "tlbexp" command,
then i used the "regasm" command n registered this dll on my machine.
When i created an ...
I am executing the following routine often in order to clear the local cache of many Outlook clients (Outlook 2003) in order to fix corrupted Forms stored on the users local drive.
On the Tools menu, click Options, and then click the Other tab.
Click Advanced Options.
In the Advanced Options box, click Custom Forms.
In the Custom Fo...
I have been working an ADO VBScript that needs to accept parameters and incorporate those parameters in the Query string that gets passed the the database. I keep getting errors when the Record Set Object attempts to open. If I pass a query without parameters, the recordset opens and I can work with the data. When I run the script throug...
its kind of silly question. but i dont know what mistake i am making. if any one could help.
<html>
<head>
<script type="text /vbscript">
function zips(s)
document.write(s)
end function
</script>
</head>
<body>
<script type="text/vbscript">
dim x,y
x="sushant"
<button onclick="zips(x)" id=button1 name=butt...
I have two computer
PC1 and PC2
In PC1 I have a .Net C# dll file that provides operations on SQL Server database.
My question is - "how can I use this dll file on PC2 through VBScript within Outlook 2003".
I tried this same task on PC1 and I succeeded using the CreateObject("dllfilename.classname") method of VBScript within outlook 20...
Hi, guys. Here's another sample script in VBScript. It opens internet explorer, navigates to google, sets up a search field and submits a query.
set ie = CreateObject("InternetExplorer.Application")
ie.navigate("www.google.com")
ie.visible = true
while ie.readystate <> 4
wscript.sleep 100
WEnd
set fields = ie.document.getelemen...
Hi, how can I remove specific rows and columns from an excel file using only classic ASP? For example, given the excel file
col1 col2 col3
one two three
four five six
I want to be able to programmatically delete the first row and second column to produce
one three
four six
Thanks!
...
Does anyone have an example that parses out the information from a LinkedIn profile using VB Script? I have a database which contains client information and I have been including the client Key for LinkedIn in hopes to have it automatically update some or possibly all of the information for that client.
Sincerely,
Christopher J. Schäre...
Hi,
I have an ASP site(not asp.net, old asp) which executes some lines on the server-side.
I want to run an exe in the server side code, but i'm not familiar with asp programming - the site I got was already built, i just need to add this little code and that's all.
I think the ASP code is in VB as it's very familiar to VB and has the s...
dim shell,x,y
x="D:\d"
y="c.bat " & x
set shell=createobject("wscript.shell")
shell.run y
shell.run "a.bat"
set shell=nothing
when i run this script, it runs both batch files simultaneously. what i need is that it should run the first batch file(c.bat) and after it is completely executed, it should execute other(a.bat)
what i need wor...