Thanks for your comments.
I can see it's going to be difficult and I don't think I'll get much
cooperation from the computer admin team.
Having successfully run AutoIT to perform these actions during work hours, I
know that a GUI environment works perfectly but cannot get the Novell logoff
disabled.
I am wondering whether I might use task scheduler to run reglar routines
such as opeing and then shutting a program every 5 minutes or so just to keep
the computer busy to stop it logging off?
However, if the key times for running the routines to save my files are on
the hour until about 5 past the hour it's going to mean setting up alot of
task schedules between hr+ 5 min and hour -5 min 0900 until 22:00 Mon-Sun -
just to keep from logging off. Do you think this might work?
I just assumed that as batch files could run when a computer is logged off,
this would be the best way of solving the problem.
Many thanks
"Newbie Coder" wrote:
> Zakynthos,
>
> If you run this during logoff/shutdown etc you will halt the process
>
> Windows uses the WM_QUERYENDSESSION message & that is where you have to run
> what you need to do.
>
> The only way I can see you getting around the problem is to see if the
> administrators will allow you to run a unique VBS, but don't forget that
> opening a DB that has received the above Windows Message will be impossible
> because the DLLs won't initilise...
>
> Another way around it is to trap the above Windows Message, remove the
> SE_SHUTDOWN_PRIVILEGE do your work & then re-enable the privilege to enable
> logoff/shutdown. That is extremely simple itself, but whether you'll have
> the security permissions is another thing. In code access security you could
> punch it through though, but as you have said you are a beginner when it
> comes to VB so, you will find it difficult
>
> What the other user said abour renaming an Excel spreadsheet... isn't going
> to work running a built in VBA macro unless you create a new file because
> with the document open you will have locked the write access & you'll get
> its in use by another process error
>
> The easiest way for you around it is for the admins to write you a script to
> run at logoff
>
> Hope this helps,
>
> --
> Newbie Coder
> (It's just a name)
>
>
>
>
> "Zakynthos" <(E-Mail Removed)> wrote in message
> news:8D20C49D-7E10-4BCF-8143-(E-Mail Removed)...
> > I am a complete beginner to batch files altough I have a little knowledge
> of
> > Visual Basic. Having successfully used AutoIT, which is a GUI based
> program
> > to achieve what I have set out below, I have found it will not work 24/7
> > because of Novell autologoff - I cannot get this disabled for security
> > reasons.
> >
> > I want to be able to write a .bat file to work when the computer is logged
> > off via Novell security to:
> >
> > open a real time database program called 'Pulse'
> > save this as an html file
> > open this file with Excel
> > save the Excel file every hour between 0900 until 22:00 Monday through
> Sunday.
> >
> > Assuming the program was in C:\programs as 'Pulse.exe and the destination
> > path was Y:\reports\Mon etc
> >
> > What would be the batch file code to save the file there as '0900Mon' etc
> etc?
> >
> > Many thanks
> >
>
>
>
|