Any way to run a .exe without complaints from Windows? [closed] - c

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I need to write a very basic program in C to do some calculations for a colleague at work (not at all an entirely IT literate workplace) and from my experience, running any .exe in windows (7) makes it have an absolute fit, sometimes preventing it from running the program at all. Is there any way I can make the program just run without a fuss for my colleague?
EDIT: By 'have an absolute fit' I mean windows will either stop the user from running the .exe entirely, or ask for user permission x amount of times etc. It would probably be solved by turning UAC off, but trying to explain something even as simple as that down the phone probably isn't an option.

Two suggestions:
a) Use static linking, try to include all exec you need to your application. Provide all dependencies that you can not link statically with your app. To check dependencies, use DependencyWalker for example.
b) Run as administrator your program on win7.

If your problem in UAC then simply arrange that your app doesn't do anything that requires administrator rights. In particular:
Don't write to the HKLM part of the registry.
Don't save files in restricted folders system32, Program Files etc.
Whatever you do don't ask users to turn off UAC and don't ask them to run as administrator.

Related

CleanMem tool - to auto-free memory allocated on windows? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
http://www.pcwintech.com/about-cleanmem
has anyone used this tool?
with the simple C program doing malloc and then doing sleep forever on windows I could see memory goes down, if ran cleanmem.
Questions:
Is this tool giving illusion by moving process memory to system cache? (as using windows api)
If this is the case when using C, everyone will prefer to run cleanmem, instead doing free (I don't agree with this, 'mem leak is mem leak' unless you call a free)
Does any similar tool exist for linux?
This program doesn't actually do anything. The author knows just enough to be dangerous but doesn't really know how memory works in Windows. This is probably my favorite line on the page you linked:
Warning: Memory Terminology in Windows is completely screwed. System Cache could mean something else, perhaps Memory Cache is better? as proof of this confusing way the memory has been labeled in windows, in Windows XP the PF usage in the task manager is actually commit charge, not page file usage
If you really could prevent Windows from writing to the page file, all you could succeed in doing is making programs run out of memory and crash.
The line is also hilarious:
CleanMem WILL NOT make your system faster. What CleanMem does, again, is help avoid the use of the page file on the hard drive, which is where your slow down comes from. There have been users including my self who have noticed a smoother system. A placebo effect perhaps? Who knows. I do know that CleanMem hurts nothing, and does help, to a point.
Edit
One more:
I think I should also clarify, I am no memory expert.

executing programs from command prompt [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am having trouble with executing my executable file by executing my program from the location of the program. I am using eclipse, and when I paste the location of my executable file from debug in eclipse, onto the command prompt my program works perfectly. However when I try to execute my program from the location of the debug, my program is altered, any help please?
After it begins to execute, is your program using relative paths to input files that might be different?
Are you an administrator on the computer and/or running eclipse as administrator? You could try running the command prompt as administrator to confirm that it isn't a permissions issue.
You can't work it in the debug. Because the program is working in the normal directory. Simply work in normal directory and its fine.
Your question does not seem like a real question.

C Programming and vim [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I have practically no experience with programming outside of ide's (Microsoft Visual Studio, netbeans and eclipse) and I am beginning to learn C programming. I have adequate experience with C++ and Java. I have downloaded gVim 7.3 and am looking for some guidance on how to program in C with vim. I do not even know where to type code with vim! I am completely lost and am looking for instructions to run simple command-line programs such as hello-world (to start). Also, would notepad++ be of any use?
Somebody please show me the world of C programming and Vim
Usually its done like this - you open up a shell window, set your compile enviroment configuration. Then open any files you are working on with gvim to have a C syntax highlighting available, modify them and save. Get back to shell window repeat make command or whatever you need to compile and link application.
The usefull extension for me was ctags, which allows to browse declarations. You dont get the comfort of code completions, intelissence, on-the-fly error messages or list of function parameters, but I didnt miss that much eitherway.

Unix source code- finding my way around [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I'm quite interested in getting "stuck in" to some Unix source code, say Fedora or Ubuntu.
In practical terms, how would one "re-write" some part of the Unix OS. I presume you would need two machines, a dev machine and a tester? Would you need to re-install the OS on each modification of a .c file? How could I edit the file and re-compile it etc?
What resources are there for knowing which parts of a Unix OS/Kernel relate to which C files (I presume there is no C++) and how to find them?
Thanks in advance for help
ps my motivations for doing this are to eventually be able to learn more about the lower-level fundamentals of the Unix OS, so that I could try and get into programming high freq trading systems.
I think it would probably be a good idea to have some kind of virtual machine to experiment with, that way you could do a snapshot apply your changes but still be able to go back without much effort. Also it allows you to simulate communication between PCs in a simple fashion.
First you need to know what you're looking for. You want to download and look at the: linux kernel. Which is the same for Fedora and Ubuntu (and all other GNU Linux distributions). Second, you might want to start with something easy, like downloading the kernel, configuring and compiling it and booting it. Once you do that you can move up from there.

Modifying an open source program? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I would consider myself a fairly competent programmer with experience in Java and VB.net. My latest swim around the programming lake is having me modify a program written in C. (The program is Wireshark, an open source network analyzing tool.) I followed the instructions here http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html and simply don't know where to go from there. I'd like to use Visual Studio 2008 to work with the code if possible, but will do whatever is necessary. (I'm a total noob at using command prompt to do anything though.)
If you followed those steps, then you've built it. I'll copy Section 2.2.10 here.
2.2.10. Build Wireshark
Now it's time to build Wireshark ...
If you've closed cmd.exe in the meantime, prepare cmd.exe again
nmake -f Makefile.nmake all to build Wireshark
wait for Wireshark to compile - this may take a while!
run C:\wireshark\wireshark-gtk2\wireshark.exe and check if it starts
Just make changes in the code, do these steps over again, and presto! you've modified the program. You may want to bone up on C debuggers if you're doing anything very complicated.

Resources