473,394 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

windows&c

hi friends,
i want to know that is it possible to link my c programme
with folder or file in windows, so when ever i click (try to open) the
folder first my programme will execute and after that according to
result of pro. folder/file will open/remain close.
-aakash

Sep 18 '06 #1
7 1422

skyspy wrote:
hi friends,
i want to know that is it possible to link my c programme
with folder or file in windows, so when ever i click (try to open) the
folder first my programme will execute and after that according to
result of pro. folder/file will open/remain close.
-aakash
You are playing in the wrong court. For this you need to change the
windows kernel.

Sep 18 '06 #2
mailursu...@gmail.com wrote:
skyspy wrote:
hi friends,
i want to know that is it possible to link my c programme
with folder or file in windows, so when ever i click (try to open) the
folder first my programme will execute and after that according to
result of pro. folder/file will open/remain close.
-aakash

You are playing in the wrong court. For this you need to change the
windows kernel.
And both of you are posting in the wrong newsgroup. A Windows
specific one would be appropriate.

Sep 18 '06 #3
"skyspy" <sk*******@gmail.comwrites:
i want to know that is it possible to link my c programme
with folder or file in windows, so when ever i click (try to open) the
folder first my programme will execute and after that according to
result of pro. folder/file will open/remain close.
This is a Windows question, not a C question. You'll need to ask in a
Windows-specific newsgroup.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 18 '06 #4
Write a script(exe file) in the properties of the folder. Then it will
work. Try it.

skyspy wrote:
hi friends,
i want to know that is it possible to link my c programme
with folder or file in windows, so when ever i click (try to open) the
folder first my programme will execute and after that according to
result of pro. folder/file will open/remain close.
-aakash
Sep 18 '06 #5
utpal wrote:
Write a script(exe file)
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html>
Also don't dispense off-topic advice.

Brian
Sep 18 '06 #6
skyspy wrote:
hi friends,
i want to know that is it possible to link my c programme
with folder or file in windows, so when ever i click (try to open) the
folder first my programme will execute and after that according to
result of pro. folder/file will open/remain close.
Compile this program and assign it as the default application to open
TXT files. Now, when you double-click a text file there is a 50% chance
of it opening and 50% chance of nothing happening. The decision is
controlled by the program.

You can write handlers like this for most file types. But not for
folders, to my knowledge.

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(int argc, char **argv)
{
srand(time(NULL));
rand();
if(argc == 2)
{
if(rand() < RAND_MAX / 2)
{
char *buf = malloc(strlen(argv[1]) + 20);
if(buf)
{
sprintf(buf, "notepad \"%s\"", argv[1]);
system(buf);
free(buf);
}
}
}
return 0;
}

--
Simon.
Sep 18 '06 #7

"Default User" <de***********@yahoo.comwrote in message
news:4n************@individual.net...
Also don't dispense off-topic advice.
I believe that the OP is a friendly young man with good intentions. His
question is of the variety that we kick out the door pretty quickly in clc.
One thing you learn after a while is where programming languages stop and
OS's start. There IS intelligent life on usenet outside of this forum. It
takes a while to find, though.

What is germane to this forum? I don't know the answer to this question,
but, before tonight, I would have said that it is obsessed with finding
obscure errors. The paradoxes of finite-state automata ensure a ready
supply of these, and I think Johnny von Neumann has the last word on it:
avoid bad scenarios.

I would love to tell the story that motivates this response, but it can't be
done without telling how I intentionally hanged windows in a public emporium
using a guess from the C programming language. Ergo OT. EC
Sep 28 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Eunice Santorini | last post by:
Every once in a while (especially when I visit suspect web sites :), every single window on my Microsoft Windows XP & Microsoft Windows 2000 operating systems goes haywire. All the windows...
56
by: alan b | last post by:
I copied it and tried to edit the movie.htm below in the <PARAM NAME=*** location of the file where the videoclip is on my hard drive. It is already recorded by Windows Media Player. My version...
3
by: sea | last post by:
In order to have System Administrator privileges for the DB2 database, is it necessary to have Administrative access (log on as administrator) on the computer where DB2 is installed? Or, if a...
1
by: pangel83 | last post by:
I've been trying for days to write a piece of VB.NET code that will read from winamp's memory space the paths of the files from the current winamp playlist. The GETPLAYLISTFILE command of the...
1
by: Tama | last post by:
Hello, I've didn't find any answer to my problem so I start a new topic. I have installed Apache 1.3.33 on Windows XP. I've also downloaded and installed ActivePython form...
1
by: mdhaman | last post by:
hi, I have a windows service written in VB.Net and framework 2.0. It is a multithread service and it is using threadpool to manage threads. Recently I have started getting...
4
by: nirmalarasu | last post by:
Hi All, Currently iam looking for one common script to work both in linux and windows target machines.The script what i going to write need to be loaded in CD. The CD scripts will be used both in...
1
by: Yogesh Sharma | last post by:
Diff B/w Windows & SQL Server Authentication. Which one is trusted & which one is not?
6
by: avcitamer | last post by:
We upgraded our system and problem below occured, pleas help me... Windows 2003 server SP1 When I set a decimal DB field value to "123,32" (using ADODB.recordset ) updated value was ok (123.32)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.