windows

Generate Windows .lnk file with PHP

Hello, I'm working on a project which involves an FTP server running ProFTPd and a PHP/MySQL backend that creates accounts for users. Upon the creation of accounts, users are sent e-mails with their account details and instructions for downloading FileZilla or CyberDuck, depending on their OS, detected via user-agent string. To make t...

Batch number variable setter.

I need help with this batch file I'm working on, Basically everytime it does a task it should plus the variable %number% by one which works fine and all and then repeat over again doing a different task until its completed. This is the code which it uses to repeat I need a way of settings basically: set svn=%svn%%number% set svnlink=...

CACLS Confusion

During my NSIS setup script for a WinForms app, I use the following CACLS command to give the Users group full rights to a subfolder: Exec 'CACLS "$INSTDIR\SubFolder" /E /T /C /G "Users":F' So in effect the CACLS command executed is something like: CACLS "c:\Program Files\MyApp\SubFolder" /E /T /C /G "Users":F When I then look at t...

How do I make a python window always be on bottom?

How do I make a python window always be on bottom? ...

Is it possible to capture a "file not found" from another process and then return a file to that process?

I have a legacy application that looks for files in a directory. It does not handle missing files very well. What I want to do is "capture" the file not found errors, and send another file back to the calling app instead. Similar to how you could handle a 404 error on a webserver and return something based on what the requested URL was...

How do I obtain a code point integer from a 1 to 4 byte UTF-8 encoded sequence in Windows?

Hello, I am Patrick Niedzielski, a programmer for the Free Software 3D adventure game Humm and Strumm. I'm working on a minimal Unicode character class in C++. I currently have an array of four bytes representing a UTF-8 sequence. On GNU/Linux, I can just convert to UTF-32 with iconv(), but on Windows, I cannot do this. Is it possib...

Shut off windows sound using ASP.NET

Hey, How can I shut off the windows sound from an ASP.NET page. Thanks. ...

How do I have my apps dialog box pop up and take focus from the current running app?

I know this type of thing is looked negatively upon but I write software for people with disabilities and sometimes good gui practices don't make sense. In this case, the user interacts with a assistive interface and under certain conditions, my control app needs to prompt the user with a question. My background process creates a dialog ...

ensure 2 arguments are passed in a bat file

How do i ensure 2 arguments are passed in a bat file? I would like to echo a description of the arguments and exit the bat if there are not exactly 2 arguments. ...

PowerShell script to get network card speed of a Windows Computer

What is the PowerShell script to get the speed a specific Windows machine's network card is running at? I know this can be done with a WMI query based statement and will post an answer once I work it out. ...

wssql always returning zero rows

I'm using the windows search 4.0 service (wssql) to find some files, it works fine on my computer but on our server which has two drives C: and D: always returns 0 rows when searching D: Also i'm not sure if it's related but cd d: goes back to c: in the command prompt. Edit: Ok it appears that it only returns zero rows when I specify ...

Avoiding display of Visual Studio Debugger when starting a new process from within java.exe

How can I, from within a java program on windows, prevent a debugger window being displayed if a program I invoke crashes, and how can I detect the fact that it has crashed? Background I have a problem with a java application running on Windows which is launching an unreliable third party program by way of ProcessBuilder.start(). Speci...

Find out Desktop-Location of a windows Sidebar-Gadget with Javascript

Hello everyone.. I'd like to figure out the location of my gadget via Javascript.... I was thinking about something like System.Gadget.Docked.Document.Location ... but this would show the current URL. What I want to do is: Calling a .exe, passing the current Location (X,Y) as a parameter to show it at the same location. Is there a way...

How to get the volume GUID

Dear all, I am using win32 api with C++. I would like to know how I can get the volume GUID using a "device path". My device looks like this: \\?\usb#vid_04f2&pid_0111#5&39fe81e&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed} Thanks. ...

How do I get the name of the parent folder in a command prompt?

I'm in a Windows Command Line and want the parent folder in a variable. Assuming current directory is "C:\foo\bar", how can I get the value "bar"? I'm expecting something like a "find last backslash in CD and that's it". And please, no powershell references; I want plain old Windows Command Line operations. ...

Portable way of counting milliseconds in C++ ?

Hi, Is there any portable (Windows & Linux) way of counting how many milliseconds elapsed between two calls ? Basically, I want to achieve the same functionnality than the StopWatch class of .NET. (for those who already used it) In a perfect world, I would have used boost::date_time but that's not an option here due to some silly rule...

How do I wait for a service/process to start before continuing a batch script?

I am writing a windows batch script to uninstall some software. However I need to wait after the uninstaller has finished for a service to be restarted before continuing with the next uninstall. I can make the script wait for the uninstaller to finsh using:- for /f "usebackq" %%M in ('tasklist /nh /fi "imagename eq %process_1%"') do...

C or C++: how do loaders/wrappers work?

Here's an example of what I mean... User runs LOADER.EXE program LOADER.EXE downloads another EXE but keeps it all in memory without saving it to disk Runs the downloaded EXE just as it would if it were executed from disk, but does it straight from memory I've seen a few applications like this, and I've never seen an example or an ex...

How to determine registry access of a user via RSOP

Hi all, I have some clients that use my software, however they are having some issues with registry access, they are running Windows Server 2008, I was wondering if it is possible to use the RSOP tool to determine the individuals registry privileges? or am I barking up the completely wrong tree? cheers ...

PHP exec() not executing batch files

I tried googling for this issue and found many people with the same problem but no solution. $result = exec("C:\\Ruby191\\bin\\lessc.bat less\\$file", $output); Here result is an empty string and output an empty array. Same thing with: $result = exec("cmd /c C:\\Ruby191\\bin\\lessc.bat less\\$file", $output); I am sure the ...