|
... and don't try asking again tomorrow.
|
|
|
|
|
I'm writing a batch file and I need to generate yesterdays date. Any ideas how to do it?
|
|
|
|
|
|
Thanks, except I don't have a subscription to it I guess since all the answers are fuzzy.
|
|
|
|
|
Here is the accepted solution. Good luck.
Here's a batch file I developed to subtract any number of days from the current date. It accepts a command line parameter of the number of days. The default is 1 day (yesterday):
@echo off
set yyyy=
set $tok=1-3
for /f "tokens=1 delims=.:/-, " %%u in ('date /t') do set $d1=%%u
if "%$d1:~0,1%" GTR "9" set $tok=2-4
for /f "tokens=%$tok% delims=.:/-, " %%u in ('date /t') do (
for /f "skip=1 tokens=2-4 delims=/-,()." %%x in ('echo.^|date') do (
set %%x=%%u
set %%y=%%v
set %%z=%%w
set $d1=
set $tok=))
if "%yyyy%"=="" set yyyy=%yy%
if /I %yyyy% LSS 100 set /A yyyy=2000 + 1%yyyy% - 100
set CurDate=%mm%/%dd%/%yyyy%
set dayCnt=%1
if "%dayCnt%"=="" set dayCnt=1
REM Substract your days here
set /A dd=1%dd% - 100 - %dayCnt%
set /A mm=1%mm% - 100
:CHKDAY
if /I %dd% GTR 0 goto DONE
set /A mm=%mm% - 1
if /I %mm% GTR 0 goto ADJUSTDAY
set /A mm=12
set /A yyyy=%yyyy% - 1
:ADJUSTDAY
if %mm%==1 goto SET31
if %mm%==2 goto LEAPCHK
if %mm%==3 goto SET31
if %mm%==4 goto SET30
if %mm%==5 goto SET31
if %mm%==6 goto SET30
if %mm%==7 goto SET31
if %mm%==8 goto SET31
if %mm%==9 goto SET30
if %mm%==10 goto SET31
if %mm%==11 goto SET30
REM ** Month 12 falls through
:SET31
set /A dd=31 + %dd%
goto CHKDAY
:SET30
set /A dd=30 + %dd%
goto CHKDAY
:LEAPCHK
set /A tt=%yyyy% %% 4
if not %tt%==0 goto SET28
set /A tt=%yyyy% %% 100
if not %tt%==0 goto SET29
set /A tt=%yyyy% %% 400
if %tt%==0 goto SET29
:SET28
set /A dd=28 + %dd%
goto CHKDAY
:SET29
set /A dd=29 + %dd%
goto CHKDAY
:DONE
if /I %mm% LSS 10 set mm=0%mm%
if /I %dd% LSS 10 set dd=0%dd%
echo Date %dayCnt% day(s) before %CurDate% is %mm%/%dd%/%yyyy%
Good Luck,
Steve
|
|
|
|
|
Hi, I would like to know whether Visual Studio 2005 can be installed perfectly on Vista Ultimate.Will there be any need of installing the Service Pack 1 for Visual Studio and Service Pack Update for Vista if I'm going to install Visual Studio on a system with Vista Ultimate .
Also can anybody help me with what all service packs are needed for installing SQL Server 2005 Developer Edition on a Vista Ultimate system.
Please help !!
Jr Jith
|
|
|
|
|
juniorjith wrote: Hi, I would like to know whether Visual Studio 2005 can be installed perfectly on Vista Ultimate.
Sure.
juniorjith wrote: Will there be any need of installing the Service Pack 1 for Visual Studio
Yes, you must install this.
juniorjith wrote: and Service Pack Update for Vista
What does the name of the service pack suggest to you?? Of course, you MUST install this to get VS to work correctly under Vista.
juniorjith wrote: I'm going to install Visual Studio on a system with Vista Ultimate
It doesn't matter which edition of Vista you install VS on, they're all treated the same.
SQL Server 2005 Service Pack 2[^]
|
|
|
|
|
Hi Dave,
Thank you very much for the time you spend on my questions. i'll try either to reinstall everything on Vista Home Premium or Upgrade to Vista Ultimate and try installing softwares and the needed service packs in it.
Once again thank you very much for the suggestions !! Will let know the status after installation
Jr. Jith
|
|
|
|
|
Hi all,
I have two servers on my network both running Windows Server 2003 for Small Business Server Service Pack 1. The problem is that the one keeps shutting down due to the following problem:
This computer must be configured as a domain controller. It will be shut down in 30 minutes. To prevent this computer from shutting down, run Setup on the disk that you used to install the operating system to configure the computer as a domain controller.
But the other server is already the domain controller. Is it possible to have to domain controllers or am I setting up something wrong.
Could anyone please help me in this regard.
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Is the second a member server of the first?
Any sufficiently advanced technology is indistinguishable from magic. Arthur C. Clarke
|
|
|
|
|
HI Jerry, thanks for the response.
Jerry Hammond wrote: Is the second a member server of the first?
Yes, earlier I saw such information of the second server. When looking at the event log entry it states to continue with the setup. Which I have tried doing. One of the messages I received during the continue setup option was the following 'The computer is configured as a domain member server, indicating that it is a member of the first (domain controller) server.
What should I do ?
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
In my opinion, just have one domain controller. If you must have two, have them on separate networks; one of them will have to have two NICs so as to interface between the two networks and evade the conflict for domain control.
---------------------------
Both optimists and pessimists are important in technology. The optimist invented the aeroplane; the pessismist invented the parachute.
Regards,
Hesbon Ongira
Nairobi, Kenya.
|
|
|
|
|
|
To be honest I'm not sure at this point. I'm not sure I'm clear on what is going on after reading and re-reading your two posts. Sorry.
Any sufficiently advanced technology is indistinguishable from magic. Arthur C. Clarke
|
|
|
|
|
|
Can you use an USB hub and then stripe the USB HDDs or thumb drives?
Any sufficiently advanced technology is indistinguishable from magic. Arthur C. Clarke
|
|
|
|
|
Vaclav_Sal wrote: So - USB RAID works but it does not perform!
Vaclav_Sal wrote: No, normally you cannot set external drive ( USB ) as dynamic using the MS software.
Both statemnts are patently incorrent.
Any sufficiently advanced technology is indistinguishable from magic. Arthur C. Clarke
|
|
|
|
|
hi every one
exe is composed of the begin and end address.
when 2 exe with identical address is runing
concurrently,how can windows recognized them from each other?
for example when this command
call 0x40421
ruuning concurrently in 2 exe ,how can windows recognized them?
|
|
|
|
|
Hi,
when loading (parts of) an exe in memory, the loader allocates free memory and builds
a translation table for all addresses, which instructs the "Memory Management Unit"
(part of the CPU) on how to translate "logical addresses" (the ones you are thinking of)
to "physical addresses" (the ones where things really are).
this happens completely automatically and transparantly, you don't have to worry about it.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
this happens completely automatically and transparantly, you don't have to worry about it.
i know it but i want recognize my exe from address.
for example when one interrupt called in windows,i want recognize it called from my exe or another exe?
i try doing it with address of exe but it dont work always.
please help me
|
|
|
|
|
A kernel routine does not need knowledge about its caller; it should perform its
duties and return to the caller. If some contextual information is required it must
be passed through arguments, there is no guessing involved.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
thanks dear Luc Pattyn
good luck
|
|
|
|
|
Can anyone tell me if it is possible to display the system
taskbar on private desktops or what I need to do after creating the desktop to make more practical working
environment.
Thanks,
Ezima Ugwu.
|
|
|
|
|
i dont understand this question.
---------------------------
Both optimists and pessimists are important in technology. The optimist invented the aeroplane; the pessimist invented the parachute.
Regards,
Hesbon Ongira
Nairobi, Kenya.
|
|
|
|
|
The other day I was dissing windows for the lack of Unix's ability to create soft links. Soft links are a wonderful little tool that allows you to quickly rearrange directory structures. This could be a good thing or a bad thing . Anyway, some polite individual pointed out that Windows does too have this ability - what they call "Hard Links and Junctions".
The support page is Clicky
Now, I'm a recovering Unix-holic, and soft links, etc just work. Reliably. Seamlessly.
Reading this article, the first thing I see is that I can only create these links/junctions in Windows using an API. This would imply to me that MS did not really want to release this into the wild. Then I see two support tools - one from msdn and the other from sysinternals... still, nothing on the command line.
Have any of you actually used either of these features? Any gotchas?
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
Overheard in a cubicle: "A project is just a bug under development."
Seeking to rise above the intelligence of a one eared rabbit...
Caught in a vortex of weirdness...
|
|
|
|