Questions tagged [vbscript]

VBScript is a general-purpose scripting language developed by Microsoft that is modeled on Visual Basic. It is commonly used for Windows system administration. Some applications may use it as an internal scripting language allowing application automation.

217 questions
1
vote
3 answers

PC won't run VB script, error VBScript runtime error ID 800A046

I have a few workstations that can't run a network script for mapping network drives etc. I know the script works as it's working for everyone else. But on 1 or 2 machines (out of 1000) the script won't run at all. I get an error "VBScript runtime…
stead1984
  • 577
  • 8
  • 16
  • 32
1
vote
3 answers

Install software on a remote machine?

I posted this question to SO, but I'm really not sure whether it should go SO or ServerFault, so I'm posting it here too. Here's the question: Hey SO Gus, This might seem like a dump question, but my complete ignorance with VbScript is giving me…
Galilyou
  • 135
  • 1
  • 3
  • 7
1
vote
0 answers

Constant permission denied error on VBS script

The file is created and copied to the network share but I need this to run without errors as I need to push out to users quietly. Permissions have been set to full everyone. No errors when copy to local drive. 'Define variables, constants and…
user75236
  • 11
  • 3
1
vote
2 answers

Reboot Exchange Server with One time use account or script

Not sure if this is the best way to achieve this but here is the background and the goal. BACKGROUND We are a small business. Sometimes myself or the other person who is capable of dealing with an email outage is not available.... Usually it is as…
Campo
  • 1,609
  • 17
  • 33
1
vote
2 answers

Getting Win32_Service security descriptor using VBScript

I am using VbScript for retrieving the securitydescriptor of a Win32_Service. I am using the following code: SE_DACL_PRESENT = &h4 ACCESS_ALLOWED_ACE_TYPE = &h0 ACCESS_DENIED_ACE_TYPE = &h1 strComputer = "." Set objWMIService =…
invictus
  • 135
  • 1
  • 10
1
vote
2 answers

What might cause https failure when not specifying SSL protocol?

I have a VBScript program that retrieves a web page from a server not under my control. The URL looks something like https://someserver.xxx/index.html. I use this code to create the object that does the page getting: Set objWinHttp =…
user35042
  • 2,681
  • 12
  • 34
  • 60
1
vote
3 answers

running vbscript with psexec?

Is it possible to run a vbscript remotely with psexec? Normally the field of psexec calls for an exe file, so can this be changed or manipulated to deal with a vbs file?
Ben
  • 33
  • 1
  • 2
  • 9
1
vote
2 answers

How to Create a Network Share using vbscript

I want to create a network share using vbScript. Is there a way of doing this other than executing a "net share" command? e.g. Set shell = CreateObject("WScript.Shell") shell.Run "net share sc1=" & sShare , 1, false
seanyboy
  • 308
  • 4
  • 17
1
vote
1 answer

How to query SCCM for all collections that a user is a member of?

We will shortly be moving all our user accounts to a new domain, as part of this the user accounts will pick up new SMS ResourceIDs in SCCM. What I need to do is to query SCCM for all collections that a user is a member of, so that I can duplicate…
GAThrawn
  • 2,434
  • 3
  • 20
  • 38
1
vote
2 answers

Script to check hostname and move to appropriate OU

Is it possible to create a "universal" script that checks the first three alphabets of a hostname and moves the host into the appropriate OU? E.g. A hostname that begins with TKYxxxxx is a host in Tokyo and when the script detects TKY, it would move…
molecule
  • 83
  • 1
  • 4
  • 12
1
vote
2 answers

Adding lines to text files through Group Policy

I need to add two lines to text files using group policy. I cannot replace the files with the updated one since the content of the files differs from one machine to another, but all of them have to be updated with the two new lines. Is it possible…
Abdullah
1
vote
1 answer

Enumerating and mapping network drives (Windows 7 Pro/Windows Server 2003)

I had a working script for Windows XP clients, distributed via group policy from Windows Server 2003 PDC. This is the main part of the script: Function ggMapNetworkDrive(fDriveLetter, fShareName, fDrives, fWSHNet) 'Map a network drive Dim…
Unreason
  • 1,146
  • 1
  • 8
  • 22
1
vote
2 answers

Task Scheduler not able to execute .vbs scripts successfully

Apologies if this has a really obvious answer! We have several daily tasks we run via a .vbs script on our server (through the Task Scheduler), and for months it has been fine, but recently we've hit a problem. The .vbs scripts stopped successfully…
Django Reinhardt
  • 2,286
  • 3
  • 38
  • 58
1
vote
1 answer

Script for run script on vbs

Hello everybody I have a script on vbscript Dim WSHShell, WinDir, Value, wshProcEnv, fso, Spath Set WSHShell = CreateObject("WScript.Shell") Dim objFSO, objFileCopy Dim strFilePath, strDestination Const OverwriteExisting = True Set objFSO =…
1
vote
2 answers

to get the list of hostname, IP address, subnet mask

want to write a Vb Script to get the full information on all the host name, and ip address and sub net mask of computer that has been added to the domain control.
jason
  • 43
  • 1
  • 1
  • 5