Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Imbedding a username and password in a bat file  (Read 4173 times)

0 Members and 1 Guest are viewing this topic.

muneesh dhingra

  • Guest
Imbedding a username and password in a bat file
« on: August 12, 2004, 12:47:45 PM »
I am executign a bat file that will zip contents to of a local folder to a remote server.  

The task doesn't complete, so I think I need to pass a username and password in the bat file that will grant access to the folder.  Does anyone know how to do this.

Below is the code for the bat file I am using.

c:
cd\
cd program files\winzip\
winzip32.exe -a \\142.123.45.67\Backup\3422.zip D:\Backup\3422
Del D:\Backup\3422
rem pause

Thanks


johnwill

  • Guest
Re: Imbedding a username and password in a bat fil
« Reply #1 on: August 12, 2004, 02:36:54 PM »
What happens when you manually type the commands?  That will guide you in figuring out what you need to put in the batch file.

muneesh Dhingra

  • Guest
Re: Imbedding a username and password in a bat fil
« Reply #2 on: August 13, 2004, 07:20:30 AM »
Good thought.  When I manually type it it works fine.  What I am doing is calling this bat file in SQL SERVER.  I created a DTS package and the package runs the bat file.  When I execute the package it runs fine.  When I schedule the package, it uses a SQLSERVERAGENT account to run the package, that is when it fails, so I was thinking by imbedding the connection and username and password intot he bat it might work, but thinking loudly about it now, I don't think so.  

I have to find another way

johnwill

  • Guest
Re: Imbedding a username and password in a bat fil
« Reply #3 on: August 13, 2004, 07:31:37 AM »
Look at AutoIt http://www.autoitscript.com/autoit3/, it's my solution to these kinds of issues. :)