[Solved] Delete specific subfolder under unknown folders from anywhere

I created a short powershell solution using this- $targetName=”ss s”; foreach ($file in Get-Childitem “G:\Project\Projects\” ) { $fname=$file.name; if (Test-Path “G:\Project\Projects\$fname\$targetName\”) { $shell = new-object -comobject “Shell.Application” $item = $shell.Namespace(0).ParseName(“G:\Project\Projects\$fname\$targetName”) $item.InvokeVerb(“delete”) } } This powershell script sends that folder to recycle bin after confirmation popup. (this won’t send any file named ‘ss s’) this seems … Read more

[Solved] Thinnest operating system supporting virtualization apps like VirtualBox? [closed]

There exist rancher (http://rancher.com/rancher-os/) which can solve this problem as follows Its a 30-40mb operating system as bootable ISO so no questions of crash with power outages, can always reboot from ISO. One can load docker images which shall be of Ubuntu / Windows thereby eliminating footprint needs in terms of thin OS and no … Read more

[Solved] Is there a way to identify the Windows command prompt regardless of file name or location?

Don’t. Windows has internal means for that. Read up on the policy editor, and/or file access control. If you’re admin and the “user” is not, policy (or simple ACL) will do the job; if the “user” is also an admin, they’ll be able to defeat your program fairly easily. 4 solved Is there a way … Read more

[Solved] C binary read and write file

Okay, I don’t really understand what’s going on, but it seems that you cannot trust fseek with SEEK_CUR when using with read/write files in that case (I’m running Windows, and the standard functions are notoriously different from Linux that may be the issue) EDIT: Andrew’s answer confirms my suspicions. My solution complies to what the … Read more

[Solved] How to get the drive letter of a drive with a specific drive name on Windows? [closed]

A batch file code for copying the folder IMPDoc from drive on which the batch file is stored to a drive with volume name Files is: @echo off setlocal EnableExtensions DisableDelayedExpansion for /F “skip=1″ %%I in (‘%SystemRoot%\System32\wbem\wmic.exe LOGICALDISK where VolumeName^=”Files” GET DeviceID 2^>nul’) do ( %SystemRoot%\System32\robocopy.exe “%~d0\IMPDoc” “%%I\IMPDoc” /R:1 /W:1 /NDL /NFL /NJH /NJS goto … Read more

[Solved] Batch file v PowerShell script

The following code executes the same code via both processes: internal class Program { private static void Main() { const string COMMAND = @”SCHTASKS /QUERY /XML ONE”; Collection<PSObject> psObjects; using (var ps = PowerShell.Create()) { ps.AddScript(COMMAND); psObjects = ps.Invoke(); } var process = new Process { StartInfo = new ProcessStartInfo { UseShellExecute = false, RedirectStandardOutput … Read more

[Solved] Windows GUI – Find out what has been clicked on the screen

There are several programs on the web which do this. IIRC winspy is one of them. It achieves this via setting a global mousehook which returns the programname of the clicked window. How to absract this in JNI? Do not know, but this is the link, you asked for: http://www.codeproject.com/Articles/1037/Hooks-and-DLLs 4 solved Windows GUI – … Read more

[Solved] Writing drivers for Windows [closed]

Indeed, this would be too broad. Driver writing is a complicated thing which requires a good understanding of how a computer and the OS works. Also, C# (and .NET itself) indeed isn’t available in Kernel Mode, so C/C++ is the preferred way. Although theoretically any unmanaged language (like Pascal) could do, I haven’t heard of … Read more