The last line does not save the date.
Can someone help?
I save date (after truncating the weekday)
Then Change Date
Finally, I want to reset date to original.
Thanks.
Cd C:\Program Files\Microsoft Office\Office12\
set currentsysdate=%date:~-10%
Date = 02-02-11
Start /max /wait WINWORD.EXE
Set Date = CurrentSysDate
Save, Change then Rest Date to Saved Date
Moderator: DosItHelp
Re: Save, Change then Rest Date to Saved Date
The command to change the system date is not date = ... and also not set date = .... It's simply date ....
On Win7 you have to run the batch as administrator, normal clients have no rights to change the system date.
Regards
aGerman
Code: Select all
Cd "C:\Program Files\Microsoft Office\Office12"
set "CurrentSysDate=%date:~-10%"
Date 02-02-11
Start /max /wait WINWORD.EXE
Date %CurrentSysDate%
On Win7 you have to run the batch as administrator, normal clients have no rights to change the system date.
Regards
aGerman
-
- Posts: 5
- Joined: 20 Feb 2011 12:39
Re: Save, Change then Rest Date to Saved Date
Thank you.
Your code worked great.
theMathProf
Your code worked great.
theMathProf