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.
1
vote
2answers
293 views
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 ...
0
votes
1answer
2k views
How can you enable forms scripting for outlook 2010 on Citrix servers?
I'd like to deploy Office 2010 on Citrix servers, but i can't enable form scripting support.
With outlook 2007, it was solved by adding Outlvbs.dll in the office directory, and running
msiexec /i ...
1
vote
2answers
323 views
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 ...
2
votes
2answers
307 views
printer assignments for windows xp workstations within an active directory environment
I'm using the following script to handle removing any old networked printers from machines and then assigning the propper ones and making one of them the default. This script is assigned to the OU ...
1
vote
1answer
653 views
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, ...
2
votes
1answer
2k views
Remote installing an msi on citrix servers using WMI
OK, I'm a C# programmer that is trying to streamline the deployment of a custom windows form app I inherited and built an installer for with WiX (this app will need to be reinstalled regularly as I'm ...
1
vote
2answers
5k views
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 ...
1
vote
1answer
478 views
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
...
1
vote
2answers
4k views
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.
2
votes
2answers
5k views
How can I edit local security policy from a batch file?
I am trying to write a utility as a batch file that, among other things, adds a user to the "Deny logon locally" local security policy. This batch file will be used on hundreds of independent ...
1
vote
1answer
840 views
.VBS scripts have stopped running… No idea why!
We have two .vbs scripts that are run by our Task Scheduler that have suddenly stopped working for no reason we can fathom. We haven't significantly altered our system configuration in the last 24 ...
4
votes
3answers
11k views
Retrieve user details from Active Directory using SID
How can I find a user in my AD when I have his/her SID.
I don't want to rely on other attributes, since I am trying to detect changes to these.
Example:
I get a message about a change to user record ...
0
votes
1answer
2k views
Script to wrap around an application and wait for app to finish
I need a vb script that will wrap around an applcation which will stay open until the application finishes.
I want to be able to call the following command
"setup.exe /qb /I Autocad2010.ini ...
3
votes
5answers
5k views
Get user profile size in vbscript
I am trying to get the size of a user's local profile using VBScript. I know the directory of the profile (typically "C:\Users\blah").
The following code does not work for most profiles (Permission ...
0
votes
1answer
1k views
Change/Force CMD properties like Window size & Screen Buffer size via GPO, or other ways
Is it possible to control CMD properties like Window size & Screen Buffer size via GPO? (or a VBS script that can be pushed using GPO :)
I have Windows 7 / Windows Server 2008.
Many thanks for ...
0
votes
1answer
751 views
How to programmatically query the default user's proxy auto-config URL setting?
Greetings. I have a requirement to retrieve the default user's Internet Explore Proxy Auto Config URL setting from Windows Server 2008.
For the current user, the key is found at ...
3
votes
1answer
8k views
How do I get a list of websites from iis showing the host header value, description and home folder location?
I am using iis win2k3. How do I go about extracting an adhoc list of websites, displaying the host header value, description and web folder location?
The export list only shows the header and ...
5
votes
5answers
2k views
Script to kill process at logoff doesn't execute until process is dead?
We have a program that, due to memory leaks in some of the screens, doesn't exit cleanly when the user quits. The problem is that this blocks the normal logoff procedure - you select logout and a few ...
3
votes
3answers
11k views
Windows Server 2008 R2 VBScript script engine missing
On Win2008R2 x64 I get
Input Error: There is no script engine for file extension ".vbs".
when starting a .vbs file.
5
votes
5answers
29k views
Why won't my logon scripts map drives under Windows 7?
Why won't my logon scripts map drives under Windows 7?
I'm using a vb script similar to the one below, the script runs using a group policy.
Dim WshNetwork
Set WshNetwork = ...
1
vote
6answers
256 views
Standardising on a single Windows Scripting Language
I wasn't quite sure whether this would be better on StackOverflow or not, feel free to move it if you think it's more appropriate there.
Anyway on to the question...
The Situation
We currently ...
0
votes
3answers
932 views
script to change drive mapping
I plan on retiring an old file server. I noticed some of my users have mapped about 10-15 "Mapped Network Drive" to this server. Is there a script I can use to change the server name in the ...
0
votes
2answers
1k views
cmd files to hta
I have a lot of cmd files i use daily for example to add users to local groups, installing printers, run as admin tasks etc.
I like to take the scripts i use most frequently and add them to a tabbed ...
1
vote
3answers
21k views
Script to list current user's mapped network drives
I have a Windows XP/ Server 2003 environment here users have mapped different network drives themselves using arbitrary drive letters. Some of these users do not know how to tell the true UNC path of ...
0
votes
2answers
683 views
Check for the presence of a printer connection (unreliable printer mappings)
I have a lab area with about 75 XP boxes in it. At logon, we map two served printers with the AddWindowsPrinterConnection method in a VBS. 5-10% of the time, the users find that the printers have ...
2
votes
1answer
2k views
Registry read permissions (scripting) on Windows Server 2003
Executing the following VBScript on our Windows Server 2003
Set p_shell = CreateObject("WScript.Shell")
p_shell.RegRead("HKEY_USERS\S-1-5-19\")
yields the following error
C:\Documents and ...
0
votes
5answers
2k views
WS2008 subst in Logon script does not “stick”
I have a terminal server environment exclusively with Windows Server 2008.
My problem is that I need to "map" a drive letter to each users Temp folder. This is due to a legacy app that requries a ...
1
vote
1answer
307 views
Connect certain file to automatically launch through a VBS/ WScript
On Windows Vista, I would like to open all files of a certain extension with a little VBS file (which will then pass on the parameter to a Chrome Application Shortcut app, which is actually what I ...
0
votes
2answers
646 views
VBScript that wait for DHCP answers before execution
I am writing some script that automatically executes during startup of computer (XP), the script is actually mapping a network drive to windows. The problem I have is that the DHCP in the network is ...
1
vote
1answer
234 views
Building .htm email signatures with PHP or script and Active Directory
We use HTML signatures which are based off a template which gets changed from time to time.
At the moment i have to open all the html files stored on the server into dreamweaver or similar, make the ...
0
votes
1answer
857 views
Calling an ASP function from an external ASP file
For some reason, I can include an ASP file with the following code:
<!--# include virtual="/includes/func.asp" -->
But, I have some functions in that file, and I can't call them into my main ...
1
vote
2answers
2k views
How can I get the name of a windows .bat script from within the script itself?
I have a .bat file. I want to programmatically get the name of the .bat file. How can I do this?
This is my end goal
"..\lib\nant\nant.exe" -buildfile:nant.build {{pass in name of this file here}}
...
4
votes
5answers
240 views
Please help me add to this script to get server hardware info
(If this should be on stackoverflow just tell me...but it seemed more fitting here)
I found the script below online from this site: http://forums.webhostautomation.com/showthread.php?t=8667
Can ...
1
vote
8answers
918 views
how to visit every computer on the network and modify the hosts file in windows xp
We need to append a line to the hosts file for every user on our network. I have admin privileges, but don't know the first thing about windows scripting. Can someone point me in the right direction ...
0
votes
1answer
961 views
Networkmapping script (VBS) Vista doesn't work, XP does
I've got a weird problem, (like always :p )
Okay: Situation: Windows 2003 domain with XP clients. With a GPO I'm running a VBS script on login to map a few drives. This works great on XP, but not on ...
2
votes
2answers
4k views
logon.vbs script is not mapping network drives
I am new to creating a vbs script to map network drives in windows. For some reason, the script runs, but does not map any network drives when a user logs on to the domain. Here is the script I am ...
0
votes
1answer
92 views
Transfer files without destination access
HI All,
I have a issue where I want to create a script (VB or Batch file) that when a user runs the script it will copy files from Folder1 to Folder2.
Here's the rub.
I don't want the users to have ...
0
votes
3answers
846 views
read an unknown directories name + copy to it
I would appreciate some help please.
I am trying to copy two files "test1.txt" and "test2.txt" into an unknown directory, e.g. into the directory
"%USERNAME%\Documents\test\04pql7hw.example"
The ...
1
vote
1answer
587 views
query 2003 dhcp leases
Can I query my windows 2003 dhcp server from my windows xp in order to get the ip address if i have the mac address or otherwise.
0
votes
2answers
4k views
script to disable windows firewall under Vista
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
objPolicy.FirewallEnabled = FALSE
This script does not work in Vista/2008 and Windows 7 ...
0
votes
2answers
9k views
Install Error: Could not access VBScript run time for custom action
I'm trying to install a package on a Windows 2008 server. The package is refusing to install. I have run the install with the following command line switched to get a log file:
/lxv InstallLog.txt
...
1
vote
5answers
2k views
Alternative to WScript.Sleep
I'm using WhatsUpGold to monitor the uptime of services and one of them is a MySql server. Since there's no explicit support for MySql, I'm forced to write a VBS script to do it. Unfortunately, ...
4
votes
4answers
14k views
Download file from vbscript?
I need a script that can be run on freshly installed windows xp+ and download specified files from internet, like http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi
Is it any easy way to do it ...
1
vote
3answers
1k views
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 ...
4
votes
9answers
2k views
What scripting language do you use for your logon scripts in your Windows enviroment?
I wonder what scripting languages is most used as logon scripts these days. Is people still hacking away in batch-file files or vbscripts, or do you use PowerShell or something completely different?
...
