Questions tagged [vbscript]

An interpreted scripting language developed by Microsoft that is modeled on Visual Basic

VBScript (Visual Basic Scripting Edition) is an interpreted scripting language developed by Microsoft that is modelled on Visual Basic.

VBScript is commonly used for automating administrative and other tasks in Windows operating systems and for server-side scripting in classic ASP web applications. It is also used for client-side scripting in Internet Explorer, specifically in intranet web applications.

Resources

Related Tags

471 questions
2
votes
1 answer

VB script + get permission denied when copy file (on XP)

I have win XP , my target is to copy the file.dbf from local dir to c:\oracle directory ( by VB script described below) The problem is that I get permission denied (from the VB script output) Please advice how to enable copy to oracle directory? …
jon
  • 75
2
votes
1 answer

VBS script suddently won't execute

I'm running Windows 10, Version 10.0.19045 Build 19045 (22H2). This VBS script below used to work until today to change my Windows background to the Next Background but suddenly it will only popup the standard "Open... Properties" dialog along with…
mapper
  • 21
2
votes
2 answers

How to move file in vbscript

I am making a VBscript in an installer that can move a shortcut to the desktop. I have tried searching about some commands but they are too confusing. x = MsgBox("Would you like to create a desktop shortcut?", 0+4, "Sound Test") If x = VbYes Then …
alph
  • 85
2
votes
1 answer

Mac address of ethernet wired interface

I have a script that display some information IP, login name, and Mac addresses but it shows all mac addressess even bluetooth device. How to modify this script to list mac address of only ethernet wired interface, and display also it's name? Dim…
zuku
  • 21
2
votes
0 answers

Automate the deletion of all files in a directory from a list of Windows computers

I have hundreds of computers with space issues, and lately, I've just been PSExecing into each computer on this list, and performing a "del /s /q c:\DIRECTORY*" on each machine, which is just ridiculous. I found a VB script that queries a…
1
vote
0 answers

Start and Close a program in VBS

I am using this script to launch calculator program. How to add lines to close the calculator after 2 mins. Set colMonitoredEvents = GetObject("winmgmts:")._ ExecNotificationQuery("SELECT * FROM Win32_PowerManagementEvent") Do Set strLatestEvent =…
VB88
  • 393
1
vote
1 answer

How can i append the source folder name to the file copied to another location in vbs?

I have a folder "Documents" with a lot of subfolders. There are files under these subfolders. My objective is to move the files to one folder location then at some point be able to move them back to the subfolders they came from. My general idea is…
1
vote
0 answers

How to fill new tab form with vbscript on internet explorer?

I am using this vbscript to fill out a form: Option Explicit Dim objIE, ipf On Error Resume Next Const PAGE_LOADED = 4 Set objIE = CreateObject("InternetExplorer.Application") objIE.Navigate("https://www.1stdomain.com/") Sub WaitForLoad Do While…
1
vote
2 answers

Packaging a VBScript

I have written a simple VBScript that helps cancer patients manage their drug dosage (specifically Capecitabine - look it up if you don't believe me). Many of these patients are 'older generation' and they are not very computer savvy, beyond being…
user1081063
1
vote
0 answers

I wrote this VBS script to copy "Date Modified" from files in one folder to another but have one query

I wrote this VBS code to copy "Date Modified" from files in one folder to another folder. Dim sOriginFolder, sDestinationFolder, sFile, oFSO, oShell Set objShell = CreateObject("Shell.Application") Set objFolder =…
1
vote
1 answer

Trying to launch an app if connected to office VPN

I cannot get StrComp to work correctly and I'm not sure why. Can anyone see what I might be doing wrong here? (all ip numbers have been changed) Option Explicit Dim http : Set http = CreateObject( "MSXML2.ServerXmlHttp" ) Dim externalip http.Open…
1
vote
1 answer

How to copy file to user's appdata forlder using vbscript?

I am using following vbscript but it seems not working to copy file. If I use absolute file path it works. How to set these path in windows 7 to work. Const DestinationFile = "%UserProfile%\Desktop\plrplus.dotm" Const SourceFile =…
0
votes
1 answer

Script to save (pin) website to taskbar

I am frantically searching for some references which can help me out to save a shortcut to a webpage (say msn.com) to the taskbar. I Googled through last four days and only found references on how to save shorcuts to applications (notepad.exe or…
0
votes
1 answer

VBscript subroutines and functions

I am trying to make my first vbscript, but it is a bit complicated. I know some VBA but totally new to vb. In my script, I currently have some sub () and function () routines. How would I get the script to start, so the main sub () can run and…
Glib
  • 11
0
votes
1 answer

Script works fine as .wsh, goes berzerk in HTA

I have some code that sends keys to Telnet to manipulate an IR transmitter of mine. The script works fine as a stand-alone WSH script, but as soon as I try to put it in a Sub inside an HTA it goes BERZERK. Instead of sending my keys to the first…
jake
  • 1
1
2 3