Batch file and PKZIPC utility

I call a batch file from Oracle forms by clicking on a button. The batch file calls pkzipc utility to extract the contents of a zip file, and place it in the destination xyzfolder. However, this is not working.
The batch file and PKZIPC are located on the same server. When I run the batch file on the server, pkzipc utility works fine. When I call the batch file from Oracle forms, then the utilty is not working.
When-button-pressed trigger has the following code:
declare
the_command varchar2(2000) := '\\ABCserver\ABCfolder\abcd.bat';
begin
host(the_command);
message('done');
end;
batch file code :
cd "\\ABCserver\c$\Program Files\PKWARE\PKZIPC"
pkzipc -extract -silent -nofix -overwrite -directories -logfile \\ABCserver\c$\xyzfolder\26.zip \\ABCserver\c$\sssfolder
exit
How do I resolve this ?
Thanks
SR

The HOST command likely does not have permission to access a file across a network share. This is probably a Windows restriction and has nothing to do with Oracle. Windows Services do not have permission to access shares. Because Forms is a child process to OPMN (which run as a Win Service) the HOST executed from Forms is probably restricted too. For testing to prove this theory, put all the files on the Application Server and it will probably work correctly. Of course the batch code will need to be changed to reflect the local drive and directories.

Similar Messages

  • Remove odbc system dsn using batch file and odbcconf

    I create user system dsn entries by using a batch file and odbcconf call.  I've found references here on how to do that, yet cannot seem to find any results on how to remove them using that same call.  The library information (http://msdn.microsoft.com/en-us/library/ee388579(VS.85).aspx) states add and modify a system dsn for configdsn and configsysdsn and references equivalent to SQLConfgDataSource function. (http://msdn.microsoft.com/en-us/library/ms716476(VS.85).aspx) but the config data source function has a a removal and this doesn't seem too. 
    Apologies for being obtuse, but I can't seem to locate it.  Any links to how this is done from a batch file are much appreciated.
    Regards,
    NR.

    John C is basically correct, you can remove a System ODBC data source via the registry, but there is apparently no way via odbcconf.exe.  That is of course really stupid and poor programming!
    John, however, forgot another important registry entry.  That key deletion he mentioned will disable the odbc connection, but not remove it entirely.  If you just do that and then open the "ODBC Data Source Administrator", you will find the
    connection is still listed, but you can't remove it or modify it.  It becomes completely screwed up! There is a value to delete as well which dictates if the connection is listed.  Consider it the "header" to the data source.
    Also, in Windows 2003 and 2008 at least, the registry key John C listed is not quite the location to modify either.  This is where to find them in those OSs:
    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\%DSN%
    or
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\%DSN%
    The "header" I reffered to is a string value in inside a key (not the whole key!)
    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources
    or
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources
    The string value is the data source name.  This entry must be removed to remove the data source listing entirely.
    Here are some batch snipets for creating and then removing an odbc data source.  I'm leaving out some premiliary chunks, but you can figure it out from here. If you can't, you probably shouldn't be messing with this stuff in the first place!
    In these scripts, I create and remove a 32-bit data source in either a 32-bit or 64-bit version of windows.  The windows folder variable gets set to either "C:\Windows\System32" or "C:\Windows\SysWOW64" depending on the os.  In case you didn't
    know, on a 64-bit machine there is are also 2 differrent versions of the "ODBC Data Source Administrator" gui tool and the data source lists differ (32-bit vs 64-bit lists).  The 32-bit version on a 64 bit OS is found at "C:\Windows\SysWOW64\odbcad32.exe". 
    The one in the start menu will load the 64-bit version so you will never find your 32-bit connections there.
    Note - for simplicity I use the database name as the user name and and the data source name as well (in case there was any confusion). 
    Create the connection like so:
    echo Creating 32-Bit System ODBC Connection "%DatabaseName%"...
    "!WindowsFolder!\ODBCCONF.EXE" CONFIGSYSDSN "!ODBCDriver!" "DSN=%DatabaseName%;Server=localhost;Port=3306;Database=%DatabaseName%;UID=%DatabaseName%;PWD=%DatabasePassword%"
    And then remove it like this:
    echo Removing 32-Bit System ODBC Connection "%DatabaseName%"...
    if "%WindowsBits%"=="32" (
    If Exist "!TempRegFile!" Del "!TempRegFile!"
    echo Windows Registry Editor Version 5.00>>"!TempRegFile!"
    echo.>>"!TempRegFile!"
    echo [-HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\%DatabaseName%]>>"!TempRegFile!"
    echo [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]>>"!TempRegFile!"
    echo "%DatabaseName%"=->>"!TempRegFile!"
    regedit /s "!TempRegFile!"
    ) else (
    If Exist "!TempRegFile!" Del "!TempRegFile!"
    echo Windows Registry Editor Version 5.00>>"!TempRegFile!"
    echo.>>"!TempRegFile!"
    echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\%DatabaseName%]>>"!TempRegFile!"
    echo [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources]>>"!TempRegFile!"
    echo "%DatabaseName%"=->>"!TempRegFile!"
    regedit /s "!TempRegFile!"
    If Exist "!TempRegFile!" Del "!TempRegFile!"

  • Installing Oracle 11gR2 client from a batch file and it returns before done

    Hello,
    While installing Oracle 11gR2 client on XP and 7 from a batch file. When it launches the OUI from the batch file, it returns to the batch file before the installer finishes. So, there is no way for my script to know when the installer is done, or to glean a return code to test for success. This is particularly annoying...
    I've also used the "call" command to force my batch file to wait, to no avail. Anyone have any clues about this one?
    Thanks in advance!
    --Robert                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Srini,
    Awesome! Worked like a charm.
    Many thanks!
    --Robert                                                                                                                                                                                               

  • Two questions: Executing batch files and executing a JAR on boot-up.

    I'm working with Windows XP and and currently I'm having a friend test this on Vista as well. I can't seem to find how to execute a batch file using Runtime.exec(). So far I've been passing the absolute pathname of the batch file as the argument to exec(), but it doens't seem to run, so I'm assuming there's another way.
    Second question, how do I get a JAR file to start running whenever the user turns on the PC?
    Thanks.

    I'm working with Windows XP and and currently I'm
    having a friend test this on Vista as well. I can't
    seem to find how to execute a batch file using
    Runtime.exec(). So far I've been passing the
    absolute pathname of the batch file as the argument
    to exec(), but it doens't seem to run, so I'm
    assuming there's another way.Are you using just Runtime.exec() or have you tried Runtime.getRuntime().exec()? If not, try that and see what happens.
    Second question, how do I get a JAR file to start
    running whenever the user turns on the PC?As far as I know, you can't do that programatically. You have to edit settings on your computer but I am not entirely sure.
    Thanks.

  • How do I start a batch file and check it's status?

    First of all I want to say I am a beginner in Java.
    I am working on an server side application that starts batch files (for database filling). After it starts the batch (.bat) file it has to check the status and write it in the database.
    The problem I run into the combination of starting the batch and checking the status.
    So far I have found out that I can run the batch file with starting up an process with the Runtime.getRuntime().exec command. What I haven't found out if it is posible to check the status of this proces in any way.
    I also found out that with using thread commands like isAlive I can check the status of a thread, but not of an process. And I understand that a thread can't start an batch file.
    So could anyone please help me on my way. Am I doing something wrong? Is any of the above info incorrect? Or am I on the right way? And if I am on the right way what is the next step? Thanx in advance.

    The problem I run into the combination of starting
    the batch and checking the status.The exit status is only set onve the process completes.
    process.exitStatus()
    I also found out that with using thread commands like
    isAlive I can check the status of a thread, but not
    of an process. And I understand that a thread can't
    start an batch file.Everything run in java is run from a thread. Only threads can do anything. The default thread is called "main"

  • Cfexecute, batch file, and a ftp script

    I have a batch file which works fine when entered in at the
    command prompt;
    C:/temp/mybat.bat
    but when I use cfexecute it fails.
    Now this may be more of a case of what I am calling than CF
    itself.
    here is the output:
    C:\CFusionMX7\runtime\bin>"C:\Program
    Files\Ipswitch\WS_FTP Professional\ftpscrpt" -f
    C:\temp\poolsite.scp Processing Line 1 [CONNECT pacmed -p] Finding
    Host poolsite... Address lookup of "poolsite" failed. It may be
    misspelled, or your computer may not be connected to the network or
    Internet. Also check that your DNS and local name servers are
    properly configured and responding. Failure in command [CONNECT
    poolsite-p] Processing Line 2 [ONSUCCESS SHELL C:/temp/remove.bat]
    Set [ONSUCCESS] action to [SHELL C:/temp/remove.bat] Processing
    Line 3 [MPUT c:/temp/apptTxfr/*.*] Not Connected Failure in command
    [MPUT c:/temp/apptTxfr/*.*] C:\CFusionMX7\runtime\bin>ECHO OFF
    the very odd thing, is again, when I call this from a command
    line, it works fine.
    are there any wrappers or special ways I need to encapsulate
    this when using cfexecute?

    Thank you for the suggestions. The odd thing though, is it
    looks like it calling the batch file just fine. It's just that for
    whatever reason, the ftp client isn't getting fed the paramters
    correctly. Ie
    Processing Line 1 [CONNECT poolsite-p] Finding Host
    poolsite...
    passing -p tells the ftp client to use a prefdefined site
    profile (poolsite), instead of using the hostname poolsite.
    Basically it is if for whatever reason the ftp program is not
    reading it''s scp file correctly when invoked from CF.
    I'll check out the permissions and report back.
    thanks for the suggestion.

  • Batch file, and installing a executable​.

    I'm pretty new to LabVIEW.  Anyways, I need to create a makefile that will install the LabVIEW runtime engine, and several LabVIEW user created executable VIs into specific directories determined by environmental variables within the makefile.  I've been looking around, and all I can find is batch file stuff.  Any ideas would be appreciated.  Thanks.
    In short, I need LabVIEW RTE, and several labVIEW created executables installed on target machine via a makefile.
    Sebastian 

    Todd has pointed you in the correct direction.
    I tested this with an LV2009 installer that does not contain the LVRTE. I do not use make files (not a C coder) but think they may run applications like a batch file (if not, use a batch file).
    1. Create the installer for your LV app and point the top level to install in single generic folder (c:\temp).
    2. Include the other executables you mentioned as line items.
    3. Run the installer locally to generate a installation spec file: 'setup.exe /generatespecfile myspec.ini'
        (The only question I noted was about the install folder which I set to #INSTALL_FOLDER#)
    4. Open the generated 'myspec.ini' file and find the 'set install directories' area and you should find:
            <RootDirectory1>=#INSTALL_FOLDER#.
    5. For my confirmation test, I changed this to 'c:\testInstall'.
    6. Run the installer using the updated spec file (add the later parts for auto install; for silent, use just /q):
              'setup.exe myspec.ini /qb /acceptlicenses yes'
    From your makefile (or batch file), you should be able to update the #INSTALL_FOLDER# string in the intermediate spec file (myspec.ini) to the contents of the environment variable you want by simple string replacement then run the installer as shown in (6).
    good luck

  • Brain freeze with batch file and jar

    My batch file located in the startup folder.
    @ECHO ON
    Set Path =C:\Program Files\My-App\jre\bin
    cd C:\Program Files\My-App
    javaw -cp C:\Program Files\My-App\Startup.jar; SrvcUtilTest
    EXITthe error I get is "Could Not Find Main Class. Program will exit"
    If I take the Set Path line out it works fine, but my customers will not have the JRE installed on their systems,so I set the path to the jre included with my app..
    What am I missing or forgeting to do.
    What am I missing

    Nevermind, fixed it.
    Moved the jar into the startup folder, added a manifest file and changed this line
    javaw -cp C:\Program Files\My-App\Startup.jar; SrvcUtilTest
    to
    javaw -jar Startup.jar
    Works now

  • Diference between a batch file and jnlp file

    Dear all,
    I have a question that might sound simple, but excuse me, coz I am new to jnlp.
    I run my appliction using a simple batch file:
    set JAVA_HOME=C:\j2sdk1.4.2_05
    @set RUN=%JAVA_HOME%\bin\java.exe -Xms32m -Xmx128m -classpath .;myapp.jar pack.app.Main -connection jdbc:oracle:thin:@10.0.0.1:1521:ABC -webroot http://10.0.0.2:8080/test
    %RUN%
    The jnlp file I use to start the same application is:
    <jnlp codebase="http://10.0.0.2:8080/test/app">
    <information>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.4+"/>
    <jar href="myapp.jar"/>
    </resources>
    <application-desc main-class="pack.app.Main ">
    <argument>-codebase</argument>
    <argument>http://10.0.0.2:8080/test/app</argument>
    <argument>-webroot</argument>
    <argument>http://10.0.0.2:8080/test</argument>
    <argument>-dbrpc</argument>
    </application-desc>
    </jnlp>
    I encountered two problems:
    1. The aplication hangs when I click certain buttons, which is not the case when I run it normally from the batch file.
    2. Some buttons do not even appear, where they appear normally using the batch file.
    I would appreciate any hints that could help.
    Samar

    You could make a self extracting EXE with WinZip, and then do something like..  (You would create an application with source files to do this, with the below code being your 'install.bat')
    @echo off
    xcopy "AppFiles.exe" %WINDIR%\Temp
    %WINDIR%\Temp\AppFiles.exe
    %WINDIR%\Temp\AppFiles\Install.exe
    RMDIR /S /Q %WINDIR%\Temp\AppFiles
    If you monitor the install and your satisfied its working correctly, you can modify the success return codes under the 'Option' tab, or just check the box 'Continue on Error' to keep the build rolling after this install is complete.  Additionally, you
    may find this works better as VBS script.

  • Batch File and MaxL Script

    I have a MaxL script that exports level0 data from various cubes. I have a batch file to call that script at daily intervals.
    I want to name the output something different each day (preferably NAMEmmdd type format). I realize I can add a rename or move to the batch but wonder if there is a MaxL method that will allow me to export to a different name?
    Current MaxL is simply
    export database APP.DB level0 data to data_file "'$Arborpath\am1119.txt'";
    Ideas or direction to go to learn answer?
    T,
    J

    Hi,
    You can pass in variables into maxl, so you the calling batch file can pass in a variable which holds the filename with the current day...
    For example you have a batch file
    essmsh c:\temp\export.mxl 'C:\temp\output%DATE:~3,2%%DATE:~0,2%.txt'
    If that was run today it would pass in 'C:\temp\output1118.txt
    Now in your maxl you just reference the variable with
    export database sample.basic level0 data to data_file $1;
    the $1 relates to the variable which was passed in, the 1 being the position it was passed in.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Batch file and JSP

    how can i call a batch file from JSP ??? possible ?

    'tis possible, but not recommended.
    You can use java.lang.Runtime.exec() method
    Read all about it here: http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Note that this will run a batch file on the server - not on the client machine.

  • DOS Window automaticly close after execute the batch file and start the App

    Hi, all. I have made a batch file. When I start the batch file, thet is getting open the DOS Window. But I want close the DOS Window after Start the Application, or make it hidden?
    It is possible?
    Thanks all:-)
    Nikolay

    Hi,my batch file is:
    java -cp File.jar Desktop
    I have tryaed with:
    javaw -cp File.jar Desktop , but it dosn�t close the DOS Window.
    Have I make anythink false?
    Thanks.
    Nikolay

  • MDT Application - Running a batch file and copy file locally without absolute path??

    I have an application defined in MDT along with its respective files. One of these files is an install and needs to be run locally. How do I copy this file locally then have it run? I've used a fair amount of batch scripts so I opted for that, but every
    batch script I get (even empty ones or one with just an exit) returns code 1. If I enter in cmd /c directly in the command line with the commands separated by && it would not work either.
    I DO not want to hardcode any IP into this which is why this is so hard. Is there no way to do this easily without a full \\IPADDY\Share?

    You could make a self extracting EXE with WinZip, and then do something like..  (You would create an application with source files to do this, with the below code being your 'install.bat')
    @echo off
    xcopy "AppFiles.exe" %WINDIR%\Temp
    %WINDIR%\Temp\AppFiles.exe
    %WINDIR%\Temp\AppFiles\Install.exe
    RMDIR /S /Q %WINDIR%\Temp\AppFiles
    If you monitor the install and your satisfied its working correctly, you can modify the success return codes under the 'Option' tab, or just check the box 'Continue on Error' to keep the build rolling after this install is complete.  Additionally, you
    may find this works better as VBS script.

  • Alias Files and Disk Utility Repairs

    Hey there,
    I recently moved a whole lot of movie files from iTunes on to my harddrive, they are no longer on the computer, however the space that they were previously taking up has not been reduced.  I found that there were " alias " files that only appeared under All My Files.  These alias files for the movies I removed cannot be opened, as the original file is not there, and cannot be moved or deleted.  I ran Disk Utility verification to try and fix the problem and came back with some issues:
    Volume bitmap needs minor repair for orphaned blocks.
    Invalid free block count.
    The volume Macintosh HD was found corrupt and needs to be repaired.
    I followed the prompts, restarting my computer and holding down command and R and opening Disk Utility and running disk verification and repair, coming abck with no problems and this restarting the computer again.  However once I had done so, I found the alias files still to be stuck, and running the disk verification and repair AGAIN it's still corrupt and repair just comes back with
    The disk "Macintosh HD" could not be unmounted.
    Any suggestions?
    Thanks, Connie
      I press Delete Alias and it just reappears.
      I followed the repair prompts and these issues still appear.

    Some are movie files, some are documents, some are backups of documents, some are music files.
    The only options that appear when right click are :
    > Open
    > Open enclosing folder
    [does nothing]
    > Get Info
    > Quick Look

  • Batch file and popupmessage do not execute

    Hi,
    I installed TestStand 4.1 on my PC.  Prior to this TestStand 3.5 was resident.
    There seem to be a few glitches, namely when i run the step types messagepopup and callexecutable nothing happens.  They appear to run but the executable is not called and the message does not pop up.
    I tried the messagepopup example and noticed that the types were different, namely my type is messagePopup_2 and the examples type is messagePopup.  I can copy and paste from the example to my sequence and it works fine.
    The problem is I cannot find an example for callexceutable.  I know i have dine it correctly as I create and execute the same sequence on another pc.  It's also worrying as I odn't want to find further done the line that I have to recode a whole pile of the sequence.
    Anyone any ideas?
    TIA,
    Sean

    Hi Sean,
    There is a tool called  TestStand Type Differ tool
    This threads could be also interresting for you 
    http://forums.ni.com/ni/board/message?board.id=330&message.id=17427#M17427
    http://forums.ni.com/ni/board/message?board.id=330&message.id=17797&query.id=1970961#M17797
    regards
    juergen
    Message Edited by j_dodek on 08-11-2009 01:07 AM
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

Maybe you are looking for

  • Terminating event -- No active receiver found

    Hi -- on an Integration project I just need a workitem that stays active until explicitly closed via an event.. It's easy enough to create a triggering event which starts a process. I've followed all the rules (as far as I can see) to create a termin

  • AIR 4 SDK and asdoc

    Am loosing just too much time to figure out how the hell to get the AIR 4 sdk asdoc to work. The lack of documentation, instructions from Adobe is getting overwhelming... This is just unbelivable how a company can release a product without any docume

  • Import 3D Objects - CS5

    I've seen a few older posts on the subject of importing 3D objects into AE but none specifically speaking to CS5 and any new capabilities.  The developer of Bluff Titler asked the question on what formats could be exported from Bluff Titler so that u

  • About execute java procedure in C#

    Hello, I have create java class in oracle lite, and the procedure is ok, I have use the sytax "select procedure_name from dual" to execute my procedure successfully, My question is how can I execute it in C#, and my procedure may have array paramente

  • Invoking call back functions

    Hi there, While a client can invoke server side functions on the bean, is there anyway we can invoke a client side function (call back) from the bean itself?