Execute or copy a file from a share
Execute or copy a file from a share
I have a problem : I would like to deploy a software from a shared folder (not the OPSI share) but I always have an error.
I tried :
- WinBatch : \\ip-share\folder\exe.exe
- Files : "copy \\ip-share\folder\exe.exe C:\" and after in WinBatch "C:\exe.exe"
And same from a x: network drive
Is it possible to do it or am I force to store my executable in the same folder than my *.ins script ?
Re: Execute or copy a file from a share
Have you checked that the pcpatch user has access to the mentioned share? Always look from the pcpatch user's point of view, not from your viewpoint or the user that is logged in into the target host.Zakyl hat geschrieben: I have a problem : I would like to deploy a software from a shared folder (not the OPSI share) but I always have an error.
I tried :
- WinBatch : \\ip-share\folder\exe.exe
- Files : "copy \\ip-share\folder\exe.exe C:\" and after in WinBatch "C:\exe.exe"
And same from a x: network drive
Re: Execute or copy a file from a share

How can I add the pcpatch user on my windows server share folder ? Did I need to add the OPSI server in the Windows domain ?
Re: Execute or copy a file from a share
try adding the user, e.g. with same credentials. hth, lorenzoZakyl hat geschrieben: How can I add the pcpatch user on my windows server share folder ? Did I need to add the OPSI server in the Windows domain ?
Re: Execute or copy a file from a share
Re: Execute or copy a file from a share
- When I run the script locally with Winst, a windows appear with "execute" or "cancel" buttons. So I can execute my bat script. But I have that error message :
Code: Alles auswählen
[5] [avr. 22 10:14:25:190] Execution of WinBatch_install
[6] [avr. 22 10:14:25:190] Call "\\ip\test\test.bat"
[6] [avr. 22 10:14:25:190] Waiting until the called process is finished
[4] [avr. 22 10:14:25:190] winbatch call of not executable file: \\ip\test\test.bat is deprecated
Code: Alles auswählen
[5] [avr. 22 10:17:44:668] [test] Execution of WinBatch_install
[6] [avr. 22 10:17:44:678] [test] Call "\\ip\test\test.bat"
[6] [avr. 22 10:17:44:678] [test] Waiting until the called process is finished
[6] [avr. 22 10:17:44:678] [test] Start process as invoker: pcpatch
[3] [avr. 22 10:17:44:688] [test] Exception in StartProcess_cp: Failed to execute \\ip\test\test.bat : 1326
It's deprecated, so I tried DosBatch :
- When I try with the DosBatch, I have that error in log :
Code: Alles auswählen
[5] [avr. 22 10:19:57:831] [test] 3 DosBatch_install
[6] [avr. 22 10:19:57:831] [test] c:\opsi.org\tmp\_winstbat_1.bat saved back
[6] [avr. 22 10:19:57:831] [test] Executing "cmd.exe" /C "c:\opsi.org\tmp\_winstbat_1.bat"
[6] [avr. 22 10:19:57:860] [test] ExitCode 1
[6] [avr. 22 10:19:57:870] [test] Delete "c:\opsi.org\tmp\_winstbat_*"
[6] [avr. 22 10:19:57:870] [test] Search "c:\opsi.org\tmp\"
[6] [avr. 22 10:19:57:870] [test] File "c:\opsi.org\tmp\_winstbat_1.bat"
[6] [avr. 22 10:19:57:870] [test] The file has been deleted
Code: Alles auswählen
@echo off
"\\ip\test\test.bat"
pause
Logon failure : Unknow user name or wrong password
Re: Execute or copy a file from a share
I think you have to use 'net mount' to mount the share before you can execute a file on a share.
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: Execute or copy a file from a share

Just one more question : How can I hide the "cmd" windows when the script runs ?
(Because I "/delete" the network drive before to mount it. But if it not exist, I have the "cmd" windows with the error. The end of the script is executing without problem)
Re: Execute or copy a file from a share
try to to use a 'DosInAnIcon' Sektion ..
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: Execute or copy a file from a share
