Archive: Work with $DOCUMENTS


Work with $DOCUMENTS
As the thread title says, my installer works with the $DOCUMENT folder by extracting some files there and starting an program afterwards (detected by reading the registry) wich is working with the installed files.
But the program always says "fail".
So i tried the UAC plugin. No change.
i did set __COMPAT_LAYER env-var for the installer and program started by it only. Still no change.
i even tried to add "ELEVATECREATEPROCESS" to the corresponding registry keys. But still no change.
i can call the prog without problems using java and "state.gThread = new GameEXEThread(cmds);".
But i don't want to use java but only NSiS instead.

Anyone having an idea what i'm doing wrong?


<insert Guess/Observation>I think it has something to do with executing the program after installation since it was spawned from the original process tree.</insert>

I personally try to avoid executing the program after installation as it typically will retain the rights of the installer and is not always desirable.


i tried to start the program on it's own and with set admin rights but still no change.
i know a java program that starts the same prog with the above mentioned command and it works like a charm.
But due to the fact that i don't want to force the user to have java installed, i thought there is a pure NSiS solution.


Is this the error your getting?

http://colinnewell.files.wordpress.c...-assistant.pngImage Source


do you have RequestExecutionLevel in your script?


@Zinthose:
Nope. The prog just says "failed to install". No UAC or other Windows based message.
it's installing out of $DOCUMENTS by default so there's no way i can change it.

@Anders:
Yep and it's set to user, which is needed when using the UAC plugin.


are you adding uninstall registry keys?


No, because they are not needed.
But i don't think this would solve my problem.


No, because they are not needed.
But i don't think this would solve my problem.
I think you are wrong about this. Here is what MSDN has to say about the Program Compatibility Assistant (PCA)
The logic used by PCA is to detect if a setup did not complete successfully. It monitors a program detected as setup by Windows Vista and Windows Server 2008 and checks whether the program registers an entry in Add or Remove Programs (ARP). If no entries are created in ARP, PCA concludes that the installer did not complete successfully. It will then wait for the install program to terminate before displaying the UI. If it is an uninstaller, the detection looks for whether an entry was deleted from ARP.
The UI it refers to is similar to the screenshot Zinthose supplied. See Application Compatibility: Program Compatibility Assistant (PCA):

http://msdn.microsoft.com/en-us/library/bb756937.aspx

Erm... i don't have this problem.
The installation finishes successfull.
But i start a program which is detected by it's registry entry.
This program is meant to import the installed files into the detected program by calling it using the right parameters.
But the program says fail when trying to import the files that was placed in $DOCUMENTS using NSiS.
if i start this program using a java program it works just perfect by using the command mentioned in my first post.

And no, there's no way to force the program to import the files from a different directory and that's the problem.


Erm... i don't have this problem.
Sorry, I didn't notice your earlier Nope. The prog just says "failed to install" reply.

Originally posted by CG!
Erm... i don't have this problem.
But i start a program which is detected by it's registry entry.
This program is meant to import the installed files into the detected program by calling it using the right parameters.
But the program says fail when trying to import the files that was placed in $DOCUMENTS using NSiS.
if i start this program using a java program it works just perfect by using the command mentioned in my first post.
I don't know what the hell you are even talking about. Could you explain a little better? Is this "program" written in NSIS?

I agree with Anders. CG!, please try to rephrase what you want to accomplish, what you have, and what you need.


OK. Sorry for my bad explanation trys but as all of you can see, english is not my native language.
i'll try to explain how it works step-by-step.

1. NSiS installs files to $DOCUMENTS\Program\Plugins
2. NSiS starts the local software (found using the registry)
3. the started software accesses $DOCUMENTS\Program\Plugins
4. the software tries to install the Plugins
5. the software tells the user that it failed installing

A similar fan-made program, that is written in java, uses the in the first post mentioned command and it works.
if i start the program myself (with admin rights), it fails.
if i use the NSiS UAC plugin, it fails too.
Same if i set the __COMPAT_LAYER variable and the corresponding registry keys to elevate the process.

Hope i could make things more clear now.


And sorry for the late answer, but i switched my iSP and it didn't works as seemless as planed because my old iSP dc'ed me 5 days to earlie.
Sorry again, but sh... things happen.