1.

Solve : Imbedding a username and password in a bat file?

Answer»

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

What happens when you manually type the commands?  That will guide you in figuring out what you need to put in the batch file.
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 wayLook at AutoIt http://www.autoitscript.com/autoit3/, it's my SOLUTION to these kinds of issues.



Discussion

No Comment Found