Datei ins Benutzerprofil kopieren

Post Reply
patrick.grebe
Posts: 20
Joined: 18. Feb 2016, 06:51
Contact:

Datei ins Benutzerprofil kopieren

Post by patrick.grebe » 10. Jan 2018, 17:20

Hallo zusammen,

ich bin kurz vorm verzweifeln.
Ich versuche eine Datei mittels "1:" ins Benutzerprofil des aktuellen Benutzers zu kopieren, dies funktioniert allerdings nicht. Gebe ich stattdessen einen statischen Pfad ein, funktioniert das kopieren. :roll:

Verwenden tue ich folgenden Befehl:

Code: Select all

1:Licenses\MI1000\IT53TS.AmpereSoftLicense,		%UserProfile%, 		CLIENT,		0
Habt ihr eine Idee woran das liegen könnte? Der Flag "/AW" ist auch gesetzt und der Client angemeldet.

Vielen Dank im Voraus!

Code: Select all

[SetupInfo]
Author                  =
CreationDate            =10.01.2018 14:30:00
InventoryID             =
Description             =
Method                  =Unattended
Tested on               =
Dependencies            =
Command line options    =/AW
Last Change             =
Build                   =

[VarDefInfo]
; <Variable>, <Type: 0=Computer 1=User>, <Allow NULL values: 0=No 1=Yes>

[Setup]
Version=14.2
ShowCaption=1
BlockInput=0
Platform=*

[Requirements]

[Application]
ProductName=AmpereSoft
DeveloperName=Hensel SAS-Konfiguratior License
Version=1.0
Revision=0
SetupName=%Packagename% %SetupWizard%
Text1="%Packagename%", Arial, 28, , FFFFFF, 25#, 25#, LEFT BOLD
BackgroundColor=333333,ffffff
Logo=Logo.bmp, -25#, -25#, 0, 0, FFFFFF, TRANSPARENT
UninstallDisplayIcon=%App%\%SetupInfDir%\Setup.ico,0
UserKeyName=%DeveloperName%\%ProductName%
MachineKeyName=%DeveloperName%\%ProductName%\%Version%
UninstallKeyName=%DeveloperName% %ProductName% %Version%
UninstallDisplayName=%ProductName% %Version%
UninstallString=%ReinstallString% /U
ReinstallString="%CommonSetupDir%\Setup.exe" "%App%\%SetupInfDir%\Setup.inf"
ReinstallMode=1
SrcDir=..
ApplicationDir=%ProgramFilesDir%\%ProductName%
SetupInfDir=Install
DataDir=%Personal%
AskUninstallOld=1
ShellLinks=1
CommonShellLinks=1
CreateUnresolvableShellLinks=1
UseStringSection=Strings:09
UseSysStringSection=SysStrings:09
DateWarning=1
SizeWarning=1
Reboot=0
PreventExternalReboot=1
StartServicesOnReboot=0
CallTimeOut=3600
AbortAfterCallTimeOut=1
DisableCancelButton=1
ShowEndMessage=1
EndMessage=%EndMessageDesc%
HideUninstall=1

[Strings:07]
Disk1=Installationsmedium 1
EndMessageDesc=Die Installation wurde erfolgreich abgeschlossen!
ErrorLogMessage=Die Installation/Deinstallation wurde mit einer Fehlermeldung abgebrochen!
InstallationFor=Installation für:
InstallerDesc=Dienstprogramm zum Installieren einzelner Komponenten.
InstallerName=Installationsprogramm
SetupWizard=Installations-Assistent
Uninstallation=deinstallieren
ErrorText=Fehler
CallingText=beim Aufruf von

[Strings:09]
Disk1=Installation media 1
EndMessageDesc=Installation was completed successfully!
ErrorLogMessage=The installation/uninstallation aborted with an error message!
InstallationFor=Installation for:
InstallerDesc=Service program to install single components.
InstallerName=Setup program
SetupWizard=Installation Wizard
Uninstallation=Uninstallation
ErrorText=Error
CallingText=launching

[SysStrings:07]
Users=Benutzer

[SysStrings:09]
Users=Users

[Environment]

CommonSetupDir=%CommonFilesDir%\Setup%SetupBits%
V_MachineValuesPath=\\%EmpirumServer%\Values$\MachineValues\%DomainName%

; Maschinenabhängige Variablen
; machine dependent variables
;VM_<Variable>=%%%V_MachineValuesPath%\%ComputerName%.ini,%ComputerName%,<Variable>%%

; Userabhängige Variablen
; user dependent variables
;VU_<Variable>=%%%V_UserValuesPath%\%WindowsUser%.ini,%WindowsUser%,<Variable>%%

; !!! Setzen der entsprechenden ReplaceEnv Befehle für die Variablen im Abschnitt [Product] nicht vergessen!!!
; !!! Don't forget to set the appropriate ReplaceEnv instructions for the variables in the section [Product]!!!

[Encryption]

[Disks]
1=%Disk1%

[Options]
Installer = %InstallerName%, COPYALWAYS, Installer, "%InstallerDesc%"
Product   = %ProductName%,   COPYALWAYS, Product,   "%ProductDesc%"

