Hi!
I have a problem, when i am copiing a file from the opsiserver to a client PC.
I wrote a simple script:
[Initial]
ScriptErrorMessages=on
[Actions]
Message "Copying program"
DefVar $InterestingFile$
set $InterestingFile$ = "\\%opsiServer%\opt_pcbin\text.txt"
if not (FileExists($InterestingFile$))
comment "The file does not exist"
else
comment "Copying file(s)..."
Files_copy
endif
[Files_copy]
copy "\\%opsiServer%\opt_pcbin\text.txt" "c:\temp\"
I have 4 client: 2 xp and 2 win7 . On the client, that has win7 the script is working fine. But the 2 xps i get an error messages:
[2012.01.11. 11:51:12] ============ Version 4.11.1.6 WIN32 script "p:\newhege\setup.ins"
[1] [2012.01.11. 11:51:12] start: 2012-01-11 11:51:12
[1] [2012.01.11. 11:51:12] on client named "z75db.kdb.hu"
[1] [2012.01.11. 11:51:12] loggedin user ""
[1] [2012.01.11. 11:51:12] winst running as "pcpatch"
[1] [2012.01.11. 11:51:12] winst running with admin privileges
[1] [2012.01.11. 11:51:12] [executing: "C:\Program Files\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"]
[1] [2012.01.11. 11:51:12] system infos:
[1] [2012.01.11. 11:51:12] 00-0B-CD-04-2E-AC - PC hardware address
[1] [2012.01.11. 11:51:12] z75db.kdb.hu - IP name
[1] [2012.01.11. 11:51:12] 192.168.100.112 - IP address
[1] [2012.01.11. 11:51:12] HUN - System default locale
[1] [2012.01.11. 11:51:12] opsi service version : 4
[1] [2012.01.11. 11:51:12]
[6] [2012.01.11. 11:51:12] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion] opened
[6] [2012.01.11. 11:51:12] Key closed
[5] [2012.01.11. 11:51:12] message Installation of Kincsem
[5] [2012.01.11. 11:51:12]
[5] [2012.01.11. 11:51:12] Set $InterestingFile$ = "\\192.168.100.116\opt_pcbin\text.txt"
[6] [2012.01.11. 11:51:12] The value of the variable "$InterestingFile$" is now: "\\192.168.100.116\opt_pcbin\text.txt"
[5] [2012.01.11. 11:51:12]
[5] [2012.01.11. 11:51:12] If
[6] [2012.01.11. 11:51:12] Starting query if file exist ...
[5] [2012.01.11. 11:51:12] "\\192.168.100.116\opt_pcbin\text.txt": File Error 5 (Access denied
)
[5] [2012.01.11. 11:51:12] FileExists($InterestingFile$) <<< result false
[5] [2012.01.11. 11:51:12] not (FileExists($InterestingFile$)) <<< result true
[5] [2012.01.11. 11:51:12] Then
[5] [2012.01.11. 11:51:12] comment: The file does not exist
[5] [2012.01.11. 11:51:12]
[5] [2012.01.11. 11:51:12] Else
[5] [2012.01.11. 11:51:12] EndIf
And the win7 log(where working fine):
1] [2012.01.11. 11:46:03] ============ Version 4.11.1.6 WIN32 script "p:\newhege\setup.ins"
[1] [2012.01.11. 11:46:03] start: 2012-01-11 11:46:03
[1] [2012.01.11. 11:46:03] on client named "hp13211.kdb.hu"
[1] [2012.01.11. 11:46:03] loggedin user "hege"
[1] [2012.01.11. 11:46:03] winst running as "SYSTEM"
[1] [2012.01.11. 11:46:03] winst running with admin privileges
[1] [2012.01.11. 11:46:03] [executing: "C:\Program Files\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"]
[1] [2012.01.11. 11:46:03] system infos:
[1] [2012.01.11. 11:46:03] 00-0F-FE-C1-45-57 - PC hardware address
[1] [2012.01.11. 11:46:03] hp13211.kdb.hu - IP name
[1] [2012.01.11. 11:46:03] 192.168.100.249 - IP address
[1] [2012.01.11. 11:46:03] HUN - System default locale
[1] [2012.01.11. 11:46:03] opsi service version : 4
[1] [2012.01.11. 11:46:03]
[6] [2012.01.11. 11:46:03] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion] opened
[6] [2012.01.11. 11:46:03] Key closed
[5] [2012.01.11. 11:46:03] message Installation of Kincsem
[5] [2012.01.11. 11:46:03]
[5] [2012.01.11. 11:46:03] Set $InterestingFile$ = "\\192.168.100.116\opt_pcbin\text.txt"
[6] [2012.01.11. 11:46:03] The value of the variable "$InterestingFile$" is now: "\\192.168.100.116\opt_pcbin\text.txt"
[5] [2012.01.11. 11:46:03]
[5] [2012.01.11. 11:46:03] If
[6] [2012.01.11. 11:46:03] Starting query if file exist ...
[5] [2012.01.11. 11:46:03] FileExists($InterestingFile$) <<< result true
[5] [2012.01.11. 11:46:03] not (FileExists($InterestingFile$)) <<< result false
[5] [2012.01.11. 11:46:03] Then
[5] [2012.01.11. 11:46:03]
[5] [2012.01.11. 11:46:03] Else
[5] [2012.01.11. 11:46:03] comment: Copying file(s)...
[5] [2012.01.11. 11:46:03]
[5] [2012.01.11. 11:46:03] Execution of Files_copy
[6] [2012.01.11. 11:46:03] Copying \\192.168.100.116\opt_pcbin\text.txt -----> C:\temp\
[5] [2012.01.11. 11:46:03] 1 File(s) found
[6] [2012.01.11. 11:46:03] Source \\192.168.100.116\opt_pcbin\text.txt
[6] [2012.01.11. 11:46:03] \\192.168.100.116\opt_pcbin\text.txt copied to C:\temp\
[5] [2012.01.11. 11:46:03] 1 File(s) treated
[5] [2012.01.11. 11:46:03] EndIf
Thank You!
File copy error
Re: File copy error
Hi,
do not use \\server\share
try something like
does this help ?
regards
d.oertel
do not use \\server\share
try something like
Code: Alles auswählen
set $InterestingFile$ = "%ScriptPath%\..\text.txt"
regards
d.oertel
Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.
Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.
uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de
Re: File copy error
Thank You very much! Its working!d.oertel hat geschrieben:Hi,
do not use \\server\share
try something like
does this help ?Code: Alles auswählen
set $InterestingFile$ = "%ScriptPath%\..\text.txt"
regards
d.oertel