Hi,
I have a folder named MyAppPortable
In this a folder MyApp and another Data.
In Data there is a folder Windows and a folder SysWOW64.
Each have a folder named MyFolder (same name, different content).
I have to copy MyFolder (not the content, the whole folder) in Windows dir and in Windows\SysWOW64 dir.
I have written:
!define SOURCEDIR1 "$EXEDIR\Data\Windows\MyFolder"
!define TARGETDIR1 "$WINDIR"
!define SOURCEDIR2 "$EXEDIR\Data\SysWOW64\MyFolder"
!define TARGETDIR2 "$WINDIR\SysWOW64"
Something is wrong, because I loose files, backup empty folder in wrong places and so on...
Thanks.
Error in path
10 posts
Probably related to 64-bit Windows and filesystem redirection but it is hard to tell without further information.
I don't understand...
I have simplified the code. That's ALL:
WindowIcon Off
SilentInstall Silent
AutoCloseWindow True
RequestExecutionLevel user
!define APP "Test"
OutFile "${APP}.exe"
Section "LAUNCH"
CopyFiles /SILENT "$EXEDIR\Text.txt" "$WINDIR"
ExecWait "$EXEDIR\notepad.exe"
SectionEnd
The file Text.txt IS NOT copied from the source directory to Windows...
Why???
I have simplified the code. That's ALL:
WindowIcon Off
SilentInstall Silent
AutoCloseWindow True
RequestExecutionLevel user
!define APP "Test"
OutFile "${APP}.exe"
Section "LAUNCH"
CopyFiles /SILENT "$EXEDIR\Text.txt" "$WINDIR"
ExecWait "$EXEDIR\notepad.exe"
SectionEnd
The file Text.txt IS NOT copied from the source directory to Windows...
Why???
You need RequestExecutionLevel Admin to copy to $windir.
Thanks.
Now works correctly, but everytime the launcher show the window to acquire admin rights...
Is possible avoid this? (giving implicit answer)?
Is possible avoid this? (giving implicit answer)?
No, of course not. The whole point of UAC is to stop random applications from writing to system locations.
But when I install a program, expecially if it is commencial, it writes in registry, Windows and other places, but not always ask for administrative privileges...
Is it possible?
Is it possible?
You can write a service that does it for you without elevation but I don't recommend that. Even apps with a service require elevation during their first install.
You are not supposed to write to $windir nor $sysdir anyway so it should not be an issue.
You are not supposed to write to $windir nor $sysdir anyway so it should not be an issue.
OK, Thanks.