Computer Hope
Microsoft => Microsoft DOS => Topic started by: accessman on October 22, 2009, 12:47:41 PM
-
Hi
Somebody please help me! I need to be able to run the attached, 'RunAsDate.exe' using a batch file(s). The help file shows how to do this but I cannot get it to work.
RunAsDate.exe {/immediate} {/movetime} [dd\mm\yyyy] {hh:mm:ss} [Program
to run] {Program parameters}
Examples:
RunAsDate.exe 22\10\2002 12:35:22 "C:\Program Files\Microsoft
Office\OFFICE11\OUTLOOK.EXE"
RunAsDate.exe 14\02\2005 "c:\temp\myprogram.exe" param1 param2
RunAsDate.exe /movetime 11\08\2004 16:21:42 "C:\Program Files\Microsoft
Office\OFFICE11\OUTLOOK.EXE"
My knowledge of DOS/Batch is pretty basic but I have tried all day with this as a line in a batch file, changing various things, searching google etc. The main sticking point seems to be the date and the variables, but if anyone can help me get this command to work that would be great. I would need to be able to set and call the dates/parameters from some other file or process as I'm trying to integrate this into an Access based overnight reporting system, and if required the database time needs to be changed without affecting the windows system time.
Many thanks for any help. ???
[Saving space, attachment deleted by admin]
-
Maybe you could describe what you are doing, and what errors you are getting, because I just tried it and it worked fine.
I put this line in a batch file and it started Frontpage
RunAsDate.exe 22\10\2002 12:35:22 "C:\Program Files\Microsoft Office\Office10\FRONTPG.EXE"
-
accessman,
Welcome to CH.
Have you read the documentation?
The example you gave is wrong.
-
If I start it with 'RunAsDate.exe' it does nothing. If I put the whole path to where it is saved inside double quotes, it then seems to get past that to the date as it comes up with a message box saying 'Invalid Date!'. After clicking OK to the message it then just opens 'RunAsDate.exe' as the program itself.
I did read the documentation but I'm only starting to learn these commands and what I know is very basic. The examples were just the examples in the readme file. Maybe I am not reading it right??
To put it all into context, an IT dept have decided they are going to remove admin rights to Windows on the network for all users in the company. For some people this is probably a good idea but they refuse to have exceptions, which for me is insane. For most people they won't know any different but our reporting team runs databases overnight and if they crash we still need to be able to change the database time, without touching the windows clock etc. as we will not now be able to.
I hope this helps..
Cheers
-
Please post EXACTLY what command lines and batch code you are using.
-
At work it's for XP, but Vista at home. Same problems though. Now it doesn't even seem to do anything at all. I'm totally confused. I put the text below into a text file and changed the extension to make it a .bat file.
"C:\Users\Neil\Documents\_Applications And System\runasdate\RunAsDate.exe" 21\10\2009 15:30:05 "C:\Program Files\Microsoft Office\Office11\EXCEL.EXE"
-
I copied the target from a shortcut created by the program into a new text file, renamed it with .bat and it worked first time. It has worked every time since as well. I'm stumped but relieved?!?! Thanks for the responses anyhow and I hope this thread helps anyone else who needs it. Doesn't make any sense, but hey it has worked..
-
To put it all into context, an IT dept have decided they are going to remove admin rights to Windows on the network for all users in the company.
They're in charge of that for a reason. Are you trying to circumvent their authority?
Explain to them this:
Our reporting team runs databases overnight and if they crash we still need to be able to change the database time, without touching the windows clock etc. as we will not now be able to.
If they don't agree, go up the ladder until someone does.
-
Mate, I know and we're laying it all down and presenting issues and options. Our days of freedom and creativity are being replaced by distant checking and authorisation after a restructure. We are contractors and the setup is deliberately designed so that in the end we have to just get on with it. (Wait until a problem affects the bottom line). It's a recipe for disaster and very difficult to get the seriousness of it across.
It's to administer our own databases when we need to and won't affect Windows itself. They are being told about it and will hopefully see sense and agree to it.
-
While you can, now is the time to look into...
getting a new job somewhere else.
-
Already am... :)
-
in the 1980s I knew a guy who ran a circuit simulator on a VAX mini where he worked, they had to set the system date year back to 1986 because the trial period had run out...
-
Nothing like that going on with this. If it all sounds like b******t it's because it is. The problem, not the solution I might add..
-
I know that is old.
But is unsolved. So the answer is:
@ECHO OFF
cd "C:\Users\Neil\Documents\_Applications And System\runasdate\"
RunAsDate.exe /immediate 21\10\2009 15:30:05 "C:\Program Files\Microsoft Office\Office11\EXCEL.EXE"
exit
Past the code on notepad and save as .bat
Tested with:
Windows 7 x64
RunAsDate 1.16 (32 bit)
-
I'm speechless...