Execute or copy a file from a share
Execute or copy a file from a share
Hi !
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 ?
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
Thank you for this tip
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 ?
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
Did I need to add the pcpatch group and the adminuser user ? Or is it only the pcpatch user who intervenes in the package installation processus ?
Re: Execute or copy a file from a share
I also have an error with Winbatch section :
- 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 :
- When I run the script from the web interface, I have an error in the log :
It's deprecated, so I tried DosBatch :
- When I try with the DosBatch, I have that error in log :
In my DosBatch section, I did :
And I have that error in my cmd windows : (with pcpatch user and password on the computer)
Logon failure : Unknow user name or wrong password
- 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
Hi,
I think you have to use 'net mount' to mount the share before you can execute a file on a share.
regards
d.oertel
I think you have to use 'net mount' to mount the share before you can execute a file on a share.
regards
d.oertel
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
Re: Execute or copy a file from a share
I was doing that when you post it ! It works, thanks
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)
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
Hi,
try to to use a 'DosInAnIcon' Sektion ..
regards
d.oertel
try to to use a 'DosInAnIcon' Sektion ..
regards
d.oertel
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
Re: Execute or copy a file from a share
There is still a cmd Windows open but no messages ! If it can't do better, thanks