Hi I have a visual studio project which includes postbuildevents in the following form:
MyTool.exe $(ProjectDir)somesrcfile.txt $(TargetDir)sometargetfile.bin
Now I want to add some logic saying that these steps are taking place only if the files have changed. In peudocode:
if (somesrcfile.txt is newer than sometargetfile.bin)
{
MyTool.exe $(ProjectDir)somesrcfile.txt $(TargetDir)sometargetfile.bin
}
Can I do this with MsBuild?
I'm making a notepad-like program. To get the text from a file I read each character into the buffer by doing
while (!file.EOF())
{
mystr += file.get();
}
however if I load in an exe it stops after MZ but Notepad reads the whole exe.
I set my ifstream to binary mode but still no luck. What am I doing wrong?
Thanks
Hi folks,
I'm using popen in order to send a few commands within a Django app.
Problem is that I'm getting [Error 5] Access Denied, apparently I have no access to cmd.exe, which popen seems to use.
WindowsError at /test/cmd/
[Error 5] Access is denied: 'C:\WINDOWS\system32\cmd.exe /c dir'
I reckon this is because the app sits behind a web server which has limited privileges.
Is there anything we can do about it? Help would be awesome!
Is there a way to know whether a variable is defined, by looking at the executable.
Lets say I declare
int i;
in the main function. By compiling and linking I get an executable my_program.exe.
Now, by looking inside my_program.exe, can I say if it has an int eger variable i ?
Has anybody managed to get the ".NET Data Provider for SqlServer" to actually work within perfmon.exe.
I have a .NET app that uses nhibernate to interact with sql server 2005 db. All I want to do is to view the NumberOfActiveConnectionPools, NumberOfActiveConnections and the NumberOfFreeConnections within perfmon.exe
Can somebody explain to me how exactly I get this to work?
Regards,
David
We are using Mysql.exe to restore database by the following query
string cmd ="-h" + ViewState["host"].ToString() + " " + "-u" +
ViewState["user"].ToString() + " " + "-p" + ViewState["password"].ToString() +
" " + ViewState["dbName"].ToString() + "<" + " " +
Server.MapPath("BackupFiles/") + path;
The same query is executing in MySql command prompt but we are not able to restore using the above query in VisualStudio .Net, we have tried MysqlImport.exe to do the restore but it was no use. we are newbie to MySql if any help would be appreciated.
I look for a free launcher or bootstrapper that checks whether the .net framework is installed, and starts my app1.exe, or app2.exe if not. Alternatively a louncher that checks for the OS version.
Is is possible to get postsharp to remove references to the postsharp assemblies during a build?
I have an exe i needs to have a very small footprint. I want to use some of the compile time weaving of postsharp but dont want to have to deploy PostSharp.dll with the exe.
I running an exe from a .NET app and trying to redirect standard out to a streamreader. The problem is that when I do
myprocess.exe out.txt
out.txt is close to 14mb.
When I do the command line version it is very fast but when I run the process from my csharp app it is excruciatingly slow because I believe the default streamreader flushes every 4096 bytes.
Is there a way to change the default stream reader for the Process object?
I have a module that reads StandartError of a process, all works fine, but I want to do something different. I don't know how redirect stdin like the native way:
app1.exe -someargs | app2.exe -someargs
Where app2 reads all the stdout of app1 in its stdin.
I have an application on my server that is called leaf.exe, that haves two arguments needed to run, they are: inputfile and outputfile, that will be like this example:
leaf.exe input.jpg output.leaf
They are all on the same directory as my home page file(the executable and the input file). But I need that a VBScript could run the application like that, then I want to know how could I do this.
Hello All,
i want to get list of all application or Threads attached with a process.For example when we open different window all run with explorer.exe or we open different window of mozila all are in firefox.exe.
i have to check that if a window is all ready open no need to open this.and if it is in background or minimized then then activate the window.
Hi all,
I need to obfuscate a dll that is used in a ASP.NET project, the deployment project pruduces a setup.exe which I want to distribute. I have the VS 2008 Dotfuscator installed but when I build the deployment project the project that creates the dll is rebuilt before it is added to the deployment project and added to the setup.exe. Any suggestions on how I can get round this?
Many thanks
Lee
I have a class library(abc.dll) in which i have used a settings file. An exe (app.exe) references this class library. At runtime if i want to change the values of the settings without having to rebuild the class library/application, what is the best way to approach this problem ?
In my current approach the setting values get embeded in the library, and thus i dont see any way to update them without rebuilding the whole thing.
my vb6 app is not finding a dll that is residing in the same directory as the project. What do I do to have the vb6 code see the dll? When compiled to an exe, the code sees the dll if it is in the same dir as the exe. Thanks!
Hello,
I made a Java application which I would like to distribute on Windows, OSX and Linux without distributing a jar file. I used the great Windows exe wrapper http://launch4j.sourceforge.net/ to create an .exe file complete with my icon that won't scare Windows users.
Are there similar wrappers that I can use for OSX/Unix? An important consideration is that I would like to have my own icon on the executable (especially for mac users).
Thanks!
Consider the following code:
try
{
using(TransactionScope)
{
Process.Start("SQLInstaller.EXE");
throw new Exception();
Commit();
}
}
catch(Exception ex)
{
//Do something here
}
Will the changes made by SQLInstaller.exe be rollback in this scenario? More specifically, will the changes made by an external process launched through Process.Start() be handled by TxF?
Thanks!
hi,
I have an executable built in windows(exe).I want to pass that exe to an out file built by Cygwin(DOS version). It is going well upto half the way. After that it is showing the following error,which is related to Cygwin dll files(ACL check) .
Program received signal SIGSEGV, Segmentation fault.
0x6108829e in cygwin1!aclcheck () from /usr/bin/cygwin1.dll
(gdb)
Can anybody fix this..?
Regards,
Renjith G
I found this question being asked on several places on the internet (including the File protocol MSDN page) but no clear answer.
So, if I am calling my application like this:
file://c:\myapp.exe
is there any way to pass it some command line arguments, like /nospashscreen=true
Things I've tried:
file://c:\myapp.exe?/nospashscreen=true - launches the app, but with no command line arguments :(
Thanks in advance.
if i got a c++ executable file like this: executable.exe and i want to add some parameters like:
executable.exe +username = pino
how do i get in c++ that i filled in pino as my username?
Hello
I am trying to find out for auto run application's while plug in my USB pen drive .so is there any way that while i plug in the USB Pen drive it automatically open myappilication.exe while already there in USB root file.Instead of showing the option for running i want directly it will run the exe file .
I have in the same folder a .bat and a .exe file.
I couldn't call the .exe file from the .bat unless I put the full absolute path to it.
Is there a way to don't specify the path?
I have an x64 managed C++ class that needs to be tested using Visual Studio 2008. This class links to a x64 unmanaged lib
I'm not able to run my my tests because vstesthost.exe (the exe Visual Studio hosts my test) is x86 and not x64.
Ideas? the error generated is
rror: System.BadImageFormatException: Could not load file or assembly ... or one of its dependencies. An attempt was made to load