wsh

“Unspecified Error” 80004005 when creating new Access database, only on another workstation

假装没事ソ 提交于 2019-12-12 04:38:33
问题 What I have is a JScript file that gets called by cscript , and this script is a proof-of-concept that creates a new Access 2007 format database, imports a set of VBA modules into the database, and then runs a subroutine from the imported modules. This script works flawlessly on my own computer. I have Office 2013 installed. However, I brought this script over to a coworker's machine and had him attempt running it. On his machine, we get an error that looked something like, createdb.js (22, 1

Fastest way to recursively clean HTML files on a partition?

﹥>﹥吖頭↗ 提交于 2019-12-12 04:06:50
问题 script for cleaning HTML files i.e. delete everything after </HTML> tag (without quotes), for all files recursively in a partition. This would be like recovering Web server content after Virus infects/injects code in multiple HTML files 回答1: You've tagged this question "vbscript" and "wscript" which I have no idea about, but if you have access to a unix or linux system, you might be able to use this command line: find /path/to/root -exec grep -qi '</html>' -exec sed -ne -i'' 's|</html>.*|<

Unable to run while loop related to regular expressions in vbscript running through Windows based script host

旧时模样 提交于 2019-12-12 03:14:18
问题 I am attempting to learn regex syntax in VBScript by running CurrencyEx.vbs from the following link: https://msdn.microsoft.com/en-us/library/ms974570.aspx However, the code runs into a compilation error 'Expected identifier' at line 10, character 13, Code: 800A03F2. do while re. Any suggestions to run a 'while' loop for a regex object would be helpful. 回答1: Spurious line break: do while re.Test(inputstr) <> true Added: The last ) in the pattern \s*((\$\s?)|(£\s?))?((\d+(\.(\d\d)?)?)|(\.\d\d)

launch an application from browser with parameters (cross browser)

Deadly 提交于 2019-12-12 00:54:25
问题 I am trying to launch an application from a webpage with parameters. Activex shown below works only at IE. MyObject = new ActiveXObject( "WScript.Shell" ); MyObject.Run('"C:\\Program Files\\application.exe" -guiparm=".." -system=..-client=..-user=.. -pw=..'); ` Is there any other way to do that cross browser? Thank you very much for your help 回答1: You can use the following: <a href="c:\windows\Notepad.exe" type="application/octet-stream">Launch Notepad</a> From what I remember using file://

WshShell.RegRead fails when reading key with default value not set (WinXP only)

会有一股神秘感。 提交于 2019-12-11 19:29:34
问题 I'm working with Windows Script Hosting (JScript). And my primary goal is to know if registry key exist. I'm trying to 'RegRead' this key and if it throws an error then key does not exist (that's how documentation says http://msdn.microsoft.com/en-us/library/x05fawxd(v=vs.84).aspx). Everything works fine in Win7, but when I test my code in WinXP it fails. The problem is that when you try to 'RegRead' key that has no default value set it will throw an error (only on WinXP, on Win7 it is ok).

Checking and opening different browsers using wsh script

陌路散爱 提交于 2019-12-11 16:27:49
问题 hey guys i know this may sound stupid, but i am stuck with this question in my head...im really new to this wscript or vbscripting....at the time of writing i figured out how to open IE using wscript...heres the code Set WshShell = WScript.CreateObject("WScript.Shell") Return = WshShell.Run("iexplore.exe www.bbc.co.uk", 1) but i cant figure out how to check if firefox is installed, then open firefox, if chrome is installed, open chrome, and the same thing goes for all the browser types.....

IE8 causing FILE input entry to be blank via SendKeys

天大地大妈咪最大 提交于 2019-12-11 16:03:36
问题 Application : HTA (therefore IE) This is an application that uses SendKeys to populate a FILE input field. Issue : File is never uploaded. Description : An offscreen form (invisible to user) uploads a file to the server. The file input is entered via SendKeys (javascript). Appears to be isolated to when IE8 is installed. Does anyone know of what may be causing this and any workarounds? Sorry for lack of information. I will edit the question with additional information if no answers are

waf -how to add external library to wscript_build file

随声附和 提交于 2019-12-11 15:32:48
问题 I tried to add an external library to my waf: the winmm.lib library it looks like this now: srcs = ['timers.cpp'] LIBS ='winmm.lib'; create_lib('timers', srcs,LIBS) it doesn't work. It says I vmp library 'winmm.lib.py' was not found in the current library. can someone help? 回答1: I have never heard of "create_lib" in waf, so I have no idea what that function is or does, but I'll try to answer your question anyway. Below I have a very basic wscript that is my typical way of setting up a simple

execute caspol from within vbscript

我与影子孤独终老i 提交于 2019-12-11 15:26:33
问题 I'd like to call caspol from within a script inside a custom action in an msi (setup project). I'd prefer a standard msi to ClickOnce, because with a standard msi I can install drivers & associate filetypes with our application whereas with ClickOnce I can't. When I execute the caspol command from the command line it succeeds, but from within vbscript it always fails with the error "Fehler: Unbekannte Mitgliedschaftsbedingung - -url.." - which translates as "Error: Unknown membership

How to use Wscript Exec to run a Java file

感情迁移 提交于 2019-12-11 15:10:04
问题 As the description of Wscript:String value indicating the command line used to run the script: The command line should appear exactly as it would if you typed it at the command prompt. I can run my java file using the command "java test http://www.bbc.co.uk/news/world-us-canada-12116778 " but it is not working when I wrote the JavaScript below. Can someone can tell me why? Thank you or can tell me there is some other method to call my Java file when I open a html file? <script type="text