[OptionDependencies]

[OptionGroups]

[Installer]
1:..\..\..\..\User\Setup.exe,          %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupDeu.chm,       %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupEnu.chm,       %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\Mx42SynSem.dll,     %System%,         OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP WINDOWS32, 0
1:..\..\..\..\User\x64\Mx42SynSem.dll, %System%,         OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP WINDOWS64, 0
1:%SetupInfDir%\Setup.inf,                             , NORMAL,                                             0
1:%Temp%\Setup64.exe,                  %CommonSetupDir%\Setup.exe, OPTIONAL NOSIZEWARNING SETUP ALWAYS WINDOWS64,      0

[FileCheckMachine]
ReplaceEnv V_MachineValuesPath
If DoesFileExist ("%V_MachineValuesPath%\%ComputerName%.ini") == "0" Then "FileIsntThere" EndIf

[FileCheckClient]
ReplaceEnv V_UserValuesPath
If "%UserDomain%" <> "%ComputerName%" Then "CheckClientFile" EndIf

[CheckClientFile]
If DoesFileExist ("%V_UserValuesPath%\%WindowsUser%.ini") == "0" Then "FileIsntThere" EndIf

[FileIsntThere]
ErrorLogMsg Values$\MachineValues\%DomainName%\%ComputerName%.ini or Values$\UserValues\%UserDomain%\%WindowsUser%.ini not found!
Abort

[Product]
#Set:Product
#Set:Installation, DONTDELETE
#Set:Deinstallation, DELETE
#Reg:OnUninstallProduct, DELETE
#Reg:Product
#Ini:Product
#Security:Product

[Set:Product]

1:Licenses\MI1000\IT53TS.AmpereSoftLicense,		%UserProfile%, 		CLIENT,		0

[Set:Installation]

[SET:Deinstallation]

[Reg:OnUninstallProduct]

[Reg:Product]

[Ini:Product]

[Security:Product]

[Shell:Product]

[SET:InstallationError]
ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% setup.exe
Abort

[SET:DeInstallationError]
-Abort
-ErrorLogMsg %ErrorText% %ErrorLevel% %CallingText% MsiExec.exe

User avatar
Hendrik_Ambrosius
Moderator
Moderator
Posts: 8090
Joined: 13. Dec 2004, 23:10
Location: Adendorf/Lüneburg

Re: Datei ins Benutzerprofil kopieren

Post by Hendrik_Ambrosius » 10. Jan 2018, 18:33

Hendrik Ambrosius / Senior Presales Consultant
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 GmbH | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com

Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 or of the support team.

patrick.grebe
Posts: 20
Joined: 18. Feb 2016, 06:51
Contact:

Re: Datei ins Benutzerprofil kopieren

Post by patrick.grebe » 10. Jan 2018, 20:42

Vielen Dank. Den Denkanstoß habe ich gebraucht, stand völlig auf dem Schlauch.
Untenstehend meine Setup.inf, welche nun funktioniert. Für den Fall das andere vor dem selben Problem stehen.

Code: Select all

[SetupInfo]
Author                  =
CreationDate            =10.01.2018 20:35:43
InventoryID             =
Description             =
Method                  =
Tested on               =
Dependencies            =
Command line options    =/AW /S0 
Last Change             =
Build                   =

[VarDefInfo]
; <Variable>, <Type: 0=Computer 1=User>, <Allow NULL values: 0=No 1=Yes>

[Setup]
Version=14.2
ShowCaption=1
BlockInput=0
Platform=*

[Requirements]

[Application]
ProductName=MyCompany License
DeveloperName=Programmer
Version=1.0
Revision=0
SetupName=%Packagename% %SetupWizard%
Text1="%Packagename%", Arial, 28, , FFFFFF, 25#, 25#, LEFT BOLD
BackgroundColor=333333,ffffff
Logo=Logo.bmp, -25#, -25#, 0, 0, FFFFFF, TRANSPARENT
UninstallDisplayIcon=%App%\%SetupInfDir%\Setup.ico,0
UserKeyName=%DeveloperName%\%ProductName%
MachineKeyName=%DeveloperName%\%ProductName%\%Version%
UninstallKeyName=%DeveloperName% %ProductName% %Version%
UninstallDisplayName=%ProductName% %Version%
UninstallString=%ReinstallString% /U
ReinstallString="%CommonSetupDir%\Setup.exe" "%App%\%SetupInfDir%\Setup.inf"
ReinstallMode=1
SrcDir=..
ApplicationDir=%ProgramFilesDir%\%DeveloperName%
SetupInfDir=Install
DataDir=%Personal%
AskUninstallOld=1
ShellLinks=1
CommonShellLinks=1
CreateUnresolvableShellLinks=1
UseStringSection=Strings:09
UseSysStringSection=SysStrings:09
DateWarning=1
SizeWarning=0
Reboot=0
PreventExternalReboot=1
StartServicesOnReboot=0
CallTimeOut=3600
AbortAfterCallTimeOut=1
DisableCancelButton=1
ShowEndMessage=1
EndMessage=%EndMessageDesc%
HideUninstall=1


