windows-shell

vba shell java call errors

强颜欢笑 提交于 2019-12-11 10:25:49
问题 In an MS Access public function, I run a java xslt module using a shell call: Set shell = CreateObject("WScript.Shell") cmd = "java -jar D:\saxon9he.jar -s:D:\input.xml -xsl:D:\transf.xslt -o:D:\output.xml" Set objExecObject = shell.Exec(cmd) I caught the following error: As exactly the same worked fine in another MS Access instance, I assume I have to refer to an environment variable somewhere (one of these is JAVA_HOME which has been set to C:\Program Files\Java\jdk1.5.0_16\bin ). But where

task scheduler thinks python script is still running

微笑、不失礼 提交于 2019-12-11 06:27:01
问题 I have a python script which in turn executes other python scripts. I put this as a task on WinXP task scheduler. the thing runs - command prompt is opened, sparks are flying, magic happens... eventually the task is completed, I get a nice 'print script ended!!' and back to prompt. but Task Scheduler thinks the task is still running ! which in turn prevents it from running it again on daily basis. so I tried making a BAT file which just calls the script: script.py echo pyfinished to my

SHParseDisplayName when path doesn't exists

一个人想着一个人 提交于 2019-12-10 22:08:48
问题 I'm developing a replacement for IFileOpenDialog and IFileSaveDialog . I almost have it working (at least IFileOpenDialog ), but when I want to return the IShellItem that represents the new filename (that the user has choosen to save in the GetResult() method), I can't get SHParseDisplayName working with this new filename. I always receive an error "The system cannot find the file specified" . I will appreciate some examples or another solution maybe to my problem. Edit: HRESULT

Detect commandline application from CMD without messing with PATH variable or System32/SysWow64 dir

你离开我真会死。 提交于 2019-12-10 21:48:06
问题 Scenario I would like to install an x86 CommandLine application on a folder outside C:\Windows\System32 or C:\Windows\Syswow64 and still be able to access my app under CMD without adding my application's path inside the PATH environment variable. Question Is this possible to do? Maybe touching a needed registry keys? Note: I know how to add my application into PATH variable/regvalue or how to access my application from CMD putting the required .exe in the System32 / SysWow64 folder. This

show output from shell command run from Jscript

╄→гoц情女王★ 提交于 2019-12-10 21:28:51
问题 I want to run a shell command from jscript from IE on a Windows machine. I have the following jscript function: function execCommand( command ){ var myShell = new ActiveXObject("WScript.Shell"); myShell.Exec( "cmd /c " + command ); } Under Windows, a new prompt window opens, the command is executed, and the window closes. Nevertheless, the prompt never shows any of the output from the command. While the command is running there is a blank prompt window. How can I force the output of the

How to tell Windows Explorer to refresh its icons?

蹲街弑〆低调 提交于 2019-12-10 19:41:43
问题 Once my installer finishes installing new versions of my application's exe, I'd like to tell Explorer to use the new exe's icons for its shortcuts. However, I cannot figure out how to do this. From reading online, it looks like the problem is that the system image list is caching an old version of the icon. I tried calling SHChangeNotify with a SHCNE_UPDATEIMAGE parameter. I tried calling SHUpdateImage. I even tried the sledgehammer approach of broadcasting WM_SETTINGCHANGE . Nothing seems to

What is the longest file path allowed to be moved to Recycle Bin?

血红的双手。 提交于 2019-12-10 12:49:59
问题 For my application I'm testing the longest available file path to be allowed to be moved into the Recycle Bin and I'm getting interesting results. On Windows XP the maximum size is 259 characters, which is the MAX_PATH constant minus 1. But on my Windows 8.1 Pro, that maximum allowed file path size somehow seem to be 215 characters. So I'm curious are there any official guidelines for this? EDIT: OK, since posters below requested an API, I'm using SHFileOperation with FO_DELETE and FOF

How can I add a context menu for recycle bin

纵饮孤独 提交于 2019-12-10 12:03:38
问题 How can I manage to add a context menu for windows recycle bin? And how could I eventually access the files within? I know Recycle bin is a virtual folder and that it has a tree-like structure, do I have to go all the way to access the files within? edited: HKLM { NoRemove Software { NoRemove Classes { NoRemove CLSID { NoRemove {645FF040-5081-101B-9F08-00AA002F954E} { NoRemove shellex { NoRemove ContextMenuHandlers { ForceRemove {FC944A65-4422-4A2C-B867-1BA01318A944} } } } } } } } 回答1: Look

Trying to determine printer status always returns 0 for offline & online printers

前提是你 提交于 2019-12-10 08:14:06
问题 My goal is to determine the current status of a printer. I found the following code. Here's a slightly modified version to fix memory leaks & bugs: #include <Winspool.h> int GetPrinterStatus( char* szPrnName ) { HANDLE hHandle = 0; // Handle of the printer DWORD dwStatus = 0; // Printer status we should receive DWORD dwSize = 0; // Size of memory we should // allocate for PRINTER_INFO_2 PRINTER_INFO_2* pPrnInfo2 = 0; // Structure specifies detailed // printer information DEVMODE DevMode = {0}

Minimize/restore windows programmatically skipping the animation effect

偶尔善良 提交于 2019-12-10 03:41:39
问题 I need to perform several operations on a list of windows (minimize some of them, restore others) in order to switch between two or more set of windows at once. The problem with this are those animations you can see when minimizing and restoring a window. The whole process look terrible with all those animations going in and out, up and down. I cannot, however, disable those animations because this is for other computers and i dont want to change other people's settings, plus those animations