Tagged Questions
31
votes
7answers
39k views
Can Windows' built-in ZIP compression be scripted?
Is the ZIP compression that is built into Windows XP/Vista/2003/2008 able to be scripted at all? What executable would I have to call from a BAT/CMD file? or is it possible to do it with VBScript?
I ...
5
votes
3answers
3k views
Is it possible to embed and execute VBScript within a batch file without using a temporary file?
People have been embedding and executing VBScript within batch files for a long time. But all the published solutions involve writing a temporary VBS file. For example: Embed VBScript inside Windows ...
8
votes
12answers
32k views
What's the environment variable for the path to the desktop?
I'm writing a Windows batch file and want to copy something to the desktop. I think I can use this:
%UserProfile%\Desktop\
However, I'm thinking, that's probably only going to work on an ...
2
votes
5answers
4k views
capture any error in VBScript?
I have a batch file that calls a VBScript (.vbs) program. After calling it, my batch script checks errorlevel to see if the .vbs program failed. I can signal failure with an exit code in the .vbs ...
5
votes
4answers
21k views
VBscript code to capture stdout, without showing console window
This is a VBScript code example that shows how to catch whatever a command line program sends to standard output.
It executes the command xcopy /? and shows the output in a message box. Before the ...
1
vote
1answer
125 views
Log read only at current date with error append to text file as output
I Have below text on remote computers (a list of 50 servers) saved in e:\logs\action.log
This action.log will contain the a Date & time and every time a action performed will be tracked and ...
0
votes
1answer
542 views
How do you pass parameters containing spaces in vbs
I have a batch script:
test.bat
echo first arg is %1
pause
That I want to invoke from a vbscript with admin rights like so:
test.vbs
Set UAC = CreateObject("Shell.Application")
UAC.ShellExecute ...
0
votes
4answers
3k views
vbscript how to sort files in subfolders by modified date (and print it with the absolute path of file)
I need to create a vbs to sort a seteable number of files (only the files) by the modified date in a folder with subfolders, and print the file with the absolute path, like this:
The vbs:
Dim MAX
...
0
votes
1answer
547 views
Batch File or vbscript that completes multiple tasks
I am looking to do some automating on some imports. I am looking for a way to call multiple scripts to run from either one batch file or vbscript. what I am trying to do is the following: ...
3
votes
3answers
6k views
How can I detect the drive letter of a booted USB drive from script?
I'm launching WinPE 2 from a bootable UFD, and I need to detect the drive letter in order to tell ImageX where to find the WIM. However, depending on the machine I'm imaging, there are different ...
2
votes
1answer
6k views
Embed VBScript inside Windows batch file
Is it possible to embed VBScript within a batch file?
I currently have a .CMD file that calls a .VBS file using
cscript //NoLogo MyScript.vbs
but I'd prefer to distribute just a single .CMD file.
1
vote
1answer
359 views
corresponding commands from batch file to vbsript
I trying to go from cmd script to vbscript in MS window xp
cmd code yes works
set home_=%~dp0
set part001=part001
set part002=part002
set part003=part003
set part004=part004
::get the dir in ...
3
votes
1answer
232 views
Batch parsing to VBscript
I have a VBScript copied from the link http://www.robvanderwoude.com/vbstech_ui_password.php
In the existing VBSscript I have added the code for the "Internet Explorer version" :
WS SCRIPT - named ...
2
votes
1answer
2k views
Automatic login to a website on windows 7/Chrome via batch file
I have a batch file. I have case select. if user types 26 it will open link 1 chrome.
if user types 27 it will open link 2 in chrome.
But I still can't figure out, how can I make batch login ...
2
votes
2answers
955 views
Merging Two Text Files into One CSV File
I'm working with a windows batch command to create a list of filepaths and filenames (without the ext) for processing and archival. I need to make a CSV file that will contain the path to the file and ...