Loading ...
Sorry, an error occurred while loading the content.

Re: [BATCH WORLD] Accessing a shared file within a bat file

Expand Messages
  • Gary Kuznitz
    Thanks for the reply. ... It did work when I had it configured with a mapped drive. It doesn t work now when I m signed on with the user SCANS. ... I m using
    Message 1 of 9 , May 5, 2008
    • 0 Attachment
      Thanks for the reply.

      On 2 May 2008 at 18:35, foxidrive (foxidrive <batchworld@yahoogroups.com>) commented about Re: [BATCH WORLD] Accessing a share:
      > On Thu, 01 May 2008 22:16:46 -0700, "Gary Kuznitz" <docfxit@...>
      > wrote:
      >
      > >I'm having a problem running a bat file in XP Pro. I'm running it with:
      > >
      > >RUNRMTCMD CMD('C:\BATCH\SCAN.BAT 00155900000.TIF') RMTLOCNAME('192.168.1.4'
      > >*IP) RMTUSER('B') RMTPWD(hidden) The above command is run from computer A on
      > >computer B.
      > >
      > >The bat file that runs on computer B looks like this:
      > >C:\Batch\hstart.exe /NOWINDOW /D=C:\PROGRA~1\IRFANVIEW
      > >"C:\PROGRA~1\IRFANVIEW\I_VIEW32 \\Atu1277\SCANS\%1"
      > >
      > >The above is on one line.
      > >
      > >The error I get is:
      > >
      > >\\Atu1277\SCANS\00155900000.TIF : Can't read file header !
      > >Unknown file format or file not found.
      > >
      > >At that point the program I_view32 is still up and running. It was called with
      > >a user (SCANS) that is not signed on. If I click on Open and navigate to the
      > >same file it works just fine.
      >
      > Does it work if the user SCANS is signed on?
      It did work when I had it configured with a mapped drive. It doesn't work now
      when I'm signed on with the user SCANS.

      > >What could I be doing wrong?
      > >The folder SCANS is shared. Is there something special I need to do to access
      > >as shared file within a bat file?
      >
      > If I recall correctly the default system account does not have network
      > access.

      I'm using the SCANS user account not the guest account. SCANS has
      Administrator privileges.

      Maybe network access has something to do with it. Do you know how to fix that?

      Thank you,

      Gary Kuznitz
    • foxidrive
      On Mon, 05 May 2008 19:26:04 -0700, Gary Kuznitz ... As it worked with a mapped drive then perhaps irfanview doesn t grok UNC paths.
      Message 2 of 9 , May 6, 2008
      • 0 Attachment
        On Mon, 05 May 2008 19:26:04 -0700, "Gary Kuznitz" <docfxit@...>
        wrote:

        >> >I'm having a problem running a bat file in XP Pro. I'm running it with:
        >> >
        >> >RUNRMTCMD CMD('C:\BATCH\SCAN.BAT 00155900000.TIF') RMTLOCNAME('192.168.1.4'
        >> >*IP) RMTUSER('B') RMTPWD(hidden) The above command is run from computer A on
        >> >computer B.
        >> >
        >> >The bat file that runs on computer B looks like this:
        >> >C:\Batch\hstart.exe /NOWINDOW /D=C:\PROGRA~1\IRFANVIEW
        >> >"C:\PROGRA~1\IRFANVIEW\I_VIEW32 \\Atu1277\SCANS\%1"
        >> >
        >> >The above is on one line.
        >> >
        >> >The error I get is:
        >> >
        >> >\\Atu1277\SCANS\00155900000.TIF : Can't read file header !
        >> >Unknown file format or file not found.

        As it worked with a mapped drive then perhaps irfanview doesn't grok UNC
        paths.

        Try just the batch

        "C:\PROGRA~1\IRFANVIEW\I_VIEW32 \\Atu1277\SCANS\%1"

        on a local machine and see if it has the same issue.
      • Gary Kuznitz
        Thanks for the reply. ... It has the same error. I looked into your suggestion of maybe the network is not available to a user that is not logged in. Someone
        Message 3 of 9 , May 6, 2008
        • 0 Attachment
          Thanks for the reply.

          On 6 May 2008 at 19:38, foxidrive (foxidrive <batchworld@yahoogroups.com>) commented about Re: [BATCH WORLD] Accessing a shared file within :

          > On Mon, 05 May 2008 19:26:04 -0700, "Gary Kuznitz" <docfxit@...>
          > wrote:
          >
          > >> >I'm having a problem running a bat file in XP Pro. I'm running it with:
          > >> >
          > >> >RUNRMTCMD CMD('C:\BATCH\SCAN.BAT 00155900000.TIF') RMTLOCNAME('192.168.1.4'
          > >> >*IP) RMTUSER('B') RMTPWD(hidden) The above command is run from computer A on
          > >> >computer B.
          > >> >
          > >> >The bat file that runs on computer B looks like this:
          > >> >C:\Batch\hstart.exe /NOWINDOW /D=C:\PROGRA~1\IRFANVIEW
          > >> >"C:\PROGRA~1\IRFANVIEW\I_VIEW32 \\Atu1277\SCANS\%1"
          > >> >
          > >> >The above is on one line.
          > >> >
          > >> >The error I get is:
          > >> >
          > >> >\\Atu1277\SCANS\00155900000.TIF : Can't read file header !
          > >> >Unknown file format or file not found.
          >
          > As it worked with a mapped drive then perhaps irfanview doesn't grok UNC
          > paths.
          >
          > Try just the batch
          >
          > "C:\PROGRA~1\IRFANVIEW\I_VIEW32 \\Atu1277\SCANS\%1"
          >
          > on a local machine and see if it has the same issue.

          It has the same error.

          I looked into your suggestion of maybe the network is not available to a user
          that is not logged in. Someone else had a solution. I adapted it to this
          install and ran a test with this bat file:

          Start of bat file:
          ::ListScansFiles -- this script will list the files from L: drive.
          ::
          @echo off
          SETLOCAL ENABLEEXTENSIONS
          SETLOCAL ENABLEDELAYEDEXPANSION
          echo execution of ListScansFiles started %date%-%time% >>
          C:\SCRATCH\ListScansFiles.log
          net use L: \\ATU1277\Scans <password> /user:b persistance=no
          L:
          cd \
          for %%F in (*.*) do (
          echo ***** %%~nxF Exist in L:\ >> C:\SCRATCH\ListScansFiles.log *****
          )
          echo execution of ListScansFiles ended %date%-%time% >>
          C:\SCRATCH\ListScansFiles.log
          C:
          net use L: /delete
          exit
          End of Bat file. If a line starts in Column one it wrapped.

          I expected it to list all the files in \\ATU1277\Scans.
          Instead it listed all the files on the C: drive of the local machine.

          This is only meant for a test to see if I can connect to the network.

          Any ideas why it didn't list the network drive?

          Thank you,

          Gary Kuznitz
        • foxidrive
          On Tue, 06 May 2008 13:30:10 -0700, Gary Kuznitz ... Your command syntax looks to be wrong. /PERSISTENT:NO NET USE [devicename | *]
          Message 4 of 9 , May 6, 2008
          • 0 Attachment
            On Tue, 06 May 2008 13:30:10 -0700, "Gary Kuznitz" <docfxit@...>
            wrote:

            > net use L: \\ATU1277\Scans <password> /user:b persistance=no

            Your command syntax looks to be wrong.


            /PERSISTENT:NO





            NET USE
            [devicename | *] [\\computername\sharename[\volume] [password | *]]
            [/USER:[domainname\]username]
            [/USER:[dotted domain name\]username]
            [/USER:[username@dotted domain name]
            [/SMARTCARD]
            [/SAVECRED]
            [[/DELETE] | [/PERSISTENT:{YES | NO}]]

            NET USE {devicename | *} [password | *] /HOME

            NET USE [/PERSISTENT:{YES | NO}]
          Your message has been successfully submitted and would be delivered to recipients shortly.