PDA

View Full Version : Using Batch files



NewsArchive
05-22-2014, 01:09 AM
After the compilation I want to automatically run a batch file that copies
the compiled install file to my dropbox on another local pc. Batch file is
fine but how do I run that in SM8?
Thanks
Nev

NewsArchive
05-22-2014, 01:10 AM
Nev,

> After the compilation I want to automatically run a batch file that copies
> the compiled install file to my dropbox on another local pc. Batch file is
> fine but how do I run that in SM8?

I'd love to help but what the heck is SM8?

Try the Compiler Directive, #run with the Process after script
compilation option. Assuming you're using SB8!<g>

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Creative Reporting: http://www.CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
05-22-2014, 01:10 AM
Thanks Lee. I have dyslexic kebyorad like JP.
Nev

NewsArchive
05-22-2014, 01:11 AM
Nev,

> After the compilation I want to automatically run a batch file that copies
> the compiled install file to my dropbox on another local pc. Batch file is
> fine but how do I run that in SM8?

Just add a "#run..." compiler directive with "Process after script
compilation" enabled. Don't forget to use cmd /c to execute the batch file
and put double-quotes around long file names (see attached screenshot).

Friedrich

NewsArchive
05-22-2014, 06:01 AM
BTW, what Lee said <bg>

Friedrich

NewsArchive
05-23-2014, 01:36 AM
Friedrich,

> BTW, what Lee said <bg>

But you said it better and included a picture!<g>

Lee White

NewsArchive
05-23-2014, 01:36 AM
Thanks Guys. That worked well copying to dropbox on local machine but does
not like copying over the network. 'Cannot find Drive' message. The batch
file if executed by itself works fine. Any ideas?
Nev

NewsArchive
05-23-2014, 01:36 AM
Nev,

> Thanks Guys. That worked well copying to dropbox on local machine but does
> not like copying over the network. 'Cannot find Drive' message. The batch
> file if executed by itself works fine. Any ideas?

Perhaps the typical mapped drive issue (that's by Windows design)? IMO, you
have mapped the drive in the elevated user context but the IDE/compiler runs
(by default) non-elevated. Similar to this:

http://www.lindersoft.com/forums/showthread.php?t=31410

Friedrich

NewsArchive
05-23-2014, 03:04 AM
Thanks Friedrich.
I've logged on as Admin, Started SB8 to run as admin. I mapped the drives as
admin, wrote the batch file with Notepad as admin. I'm thinking it is easier
to just run the batch files as it is a faster.
Nev

NewsArchive
05-23-2014, 03:04 AM
Nev,

> I've logged on as Admin, Started SB8 to run as admin. I mapped the drives
> as admin, wrote the batch file with Notepad as admin. I'm thinking it is
> easier to just run the batch files as it is a faster.

If I were you, I would map the drive in the current user context and you are
done. If you get 'Cannot find Drive' from a non-elevated running batch then
you mapped the drive in the wrong user context. That's by UAC design and a
permanent Windows change (Vista+).

Friedrich

NewsArchive
05-23-2014, 06:41 AM
Gotcha!

Neville Wright