|
Silly me
Thanks buddy!
|
|
|
|
|
hi all,
I'm building a program that copies files from network computers.
now i got everything running good except one little thing.
sometimes the computer "forgets" the remote dir user and pass and requests them.
but if it happens and im running my program it wont ask for the user and pass but rather quits with an error.
now my problem is that every now and then i need to enter the passwords manually by going into the dir s.
i tired to find a solution but i couln't find any...
if anyone can help me with:
1. Prompt the user to enter the user and pass.
<b><u><big>or</big></u></b>
2. The program will enter the user and pass automatically.
thanks alot!
p.s
the program is written in visual c#.
it runs on two computers one of them is win 2000 (NT), another is WINXP. most problems are on the NT comp.
example for network drive file i need to copy \\1.1.1.1\c$\test.txt
|
|
|
|
|
The API "LogonUser" may be your friend.
|
|
|
|
|
Hi eveybody.
i want to make a file extention for my program but this file contains files.
just like (.pptx) power point extention.
example : my.proj
the file my contains many files (like zip file)
please help me.
thank you
"" i am new to programming ""
|
|
|
|
|
And your question is?
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
i want to wknow how to make a zip file but not .zip
|
|
|
|
|
OK, I assume English is not your native language?
If I read your post correctly, you want to store many files in a single file, similar to the way that powerpoint and WinZip do, but with your own file extension.
If you are new to programming this may be a little advanced for you, but:
You can create your own ZIP files, using an addon, which can have any extension you wish.
Have a look at this article[^] which does musch of that.
There are also various other ZIP utilities you can use from c#: SharpZipLib, DotNetZip etc. - Google is your friend here. I haven't used any of them, so I can't comment on how good they are (or aren't).
If you don't want to use ZIP, then you have a fair amount to do: You will have to invent a file format that will hold variable length files, and transfer them in and out yourself.
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
So why not just use a ZIP file?
|
|
|
|
|
because i want it to be in my extention
thank you all for responding.
|
|
|
|
|
Try using something like this[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
You can use the built-in Package class for this.
|
|
|
|
|
Hi,
I'm trying to access all the services in a remote server, the ObjectQuery "Select * from Win32_Service" is not displaying the user created services, is there any other query needed to retrieve this info, please advice me,
Thanks,
D.Vinoth
|
|
|
|
|
Does this only happen if you execute this query on a remote server or does it even happen if
you do this query on your local machine?
If I execute your query local, it shows me also the user created services.
Greetings
Covean
|
|
|
|
|
Hi Covean,
Thanks for the reply. It is working fine in my local system, the problem is with server only...
any idea on this...
Thanks,
D.Vinoth
|
|
|
|
|
Found something on MSDN maybe that helps (but I think you already have this right):
"A user connecting from a remote computer must have the SC_MANAGER_CONNECT privilege enabled to be able to enumerate this class. For more information, see Service Security and Access Rights. "
If I remember your last posts, you connect to the remote machine by some useraccount thats valid on this machine. Is it possible to login with this useraccount local on the remote machine?
If so, I would try to execute the query there local and see if, it differs from the one you get by remote query. If it doesn't differ, I would assume that your user account needs more privileges.
Greetings
Covean
|
|
|
|
|
Hi,
How do i get the current quarter and year?
i.e. Q12010
Thanks
|
|
|
|
|
Hi,
DateTime.Today returns today's date.
ToString() will format it in one of many ways, however quarters are not supported.
You can calculate them yourself, as (Month+2)/3
FYI: I summarized some general information in this article[^], I will add some examples about weeks and quarters later on.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Luc Pattyn wrote: You can calculate them yourself, as (Month+2)/3
You do like to be abtuse, sometimes: (Month / 4) + 1 works as well, and is a little more obvious that it is Quarters rather than Thirds?
I am allowed to be stupid on Fridays - it's in my contract!
Just don't listen to me today, my brain is just not responding...
[edit]I am an idiot![/edit]
All those who believe in psycho kinesis, raise my hand.
modified on Friday, January 22, 2010 9:52 AM
|
|
|
|
|
Huh?
Where I live, there are four quarters in a year (as in most everything else), so each quarter holds three months. That means the divisor has to be three, not four.
Month 1 2 3 4 5 6 7 8 9 10 11 12
(Month+2)/3 1 1 1 2 2 2 3 3 3 4 4 4
(Month/4)+1 1 1 1 2 2 2 2 3 3 3 3 4
! ! !
[ADDED]
((Month-1)/3)+1 would be fine too, however I always prefer the other form, as it looks better (for me at least), and it is somewhat safer, with an outer operator of higher precedence so you can subtract it from something without needing extra parentheses; that is somewhat similar to inverse order tests such as if (null==variable)... , which I don't use!
[/ADDED]
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
modified on Friday, January 22, 2010 12:49 PM
|
|
|
|
|
pwnd.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Had to look that up!
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Oops! Sorry about that - corrected.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
OriginalGriff wrote: I am an idiot!
IMO you're quite OK, well, most of the time.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
DateTime.Now has properties that give you the current month and year. You'll have to figure out the quarter yourself but it's a simple
DateTime now = DateTime.Now;
if (now.Month < 4)
{
}
else if (now.Month < 7)
{
}
else . . .
EDIT: I need to refresh my browser more often
|
|
|
|
|
I have created two form,When I Open form1 and then close it then open Form2 and close it.After that reopen form1 then Label field text is getting removed in form1.
Thanx in Adv.
|
|
|
|