wscript

What does the two parameters mean for WScript here?

$WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run($cmd, 0, false); I don't seem to find the document for this... EDIT Does it need some settings to enable it?I found the above script is not working whether setting the second parameter to true or false ...

Script to download file and rename according to date on Windows Vista machine?

Hi, I need to daily run a script that will download a file from a fixed location and save it on my computer with an appropriate filename-YYYYMMDD-HHSS.ext timestamp. I need a historical record of what that file was at that particular time. I can manually check and see what the changes were, so compairson not needed. (I was looking for ...

how to get result from wscript.execute() I need piping

Hi , I want to get result from an executing command by the help of wscript say : wscript.execute("dir c:\") I need to know how can I access to the results of this or in other words I want to know how can I pipe the result into my script? regards. ...

wscript.shell running file with space in path with PHP

I was trying to use wscript.shell through COM objects with php to pass some cmd commands to cURL library (the DOS version). here is what I use to perform this task: function windExec($cmd,$mode=''){ // Setup the command to run from "run" $cmdline = "cmd /C $cmd"; // set-up the output and mode if ($mode=='FG'){ $...

File permissions with FileSystemObject - CScript.exe says one thing, Classic ASP says another...

I have a classic ASP page - written in JScript - that's using Scripting.FileSystemObject to save files to a network share - and it's not working. ("Permission denied") The ASP page is running under IIS using Windows authentication, with impersonation enabled. If I run the following block of code locally via CScript.exe: var objNet = n...

Script for run script

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 = CreateObject("Scripting.FileSystemObject") Set windir = objFSO.get...

Write to file using CopyHere without using WScript.Sleep

Hi guys, I've written a small VBScript to creates a .zip file and then copies the contents of a specified folder into that .zip file. I copy the files over one by one for a reason (I know I can do the whole lot at once). However my problem is when I try to copy them one by one without a WScript.Sleep between each loop iteration I get a...

Accessing curl executable from Program files?

I have built an application which uses user executable through WScript com object. Now the main program is located in C:\Program files\Myapp Curl executable is located in C:\Curl But it looks like my application is unable to execute curl if main application is in Program files. If i move it to another location it can execute curl nicely....

How to show a popup without a browser

I need an "alert" type feature to troubleshoot an error. I am not using a browser and using javascript as windows administaration purposes. So is their a way to view a varibales value if I am not using a browser? ...

Unable to reference UNC paths while using wscript.shell from an ASP script?

I'm having a problem executing a command from a command line through an ASP script using the wscript.shell object. Here is my code: inPath = server.mappath("/connect/dev_f_fusion3/video/6EA63679C27E48538D79F7C7295201CF/6EA63679C27E48538D79F7C7295201CF.mov") outPath = server.mappath("/connect/dev_f_fusion3/video/6EA63679C27E48538D79F7C7...

How To Stop Wscript Exe

I want to shutdown QTP which is invoked through Wscript.exe. Please suggest . Thanks in advance ...

WScript.Shell Run always on top option

Hi, I would like to execute WScript.Shell command using Run and set it to be always on top. As far I figured out how to make Popup always on top. import win32api, win32com.client shell = win32com.client.Dispatch('WScript.Shell') shell.Popup('Message', 0, 'Title', 4096) win32api.Sleep(100) Is there a way to do the same thing with Run...

Wscript.Shell Run doesn't work consistently

I'm trying to run the following bit of code in vb6 dll: Dim objWSShell As Object Set objWSShell = CreateObject("Wscript.Shell") objWSShell.Run strPath & "test.bat", 0, True The dll process gets hung up. The batch file will not run, no matter what its contents. I even tried an empty batch file and it still hung up. However, if I try...

How to debug Python inside a WSC

Hi All, We're programming classic ASP for a big (legacy) web application. This works quite well using WSC (Windows script components) to separate GUI from business logic; the WSCs contain the business logic, classic asp is used for displaying returned information. The WSC's return stringvalues, ADO recordsets and in some cases vbscript...

wscript.exe silently dies with no messages in event log for com object that uses rfc

I have com object written in c# that relies on c++ library that has rfc calls inside. Com object exposes single method (let it be DoSomeRfcStuff) that returns string. It's implementation is wrapped by try/catch block: string DoSomeRfcStuff() { try { .. Do Some Rfc calls ... } catch(Exception ex) { return ex.ToString(); }...