InstallShield Without The Program Files Folder? |
Sounds like you're building a release with the compression turned off.
In the solution explorer tree, expand 'Prepare for Release' and select the
'Releases' node. Find the release you're using in the tree that appears on
the left side of the window.
You should see a setting called 'Compression'. If it's set to
'Uncompressed', that's your problem. Change it to Compressed.
|
VBA Write new file to Program Files folder |
Writing to %PROGRAMFILES% requires administrative privileges on Windows
Vista and above (or XP when running as a limited user). Applications are
not supposed to store their data there, and that information has been
published for more than a decade now.
A good reference here for information about where to store your
application's data is in Does Microsoft have a best practices document
regarding the storage of App Data vs User Data on different Windows
Platforms?
However, your question is confusing, because you refer to Program Files
folder in your subject, but your code uses a hard-coded path to C:Documents
and SettingslocalhostDesktop, which is not the same thing. If that's the
actual problem, it's probably because of two issues:
You've hard-coded in C:Documents and Settings, which is
|
Calling a .exe as Admin from within my code in Program Files folder |
Just add a manifest to the target application stating that it should be run
as admin. The responsibility for that generally lies with the application
being started, not the application which starts it.
An exception would be cases like Notepad being called to open a shared
configuration file, but you haven't provided enough details to determine
that.
|
Program that counts txt files in folder and its subfolders throws NullPointerException |
File.listFiles() will return null if it is invoked on a file that is not a
directory. If that happens, your loop condition will cause the
NullPointerException. This makes sense if it is being invoked, as you
mention at the end, on something that does not exist.
Why this is happening requires more information. What is the "file that
[you] can't even find on [your] computer?"
|
How are @interface, @implementation & program sections organised (in files) in an objective-c program? |
The @inteface sections goes into a .h file. the @implementation goes into a
.m file.
This is probably explained in the book, although for convenience listings
are usually given in one piece.
|
PowerShell code running as scheduled task fails with Program Files folder |
Maybe the execution policy is too restricted for this account.
try to set the executionpolicy by adding -executionpolicy unrestricted in
the parameters.
If that failed, it would help to see the log of the scheduler.
|
Wix Toolset - Setting a Property to User Profile Folder path and Program Files |
As an alternative to using the properties you're defining, you might be
able to use some built-in properties to better effect.
Instead of %USERPROFILE, consider LocalAppDataFolder. This will avoid your
data from being copied between machines as a user roams between machines on
a network domain. I'm guessing you don't need that but, if you do, use
AppDataFolder and beware of the latencies involved.
Instead of %PROGRAMFILES, consider ProgramFilesFolder. This seems to be
what you intend.
|
Security problems of world-writable batch files in Windows program folder |
Pretty much exactly what you'd expect. If your application calls that
batch file, then any user can put commands in it to be run with the
privileges of the user running your application.
If your application acquires administrative permissions prior to running
that batch file, then it's more or less like letting any user use your
application to execute commands as root.
|
why this program is crashing |
for ( int i = 0 ; imageCorners.size();i++){
// ^^^^^^^^^^^^^^^^^^^
The underlined part is the condition. In this case you are saying "keep
looping until the size of imageCorners is "false" (i.e. 0)". But you never
change the size of the vector, so this condition never stops the loop, i
keeps getting bigger, until you try to access an index that isn't actually
in imageCorners.
Presumably you mean to loop until i gets bigger than the vector. Then use
for (int i=0; i < imageCorners.size(); ++i) {
|
C program keep crashing |
do this:
int main(void)
{
int cant, num, *pnum, i,contador,*pcontador ;
int *lista;
printf("Ingrese la cantidad de numeros que desea agregar a la lista:
");
scanf("%d", &cant);
lista = malloc(sizeof(int)*cant);
if(!lista){
perror("error on malloc");
exit(1);
}
//continue with your code
free(lista);
}
The problem with your code, is cant is uninitialized so the compiler
doesn't know how much space is required for your array.
or you can do it this way:
scanf("%d", &cant);
int lista[cant]
//continue with your code
|
setImageResource Crashing Program |
java.lang.NullPointerException because your d1 is null
so use
d1=(ImageView)findViewById(R.id.d1);
so your code should be
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tcp);
createDeck();
d1=(ImageView)findViewById(R.id.d1);
d1.setImageResource(R.drawable.clubs9);
}
|
C++: Crashing of a program using Insertion Sort |
for(compare=pivot;v[compare-1]->getAge()>temp->getAge();compare--)
Let's say pivot is 1, compare will be 1. Then you access element 0 in the
list v. If the age is bigger, you will decrease compare, which makes you
access an out of bounds element (v[-1]).
|
Program Crashing while trying to open a .txt file |
pCurrent = pTop; Why do you assign this here? This makes pCurrent null
pointer. Please remove or fix.
I'm confused with your code:
pCurrent = new StringListNode; // Allocate new memory and point at it
pCurrent = pTop; // Make pCurrent point at same thing as pTop
You assign to pCurrent twice. pTop looks like a data member, perhaps you
meant in constructor:
pCurrent = new StringListNode; // Allocate new memory and point at it
pCurrent->pNext = nullptr; // Assign null to next pointer
pTop = pCurrent; // Make pTop point at new memory
and in destructor remove pCurrent = new StringListNode; because it does not
do anything.
When outputting, you check pCurrent != 0, but you do not check for null
when reading. Probably pCurrent is null pointer.
Also, please read Why is iostream::eof in
|
Program crashing when accessing 2D struct |
Your initialization is wrong
values* one_row = new values[col];
for (int i = 0; i < row; i++){
tab[i] = one_row;
This is creating one row, and assigning it to every row.
You probably meant to do:
values** tab = new values*[row];
for (int i = 0; i < row; i++)
{
tab[i] = new values[col];
}
That being said you really should be using either std::array or
std::vector.
ALSO, and this is what's causing the crash, in set_m_values, you have an
incorrect comparison:
for (int j = 0; i < col; j++){ // notice the i in there
should be:
for (int j = 0; j < col; j++){ // replaced i with j
Most likely you copy pasted and forgot to change it. I would like to stress
the fact that you really should be using standard library containers like
vector for this. For example you co
|
Program crashing using malloc() and free() |
Your RemoveSyllable function doesn't actually set the syllables member to
NULL. You think it does, inside the routine, but actually you are only
changing its value inside the local variable.
|
C++ program crashing on weird input |
You are accessing out the boundary of a string which is undefined behavior.
for(int i=0;i<=contents.length();i++)
^^
should be:
for(int i=0;i<contents.length();i++)
^^
BTW, it will be a good time to learn debugger. Capture the exact point
where the program crashes and find out why.
|
C++ program crashing for a string concatenation. |
I had this problem working on a school project a few months back... if a
string gets massive, it can cause a segfault. Try using something like an
ostringstream instead.
|
Program crashing after adding subview from NSMutableArray |
Solved. It turns out that the initializer that I was using for card, which
was cardWithExpressions:, didn't have the [super initWithFrame:] in it. Put
that in there and now it's all working.
|
C++ - run-time crashing of linear probing program |
Near the top of main you do this:
Linear_Hash lh(20);
lh.insertAcc(100,100.1);
The first line sets up the vector:
for(int i = 0;i<max;i++)
{
hashArray[i] = NULL;
}
So, before the second line you have a vector of NULLs.
The second line then does this:
Acc* newacc = new Acc(id,dd);
int hashVal = hashfunc(id);
while(hashArray[hashVal]->iData ...
So, hashArray contains NULLS, then you try to look at
hashArray[hashVal]->iData i.e.
NULL->iData
You should check hashArray[hashVal]!=NULL before you try to do anything
with it.
|
Conditional Formatting Code Crashing Program |
I assume you intend to look explicitly in colums A to O, so you should use
dollar-signs to fix the references:
=COUNTIF($A:$O,A3) = 2
=COUNTIF($A:$O,A3) > 2
Without these it will check from the current column, 14 columns to the
right.
Added If your range that has the conditional formatting can be limited to a
specific area then, assuming you first highlight the area A3:O50, then:
=COUNTIF($A$3:$O$50,A3) = 2
=COUNTIF($A$3:$O$50,A3) > 2
|
aspect ratio of image crashing the program |
the logic of this algo is correct finally i found that WidthOfPreviewPane
and HeightOfPreviewPane=0 its because the function in which i have written
this code was initialized at last so these 2 were not initialized that time
when i debugged them and i avoided thid problem by putting them in in a if
condition which will let the control go inside if their value is not 0 and
it worked nicely.
see this-
if(WidthOfPreviewPane!= 0 && HeightOfPreviewPane!=0 )
{
conditions here......
}
and thats solved.
|
Program crashing when trying to read a vector of objects |
There is probably some missing code from your example, but I suspect the
problem is that you use [] on your vector without using the sizing
constructor, resize, or push_back to actually increase the size of the
vector.
|
Java program crashing when it overwrites an existing .txt file? |
It seems all your GameSave methods are static, save for the closeFile
method. However all reference the same fields. Try make closeFile static.
It seems to reference static fields after all.
And of course, call it like the other methods, as in: GameSave.closeFile,
not someInstanceOfGameSave.closeFile.
Finally, if that doesn't work, add the line e.printStackTrace(); before
showing your message dialog and print the resulting stack trace as an edit
of your question.
Edit
Make sure you check for nulls in your closeFile method as well.
|
Program crashing on click of a button Android Error |
you have declared the onClick="findarea" propertis for your button. The
correct signature takes a view as paramter. Change
public void findarea(){
with
public void findarea(View view){
|
File.load() seemingly randomly crashing the program |
Solved this by using URLLoader instead:
var request:URLRequest = new URLRequest(file.nativePath);
var urlLoader:URLLoader = new URLLoader(request);
urlLoader.addEventListener(Event.COMPLETE, function
(event:Event):void {
var pathSplit:Array = file.nativePath.split(".tmp\",2);
var fileNamePath:String = pathSplit[1] as String;
zip.addFile(fileNamePath, event.target.data);
fileAddedToZip();
});
urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
urlLoader.load(request);
|
Android Program Error Connecting |
You want to use an AsyncTask for anything requiring a network connection.
You can setup your Async as follows: (This takes a String as a parameter
and returns an InputStream)
public class OpenHttpConnection extends AsyncTask<String, Void,
InputStream> {
@Override
protected String doInBackground(String... params) {
String urlstring = params[0];
InputStream in = null;
int response = 01;
URL url = new URL(urlString);
URLConnection conn = url.openConnection();
if (!(conn instanceof HttpURLConnection))
throw new IOException("Not an HTTP connection");
try{
HttpURLConnection httpConn = (HttpURLConnection) conn;
httpConn.setAllowUserInteraction(false);
httpConn.setInstanceFollowRedirects(true);
|
Java program is loading from system32 folder, not from folder, which it is placed |
My theory: if you installed Java for Windows via the traditional
installer, in addition to the place you told it to put it (canonically,
JAVA_HOME), the installer drops a java.exe in the system32 directory, so
it's likely that when you're starting the JVM on startup, system32 is the
working directory and that's where it will look for files with relative
path names like the one you've provided.
The easiest solution is to specify the path to the text file absolutely in
your code. I would also recommend specifying the full path to java.exe in
your registry key (I would guess that right now it's just java.exe with no
path) so that you can guarantee which version you're running; if you have
multiple versions of Java installed only the most recently one installed
will have java.exe in system3
|
Not connecting to database from local website |
First, ensure that the connection information is correct (server and
database name). Then make sure that 'Remote Connections' are enabled in
SQL.
Also, since it is .Net, you could grab a .Net decompiler (perform a Google
search) that will allow you to decompile the DLLs and view the most of the
source code. This is probably your last option, but would allow you to at
least view what the page is doing and gives you a starting point if you had
to redevelop the site.
|
Connecting to SQL Local Database using ConfigurationManager ASP.NET/C# |
You don't have a connection string named Database1, it's named
ConnectionString. Change your code to
ConnectionStrings["ConnectionString"].
UPDATE: looks like the OP already fixed that.
That error tends to indicate that your SQLEXPRESS instance isn't up and
running. Make sure the services are started and the server is running.
|
Error in connecting aspx.cs to database situated in app_data folder [database connection error] |
Have you tried localhost as opposed to (LocalDBv11.0), like this?
objconn.ConnectionString = "Data Source=localhost;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|test.mdf;User
Instance=true;user id=xyz; password=xyz123; Initial Catalog=TEST";
localhost will use TCP, while (LocalDBv11.0) will use Named Pipes
|
Can't run program after putting the compiled file to the folder |
You have several problems. First:
RUN=./dvoram64/main
$(RUN): $(Objects)
$(CC) $(CCFLAGS) $(Objects) -o $(RUN) $(LBFLAGS)
dvoram64/main: src/main.cpp
mkdir -p dvoram64
$(CC) $(CCFLAGS) -c src/main.cpp -o dvoram64/main
You have two rules for the same target(dvoram64/main). Which do you want to
use? Why do you have two? Remove one of them.
Next:
Objects=dvoram64/main
RUN=./dvoram64/main
$(RUN): $(Objects)
...
You have two variables for (essentially) the same thing, which is untidy
but not illegal. But You make one the prerequisite of the other. A thing
cannot be it's own prerequisite, and Make must correct the error for you.
You should rethink this.
Next:
RUN=./dvoram64/main
run: $(RUN)
$(RUN)
dvoram64/main: src/main.cpp
mkdir -p dvoram64
$(CC) $(CC
|
How can I make it so that a program runs when a folder is opened? |
This is just an idea (but more than a comment could handle).
Windows allows you to attach a thumbnail provider, which will generate
thumbnails for files. That's how softwares such as Microsoft Office,
LibreOffice, VLC etc. make explorer thumbnails for files.
You can use this API and define a thumbnail provider for a file type
invented by you, and put an empty file of that type in your folder. When
the user opens the folder, your code will be run to generate the thumbnail,
it can thus start another program (the one you want to start) and return a
failure code (so that no thumbnail is cached, and the code will be re-run
when the user re-opens the folder.
This only works starting from Windows Vista.
|
Python Tkinter Crashing, every run but program continues? Final polishing of Tkinter |
You need RotateNO to be a part of your class. Also zoom doesn't need to
take a zoom argument because you've already initialized self.Flag_Zoom.
Also change root.destroy() to Exe.destroy(). Try this:
# ---------- Imports ------------------------------------- #
from Tkinter import *
import matplotlib
import numpy as np
# ---------- Settings ------------------------------------ #
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg,
NavigationToolbar2TkAgg
# ---------- Classes ------------------------------------ #
class App(Frame):
def __init__(self,master=None):
Frame.__init__(self, master)
self._job = None
self.canvas = None
self.Flag_Zoom = False
self.pack()
self._GU
|
Jenkins - java.io.IOException: Cannot run program "/usr/local/bin/bash" |
say ls -l /usr/local/bin/bash on machine 1 to see if there's a symbolic
link from /usr/local/bin/bash to /bin/bash. if yes, then create the same
link on machine 2:
cd /usr/local/bin
ln -s /bin/bash .
|
Simple client server program with local IP address |
With Android and sockets you need to watch out for a few things
Android needs to be the client, since its IP address is expected to change
more frequently than that of the server
The port number you use should be > 1024
If on a emulator, you need to be aware that the emulator's IP is
10.something. Look up the Android documentation.
Permissions in the manifest
Lastly, your issue is that you are running a network api in the main UI
thread. You need to run the same in a Async task. Thats why you are getting
the StrictMode exception thingy.
Edit :
As for the ping, check if you can ping to your network router. And if you
can ping to the outside world then your issue is that your router is
blocking the ping inside.
|
Program received signal SIGSEGV, Segmentation fault (program runs out of stack.) |
The error is shown at this line:
long a = thread_fake(); //in file1.c
The likely way this could case a SIGSEGV is if your program has run out of
stack.
Examine actual crashing instruction in GDB with x/i $pc.
If the instruction is a PUSH, or a CALL, then my guess is confirmed.
Another possibility: you've compiled your code with optimization, and the
actual faulting instruction has little to do with the source line it is
attributed to.
Update:
Yes it gives a call call 0x804e580 <thread_fake>. What could be the
solution?
The solution is to not run out of stack. Execute a GDB where command, then,
in each frame leading to the crash, execute info frame and look for frames
that are excessively large.
Don't allocate too much data on stack, or increase your stack size (u
|
Java exceptions and program flow: how to know if the program will stop or continue after an exception is thrown? |
It isn't executed because uncaught exceptions terminate the current
thread(main thread in your case).
test() throws a RuntimeException. Surrounding test() with a try-catch would
catch the exception and allow your program to continue.
try {
test();
} catch(RuntimeException e) {
System.out.println("test() failed");
}
|
Program received signal SIGSEGV, segmentation fault, Linked list program |
You did not initialize numItems to zero. As unitialized it can be any
number, including e.g. negative ones. Because of this your list is not
created, hence pointer first points to NULL. Then the code segfaults in the
function deleteList, when it tries to free memory at location NULL.
|
Passing Data from a Java program to a Python program and getting results back |
Sounds like a job for Jython! Jython is an embeddedable Python runtime
written in Java. As long as you don't need to run your Python script in
another process (e.g., want to be able to kill it, may use lots of memory,
etc.), this is the best way by far.
|
permission and timeout issues connecting to local northwind database in C# entity data model |
Found a suggestion here by Peja Tao. Maybe that will help.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/8cdc71eb-6929-4ae8-a5a8-c1f461bd61b4/provider-sql-network-interfaces-error-26-error-locating-serverinstance-specified
|