[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

a .bat file that executes a program on my XP does not work when copied to another computer using Vista

Posted on 2008-10-03
2
Medium Priority
?
176 Views
Last Modified: 2010-04-16
SET AUSER=c:\ADVANT\DATA\
SET AFILES=c:\ADVANT\SYS\
Here is the batch file and program:

SET APROGS=c:\ADVANT\PROGS\
DEL c:\!\*.htm
c:
CD \ADVANT\PROGS
DEL STMTS?.KST
ADV < SCRPTGEN.KST
TYPE STMTS1.KST | T TRIMR > STMTS2.KST
ADV < STMTS2.KST
0
Comment
Question by:BDEVLINsr
1 Comment
 
LVL 24

Accepted Solution

by:
DMTechGrooup earned 2000 total points
ID: 22638086
The batch file needs permissions as admin to run so if UAC is on you get access denied.. if you run it as a admin then by default it runs from the c:\windows\system32.

I ran into this problem when was trying to copy stuff using a batch file.  You would probably be better off running it as a vbs or you need to run as an admin and then add more solid file locations

so instead of CD \ADVANT\PROGS you put del c:\ADVANT\PROGS\STMTS?.KST

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question