[Strings:07]
Disk1=Installationsmedium 1
EndMessageDesc=Die Installation wurde erfolgreich abgeschlossen!
ErrorLogMessage=Die Installation/Deinstallation wurde mit einer Fehlermeldung abgebrochen!
InstallationFor=Installation für:
InstallerDesc=Dienstprogramm zum Installieren einzelner Komponenten.
InstallerName=Installationsprogramm
SetupWizard=Installations-Assistent
Uninstallation=deinstallieren
ErrorText=Fehler
CallingText=beim Aufruf von

[Strings:09]
Disk1=Installation media 1
EndMessageDesc=Installation was completed successfully!
ErrorLogMessage=The installation/uninstallation aborted with an error message!
InstallationFor=Installation for:
InstallerDesc=Service program to install single components.
InstallerName=Setup program
SetupWizard=Installation Wizard
Uninstallation=Uninstallation
ErrorText=Error
CallingText=launching

[SysStrings:07]
Users=Benutzer

[SysStrings:09]
Users=Users

[Environment]
CommonSetupDir=%CommonFilesDir%\Setup%SetupBits%
V_MachineValuesPath=\\%EmpirumServer%\Values$\MachineValues\%DomainName%
V_UserValuesPath=%HKLM,"Software\matrix42\Software Depot","HomeServer"%\Values$\UserValues\%UserDomain%

; Maschinenabhängige Variablen
; machine dependent variables
;VM_<Variable>=%%%V_MachineValuesPath%\%ComputerName%.ini,%ComputerName%,<Variable>%%

; Userabhängige Variablen
; user dependent variables
;VU_<Variable>=%%%V_UserValuesPath%\%WindowsUser%.ini,%WindowsUser%,<Variable>%%

; !!! Setzen der entsprechenden ReplaceEnv Befehle für die Variablen im Abschnitt [Product] nicht vergessen!!!
; !!! Don't forget to set the appropriate ReplaceEnv instructions for the variables in the section [Product]!!!

[Encryption]

[Disks]
1=%Disk1%

[Options]
Installer = %InstallerName%, COPYALWAYS, Installer, "%InstallerDesc%"
Product   = %ProductName%,   COPYALWAYS, Product,   "%ProductDesc%"

[Installer]
1:..\..\..\..\User\Setup.exe,          %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupDeu.chm,       %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:..\..\..\..\User\SetupEnu.chm,       %CommonSetupDir%, OPTIONAL USEFILENAME DIRECTORY NOSIZEWARNING SETUP, 0
1:%SetupInfDir%\Setup.inf,                             , NORMAL,                                             0
1:%Temp%\Setup64.exe,                  %CommonSetupDir%\Setup.exe, OPTIONAL NOSIZEWARNING SETUP ALWAYS WINDOWS64,      0

[FileCheckMachine]
ReplaceEnv V_MachineValuesPath
If DoesFileExist ("%V_MachineValuesPath%\%ComputerName%.ini") == "0" Then "FileIsntThere" EndIf

[FileCheckClient]
ReplaceEnv V_UserValuesPath
If "%UserDomain%" <> "%ComputerName%" Then "CheckClientFile" EndIf

[CheckClientFile]
If DoesFileExist ("%V_UserValuesPath%\%WindowsUser%.ini") == "0" Then "FileIsntThere" EndIf

[FileIsntThere]
ErrorLogMsg Values$\MachineValues\%DomainName%\%ComputerName%.ini or Values$\UserValues\%UserDomain%\%WindowsUser%.ini not found!
Abort

[Product]
;#FileCheckMachine, MACHINE
;#FileCheckClient, CLIENT
;ReplaceEnv <Variable>

#Set:Installer
#Set:Product
#Set:Installation, DONTDELETE
#Set:Deinstallation, DELETE
#Reg:OnUninstallProduct, DELETE
#Reg:Product
#Ini:Product
#Security:Product

[Set:Installer]
1:Licenses\MI1000\%ComputerName%.Lic, , NORMAL, 0

[Set:Product]
if DoesPathExist ("%userprofile%\Documents\LicCompany License") == "1" then "NoFolderRedirection" else "FolderRedirection" Endif 

[NoFolderRedirection]
1:Licenses\MI1000\%ComputerName%.Lic,   "%userprofile%\Documents\LicCompany License\%ComputerName%.Lic", CLIENT ALWAYS, 0

[FolderRedirection]
1:Licenses\MI1000\%ComputerName%.Lic,   \\san_manage_srv\user\%username%\Documents\LicCompany License\%ComputerName%.Lic, CLIENT ALWAYS, 0

[Set:Installation]

[Set:Deinstallation]

[Set:Deinstallation2]

[Reg:OnUninstallProduct]

[Reg:Product]

[Ini:Product]

[Security:Product]

[Shell:Product]

[Set:InstallationError]

[Set:DeInstallationError]

Post Reply

Return to “Paketierung”

Who is online

Users browsing this forum: No registered users and 3 guests