Click here to Skip to main content
15,891,529 members
Everything / Programming Languages / Shell

Shell

shell

Great Reads

by V. Subhash
About odd but critical shell-programming details that get easily forgotten or ignored
by Mr. xieguigang 谢桂纲
How to build my own 3D graphics engine from ZERO step by step
by Kewin Rausch
Moving forward in the future networks evolution
by fd9750
Overview of required tools to cross compile/build/remote debug C/C++ projects on a Windows host ( 10 ) for a Raspberry PI 3B

Latest Articles

by V. Subhash
A simple fix for excessively bright video and low-volume audio
by hemanthk119
Steps to enable VPN client on an OpenWRT router using openvpn and mwan3
by Ben McNamara
Container classes much faster than STL.
by k5054
How to update a bash variable inside a loop when reading from command output

All Articles

Sort by Updated

Shell 

19 Oct 2010 by "Fish" (David B. Trout)
Simple parsing of VS_VERSIONINFO version information strings displayed in an XP-style file-properties "Version" tab
11 Jan 2010 by #realJSOP
I wouldn't do it because it's a system DLL, and Vista/Weven don't like it when you mess with system DLLs.
9 Mar 2010 by #realJSOP
Try ShellExceute (I forgot exactly how it's done in C++, but ShellExecute sounds like it should point you in the right direction).
5 Apr 2011 by #realJSOP
It shouldn't matter what version of .Net you use (as long as you're not using 1.n because that's just so freakin' old it's not worth considering). What you need to do is become familiar with how the OS implements the feature. If you stop and think about it, it's merely a scaled down version of...
19 Oct 2016 by #realJSOP
You also need to encapsulate a field with double quotes if the field itself contains one or more double quotes.
28 Mar 2019 by #realJSOP
Try this (no guarantees, just a stab in the dark): if (data.lower() == "exit"): or maybe if (data.lower().startswith("exit")):
26 May 2015 by _Asif_
I have not tried it myself but it seems that this could help you out[^]
12 Jun 2013 by Aatif Ali from Bangalore
please refer this linkhttp://v1.corenominal.org/howto-setup-a-crontab-file/[^]
10 Oct 2018 by abdul subhan mohammed
Hi Guys, I am attempting to write the following code in .net 3.5. The code is trying to loop through verbs (i.e. Pin to Start, Open, Create Shortcut, etc) This code does this in 4.5. What I have tried: string path = Path.GetDirectoryName(filePath); string fileName =...
16 Jan 2013 by Abed AlSayed
Hello I'am new to WPF, I've added (Microsoft.Windows.Shell.dll) Referenceand used this code :
10 Feb 2014 by Abhi Ceivea
I am trying to send a ajax request to a shell file on my server. But i dont seem to get access to that shell file. i.e. the shell file is not getting executed through Aajax request but gets executed through terminal.Here is a code :var Settings; if(!Settings && typeof XMLHttpRequest...
13 Mar 2012 by Abhinav S
Use the GetDetailsEx method instead of GetDetailsOf.
8 Nov 2016 by Afzaal Ahmad Zeeshan
In this post, I will show you how to create a small script to automate the deployment of your ASP.NET Core applications to Microsoft Azure using local git deployment.
1 Feb 2013 by Ahmed Charfeddine
A Visual C++ Project Wizard for the fast creation of high performance TCP servers in C++
24 Sep 2012 by aianne
hi everyone!i need help..i don't know how to fix errors in my script..i need to get and put data in other machine using ftp..please help me..thanks!#!/bin/kshREMOTE='000.000.0.000'USER='xxx'PASSWORD='xxx'source_dir='cd /usr/src'target_dir='cd /usr/src'ftp -n $REMOTE...
20 Sep 2015 by Ajesh Novell
I am creating a shell extension. In my property sheet dialog, I have a added a "SysLinK Control". But as soon I add this control my dialog doesn't come. I tried programmatically create this control usingHWND hwnd = CreateWindowEx(0, WC_LINK,L"Ajesh",WS_VISIBLE | WS_CHILD |...
25 Aug 2013 by AjithKp560_
Python is not a shell. It is programming language. You can program many exploits using this programming language. So, the exploits that will spawn control over remote computers are also called as "SHELLS". Like this you can program exploits using perl, ruby, php like programming languages......
22 May 2010 by aki2010
How to set my program to be default viewer for some file type (.pdf) programmatically? Do I need to write some info into registry or to use some windows api (as user can do manually)? I already (for pdf) set the corresponding registry keys using Inno setup script:Root: HKCR; Subkey:...
27 Aug 2011 by Alan Burkhart
I'm not terribly familiar with working with the shell, and I just want to be sure I did this right. All I was after was to use the Shell.MinimizeAll() command. The program creates images for use as background tiles, and I'm adding a "set as wallpaper" feature. As such, I wanted to hide any open...
20 Oct 2012 by Alan N
Yes it's quite clever! You've hit upon a syntax for creating an NTFS alternate data stream and I think you will have created an alternate stream named :sample.txt which is a complete copy of the original file but hidden from normal view.A bit of background is available in...
10 Mar 2010 by Alaric Dailey
For consistency, the icon in your taskbar is the icon on your form (so it makes sense to the user). If you want to do this, the only way I can think to do is some "slight of hand". Change the "show in taskbar" property to falseCreate a new form and force it to stay minimizedchange...
23 Nov 2016 by Alexander Mills
I have a node.js script and I want both stdout and stderr to go to a log file, but I want to pass the stdout and stderr through grep first.This works: node a.js > a.log 2>&1But this doesn't:node a.js | grep "error" > a.log 2>&1It doesn't output anything to the file, but worse...
15 Mar 2010 by alexbtr29
Hi,I am using your cliche shell, but found a strange issue with it. It worked flawlessly for a month or so, but now it throws a java.io.InvalidClassException: org.Reticolo; incompatible types for field matriceProssimitaAlfaVariabileObviously i have double checked that params passed are...
16 Dec 2021 by AlexeyAB
Atomic operations and C++11 memory barriers and assembler instructions generated on x86_64 CPUs
2 Feb 2018 by Ali Hojjati
I wrote a shell extension using c++, but after performing right click after 30 times, windows menu goes black and I have to reset the explorer.exe How can I prevent this issue, and also I have more than 60 Items in my shell menu. What I have tried: I wrote the shell menu based on Microsoft...
2 Feb 2018 by Ali Hojjati
Here is my code #include "MyAdvancedMenuContextMenuHandler.h" #include #include #include #include #include "sqlite3.h" #include #include #include #include #include using namespace std; #define...
8 Feb 2018 by Ali Hojjati
I want to set icon for shell extension (windows shell menu), but seams it only accepts bitmap files. how can I Load icon or PNG in this case. What I have tried: Right now I Load bitmap files and use some function to make it transparent.
8 Feb 2023 by Andre Oosthuizen
You are using shell to reference the path to the file and the name of the file. The error states that either the path or the file name OR both is incorrect. Looks like you are using Python, see Find path to the given file using Python[^] with 3...
15 Jan 2012 by Andreas Gieriet
Try $x where x is one of 1...9.
21 Oct 2013 by Andreas Gieriet
The task sounds non-sense to me.Running a process in background means:the stell starts that command as background process (fire and forget) and immediately continues with the next command.I.e. this completes instantly:sleep 100 &echo "done"You may observe the sleep process by...
19 Jan 2014 by Andrey Chaschev
A Bear deployment example of a Petclinic Grails demo from GitHub.com
25 Aug 2012 by André Kraak
From Batch File Rename with Windows PowerShell[^]: Dir *.txt | rename-item -newname { $_.name -replace ".txt",".c" }
4 Oct 2012 by Anil Dalsaniya
About Android adb shellWhen i am inserting the data that will insert successfully also they are displyed in file explorer>data>data>package>databaseBut when i use adb shell that time display no such table available:i don't know what happenplease help me...
8 Jan 2012 by Aniruddha Loya
A module for compressing / decompressing files in windows using Windows shell
10 Nov 2022 by ANNA Genone
I have installed (pkg install audio/pocketsphinx) and is trying out the testing command ( pocketsphinx_continuous -inmic yes ), but am met with the following screen: INFO: continuous.c(371): pocketsphinx_continuous COMPILED ON: Nov 5 2022, AT:...
26 Mar 2011 by apaka
Does anybody know any sample how to create property handler shell extension in c# or any other language? Thanks in advance.
16 Aug 2011 by apaka
How can I rename drive using shell api and c#? Which libraries to use ? I foud that there is some kind of ShellLib for .NET, but I could'tfind its download. My actual problem is that I am dealing with disconected network drive without UNC path so the only way to rename it is from explorer, but...
7 May 2023 by as7951
Experts, Need your support for this awk script. we have only one input file, all these column 1 and column 2 are in same file and have to do lookup for values in one file(column1 and column2) but output we need in another file Need to grep row whose string contains 9K in column 1 and then grep...
25 Aug 2017 by B.Sudhir
1. I was trying to execute a Bash Shell Script from any directory in the system. for this I need to make it available to execute anywhere in the system. 2. I also mistakenly added wrong path which I wanted to delete but its not happening. Please help. What I have tried: 1. I've added the...
22 Oct 2013 by Bashar Tahir
Easily zip / unzip files using Windows Shell32
29 Dec 2011 by Be Yourself
I have two solaris servers having IP10.10.36.20(A) and 10.90.33.22(B)The server B is exposed to internet but server A is intranet server.I want to transfer some files from server B to server A but in order to do this I have to bypass the firewall installed in server A which can raise...
22 Apr 2023 by Ben McNamara
Container classes much faster than STL.
27 Dec 2013 by Ben Watkins
I had the exact same errors as you. No idea why.I did the following to fix it:- closed the project- deleted the obj and bin folders- reloaded the project- put the DLL back in the bin folder- deleted the reference and re-added it.- closed and reopened the forms that used the...
23 Jan 2013 by berilium
Hello,I want to write an application able to find text in files and report result back in a graphical way (to show files relationship).I would like to hear some recommendations on what tech I can use to achieve this. My first attempt was to write a Visual Studio Isolated Shell because I...
19 Oct 2016 by Bernhard Hiller
The working directory for execution of the macro may differ from the folder of the file. With a full path like "c:\\temp\\excelDump.csv", you are on the safer side.
12 Jun 2013 by bhagyashri from poona
Hi,I am writing script for cron tab job bt i get permission denied error i am copied my code here plz tell me anything wrong in it #!/bin/bash# Author: Anand Subramanian# Publisher: http://LinuXplained.com# This program is free software; you can redistribute it and/or modify#...
5 Sep 2018 by BillW33
There is a good example of how to loop through all the keys for a registry here: https://stackoverflow.com/questions/1458653/iterate-through-registry-entries Read about the Registry Key Class here: https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.registrykey?view=netframework-4.7.2 ...
17 Jan 2011 by BoSkjoett
How to create and delete shortcut files in Windows Startup Folder using C#.
12 May 2022 by Bryan Woodruff
I am trying to access a variable outside of function but I cant get it to work properly it might have something to do with the subshell but I am not too sure. I'm very new to shell at the moment I am trying to access the elapsed variable from...
2 Feb 2011 by C. Groß
Hi everybody!First of all, please excuse me if my English is not perfect, I'm not a native speaker.Let me first describe what I'm up to:I want to create a GUI for a command line tool which I have not written by myself.I got so far to be able to launch the tool with desired...
16 Jul 2012 by cass3000
I tried to create Visual Studio Shell Isolated application, but when i run the app see following error: "LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt" does somebody solved this error?
18 Jul 2012 by cass3000
Well, finally I think I found, not the solution, but the cause:In fact, the probably cause is corrupt files generated by VS 2012 RC. I assume this because I repeated the same steps in another PC without VS 2012 RC and it worked perfectly.
9 Jan 2013 by Chattrawit Jayz Cpe
Anyone can suggest Femtocell SDK in below condition:Purpose: My Femtocell want to detect Cellphone Identification(SIM IMSI, Serial, Phone No or any which Femtocell can identify) in Femtocell coverage areaConditions- OS: Windows(CE, XP or any), Linux or UNIX- Development Language...
1 Sep 2021 by CHill60
AFAIK there is no way to capture that button click as you are shelling the application, not interacting via an API.Quote: Last thing, If someone knows an alternative way to get to the same results in Outlook directly, this will be equally highly...
1 Sep 2014 by chiyun1
Hi,all, I was developing a context menu handle on windows OS. I have followed the website guide "The Complete Idiot's Guide to Writing Shell Extensions - Part I[^]", and now can show my own submenu item when right-click a shorcut file. Then I want to remove the other submenu items, such as...
2 Sep 2014 by chiyun1
What about message hooking or windows explorer BHO? Can they implement it ?
5 Apr 2010 by Chris Meech
Just something else to look at. I've had similar issues where the space character being embedded in one of the folder names caused problems. Generally the highlighted files end up being tokenized by a space character and so an embedded one causes one filename to be split across two arguments.
10 Feb 2012 by Chris Meech
For starters, try here[^].It's possible that examples from the articles will compile in your environment, but there's no guarantee. If there are libraries missing, then you may still have to download the SDKs from Microsoft.
1 Nov 2011 by Chuck O'Toole
The documentation for CreateProcess http://msdn.microsoft.com/en-us/library/ms682425%28v=VS.85%29.aspx[^] shows how to set the lpCommandLine to pass arguments to the application and discusses how the application can get those arguments. That should do the trick.
24 Jan 2010 by Clement Tan
I'm supposed to create a menu in shell programming comprises of a main menu something like this..1) Add new book2) Remove existing book info3) Update book info and quantity4) Search for book by title/author5) Process a book sold6) Inventory summary report7) QuitEach...
30 Jan 2010 by Clement Tan
function check_title_author #function to input title / author{ while [ "$Title" = "" ] do echo "Title : \c " read Title done while [ "$Author" = "" ] do echo "Author : \c " read Author done}
30 Jan 2010 by Clement Tan
Forget to indicate, its shell programming using functions
6 Apr 2010 by CPallini
Poonamol wrote:$(CCC)Shouldn't be $(CC)?What error (or unexpected behaviour) did you get? :)
26 Mar 2013 by CPallini
This has little to do with UNIX. You need just a little knowledge of the C programming language and a bit of logic. How would you solve the problem with pencil and paper?
29 Aug 2013 by CPallini
This works for me:#!bin/shfor c in `seq 1 5`doecho "$c"doneHowever, as Manfred noted, the right syntax depends on the shell you are using.
7 Jul 2018 by CPallini
Programming Microchip PIC32MM microcontrollers in C++ and assembly
2 May 2011 by dan!sh
Are you looking for command line arguments[^]? It seems so to me from your comment to Dave.
18 Jul 2021 by Daniel Pfeffer
Working backwards from the numbers that you give, we get 1 block = 100Mb / 22355 = 4473 bits. This looks close to a 4 Kb (i.e. 512 byte) block size. Adding various header and framing bits make the correspondence even better. I expect that you...
14 May 2012 by Darkcharm
Now I need to enum all the "ICON" on the desktop such as "My Computer" and other .lnk s.After that I will draw the ICONS to a HDC and get the image data,also,I need the dest file of the .lnk s..How could I do ? I read some about Windows shell but I still don't know what to do...
12 Apr 2010 by Dave Kerr
I believe the only way to do this will be to implement a shell extension for the particular file types that you want to provide this functionality for, or the * type if it is for all of them.There are lots of shell extension articles on the codeproject that might help you with this, but this...
19 Dec 2017 by Dave Kerr
In this article, I'll show you how to quickly get help when working with tools in the shell, without disrupting your flow!
25 Mar 2018 by Dave Kerr
In this article, I'll show you how you can use the shell as an efficient tool to compliment how you use the clipboard.
8 Sep 2010 by Dave Kreskowiak
You're probably not going to get an answer to this question considering CP's usual focus is on Windows. I would try a forum specifically dedicated to the Korn shell and Linux O/S.
2 May 2011 by Dave Kreskowiak
There's no way to tell how your app was launched. There is no pointer to anything that says how are under what circumstances your app was launched.
2 May 2011 by Dave Kreskowiak
You're kidding me, right? All you do is call the appropriate method in your code if you find an instance of the switch in the command line arguments. How hard is it to check for the existance of a string in a collection of them?public void Main(){ List argsCollection = new...
25 Jul 2018 by Dave Kreskowiak
There's nothing you can put into the registry that's going to do the whole "If there's something on the clipboard" thing. You're going to have to provide actual code for that and modify the context menu on-the-fly. The only way to do that is to write a shell extension. This is FAR from a...
12 Sep 2014 by DaveAuld
I think this answers your question.http://stackoverflow.com/questions/12340846/bash-shell-script-to-find-the-closest-parent-directory-of-several-files[^]
21 Aug 2015 by David Hall
An MRU Manager Component that can be dropped on a Windows Form or WPF Window and integrates with Menu, MenuStrip, Application Settings, Registry, and Windows Recent Files.
12 Nov 2012 by debdipta_ghosh
I want to create a sample namespace extension? Can any one give me a simple example...
30 Nov 2012 by Dharmateja Challa
Here is your code, just copy your exe path to buff, for each of your exes, here I used notepads as exes, only when you close those notepads or exes closes it will not exit, I waiting for those to complete.#include "stdafx.h"#include #include #include...
24 Dec 2012 by Ding Sun
You may search "property handler" using Google, and it will give you so many choices.:)
11 Feb 2022 by DoingWork
I want to start 2 applications with one shortcut. One application is GUI based while other is shell based (Terminal=true in .desktop file). What I have tried: For this goal, I created a file name **Starter** having following script in this...
30 Jul 2019 by Don Hoang
This post describes implementing ASP.NET Gridview using Bootstrap 4.
30 Nov 2012 by Don_3
I am a beginner in winapi c++ on windows platform, i need to execute 3 exe files,i.e the installation programs, in one single program. i used shellexecute, exec v, system calls but all are exiting the program after the first program installation, please help me to solve this...Thanking you...
23 Sep 2010 by E.F. Nijboer
A method I can think of is:1. store the filename in a temporary file Echo $FILE > filename.tmp2. Use findstr with the proper regex to test the search string in the temporary file.At this link you find a good reference of the findstr command and how to create the regex to test the...
21 Jan 2010 by Eddy Vluggen
You could use the DOKAN-library[^], it has bindings to .NET and is well documented.
20 Jul 2010 by Eddy Vluggen
Building (almost) a RAM-Disk using the Dokan library and C#
24 Jan 2011 by Erez Zinman
Running a(ny) shell command using C#
12 Feb 2011 by Erez Zinman
Something I only found out about recently:There's a better alternative than using "cmd start...".One should use the following method:[System.Runtime.InteropServices.DllImport("shell32. dll")]private static extern long ShellExecute(Int32 hWnd, string lpOperation,string lpFile, string...
15 Dec 2016 by ergohack
Tired of the same old Windows Logon/Shutdown screen? I use a symbolic link rotation utility to cycle through a bank of backgrounds.
24 Feb 2014 by estie chen
Check your server, may be you have to install the Media Foundation feature(windows server 2012: through Server Manager -> add Roles and features)
18 Apr 2010 by Eureka_jim
I need to start another executable from within a VB program . After this program exits, my VB program will continue.
16 Feb 2019 by faizanza
Hi, im working on a personal project that opens other programs and currently I am using a text file where I have to manually enter the path to the exe file like this C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe I wanted to know is there a way to get a list of all the...
30 Jan 2020 by fd9750
Overview of required tools to cross compile/build/remote debug C/C++ projects on a Windows host ( 10 ) for a Raspberry PI 3B
12 Aug 2012 by fei.qi@ivtcorporation.com
Hi all, I write a shell-extension for Win7. First I crate my-own folder under "MyCompute", then show subfolders in it. But I find a strange thing. My shell extension supports to "rename" the subfolders. I call IShellView::SelectItem(pidl, SVSI_EDIT) to set the folder state to editable....
8 Apr 2022 by Gary R. Wheeler
The context menu in the Windows 11 File Explorer has moved all shell extensions to the "shift-F10" submenu. The available documentation seems to state that Win32 apps must be installed using UWP methods to integrate with the Win11 Explorer. This...
3 Dec 2010 by gbahns
Create fully functional windows with custom chrome and caption buttons in WPF
2 Dec 2013 by Gerald Gomes
Starting modular application development using Prism, WPF, and Unity container.