|
Friends,
I am using Windows Vista. I want to add a shortcut to command prompt on the desktop. I want to add it in such a manner, that whenever i double click it, the command prompt should get open with Administrative privileges by default. I don't want to right click it and select "Run as Administrator". Please tell me how to do so ?
Imtiaz
|
|
|
|
|
Well if you don't find some easy way you could always code a simple program to run it for you (with "Run as ..." from the code).
I know it's possible as I did it like a year ago, but I can't remember if I used the normal CreateProcess, or some other CreateProcessAsUser or alike. I can probably dig up the code if your having trouble...
//Johannes
|
|
|
|
|
Would be glad if you could tell the way to do it.
Imtiaz
|
|
|
|
|
OK, I looked at my code, and this is what i did:
system("runas /user:Administrator \"setup.exe /install /noreboot\"");
Since this is a normal CMD command (whats inside the "" of system() ) you can just call it from a .bat/.cmd file.
Note that it will ask you for the password each time, and i dont think you can send the password as a param. (But you could create a c++ program which emulates the keyboard pressing keys (this would be very insecure as you can easily to fetch out the password))
//Johannes
|
|
|
|
|
There's a little program that can take care of password problem for you called sanur.exe[^]
Use it like this:
runas /u:domain\username \\servername\path\command.cmd | \\servername\path\sanur.exe password
Or read the text in the link (several pages)
|
|
|
|
|
Johpoke wrote: it will ask you for the password each time,
Better.
Johpoke wrote: you could create a c++ program which emulates the keyboard pressing keys (this would be very insecure as you can easily to fetch out the password))
That would be a bad practice.
Thanks for the cool code snippet. I am voting a '5'.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi,
I want to boot dos from pen drive. I dont have floppy drive. I am using windows xp professional. How can I do this?
|
|
|
|
|
|
Sorry but both links are not working. (host not accessible error).
|
|
|
|
|
, they work fine for me. Maybe your behind some corporate firewall that is blocking them?
They will (for a limited time only) be on my server @ http://johannes.shacknet.nu/DOS_USB_DISK.zip[^]
Note to other people: Please only download from my server if you can not download from extremeoverclocking.com (trying to keep bandwidth usage low)
//Johannes
|
|
|
|
|
Hi, I have a problem with my computer that affect with virus trojan.metajuan, trojan.vundo and downloader. I have checked an information from an internet such as the removal technique from symantec and also use windows defender, lavasoft adware and spybot removal. It just detect and guaranteen the file, but when i start my computer especially internet explorer, my machine run very slow and display another internet explorer windows... I try to delete the registry key, running process which is description in the document... but the problem still exist.
Does anyone know any tool or solution to solve this problem?
Thank in Advance
|
|
|
|
|
Well you could boot up in safemode (by pressing F8 right before windows starts loading (and keep pressing it till you get to the boot menu)). Once in safemode you could install avast home edition[^], start avast, and then tell it to perfrom a boot scan.[^] If avast doesnt happend to have the definitions for the malware try some other good antivirus like NOD32...
Note that if you want to keep avast later you will have to reinstall it in normal mode so it can create the services it needs...
//Johannes
|
|
|
|
|
Thank you very much for your recommendation. Now I try to disable IE add-ons component and I found some dll file that i suspect it as the virus. Then I disable those files. Now it seem my computer run faster but I know that I didn't clean the virus yet.
Thank again for your valuable information.
|
|
|
|
|
This is definitely not the place to ask it. We are a development community, not an anti-malware community. People here may ask you to do obvious things like disabling IE addons, checking the startup list for suspicious entries, etc., But there is definitely much more than that. Please go to Bleeping computer forums[^] and ask them for help. You'd get expert guidance there.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
We have two broadband routers providing internet connections for our office. How do I setup my gateways on the our office nodes (XP Pro), so that we can access internet even when one fails.
The problem is that since these routers are always available, but their internet links may fail at times. Therefore, if I have the first router as my gateway, and its internet link fails, I cannot connect to the internet. This despite that I have a second gateway configured on my PC pointing to the second router.
From what I have found, Windows passes on my requests to the first gateway as it is available, which cannot locate the server I am trying to connect, because its link is down. Hence, my connection fails. So, how can I setup a routing configuration such that my PC can transparently switch over to the second router when the first one's internet link goes down?
Also, how can I implement some kind of load balancing, so that some nodes are routed thru router#1 and some thru router#2 when both are available?
Thanks!
|
|
|
|
|
Hello!
First you need some basic routing skills for you to solve this. You should place the routers within the same network, then add routes with equal metrics, therefore if one link goes down, the routers should communicate with each other so that they pass traffic to the available gateway (in Cisco routers, CDP does this-it updates neighbouring routers of the status of one another). For eg if you have router a and b, incase router a is down, router a will receive traffic from the client pcs and since its status is down it will route traffic to router b, it knows the status of b, up. When both links are up, you can use static routes to direct traffic to the interfaces on your routers depending on the size of your network. This can balance your load.
---------------------------
Both optimists and pessimists are important in technology. The optimist invented the aeroplane; the pessimist invented the parachute.
Regards,
Hesbon Ongira
Nairobi, Kenya.
|
|
|
|
|
Does anyone have any ideas on how to detect from a UNC share how remote (or fast) it is, i.e. is it on LAN or WAN etc?
I need to be able to look at a list of UNCs and determine the fastest accessible one, to use for storing some temporary files for fast access by client apps.
I have tried using MultinetGetConnectionPerformance to determine the connection speed, but it doesn't return sensible results.
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
|
Other than doing a ICMP ping to the target box, there's no real way to do this. No matter what you use though, there is nothing that takes into account the load on the target box. So, you may have a quick TCP/IP path to it, but the box is too busy to respond in a timely fashion.
|
|
|
|
|
Thanks for your reply.
This makes perfect sense - I hadn't taken into account the time for a machine to pull it's finger out and get around to responding!
I had another couple of thoughts though: Given that all I want to do is to offer a user a reasonably sensible default server share to use for storing 'local-ish' cached data, from a list of admin-configured possibilities, what about either finding out where the server is geographically, and seeing which is closest to the client, or even finding out the server's time zone, and using the one with the smallest offset from the client? Not sure if either of these are possible or feasible. Any ideas?
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
|
Well, timezone doesn't guarantee localness.
A method that I though about would be to generate a table of primary and alternate cache servers using IP network information. The application could get it's own IP address and subnet, figure out it's network address, then lookup in this table what the closest cache server would be and use that. If the first cache server fails, the alternate could be used.
Or, the list of cache server could be used so the client could tracert to each server and figure out the closest server by hop count, and alternatively, by response time of the pings going to it. Maybe even a weighted evaluation of connection quality. This, of course, would take a considerable amount of time compared to other schemes, but is possible to do with shorted cache server lists, maybe even limited by the user picking a geographic region.
|
|
|
|
|
Many thanks for the info. It gives us some other things to play with, though given that we're only in practice looking at two or three alternative servers, I think for now we'll probably just ask the user to choose which one to use the first time they need it!
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
|
Friends,...
My sony vio laptop has been restored to factory settings, and I lost all the data on the hard drive,
I tried to restore the system to 1 week back and do somthing, but failed,
If any once konw the smart way to extact data out of my hard drive,
...any tool to try.. pls hlep me!!
Thanks in Advance...
|
|
|
|
|
ptr_Electron wrote: ...any tool to try.. pls hlep me!!
not sure if it will help.... but http://www.partition-recovery.com/[^] active @ partition saved my behind once when a drive was erased.... saved all but two files....
unfortunately, resetting back to factory conditions is a destructive operation that generally includes format and file copy from the recovery image. The format is only partially destructive, depending on the format tool and options, but the file copy is always destructive. Anything that was under those clusters now occupied by the new factory condition image is lost to everyone but a forensic computer tech. I have heard that forensic analysis of a disk can bring back the last 10+ copies of the data that was on any given cluster, but it is expensive, extremely expensive.
there are also these: http://www.thefreecountry.com/utilities/datarecovery.shtml[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Testdisk and Photorec are your friends.
Photorec is intended to recover pictures, movies and musik from flash-drives, but does a good job on other drives as well.
Testdisk can recover lost partitions (not sure if that was your problem).
These two are a "must have". Seriously. If you haven't heard of them, get them.
Cheers,
Sebastian
--
"If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
|
|
|
|
|
Hi,
Here is the situation:
I have 2 computers with WINXP.
And one Pocket PC with windows mobile 2003.
I'm developing a network socket application...
The application is running on one computer and pocket PC.
The application works ( I can test it ) on the 2 computers.
Now I need to test it on the pocket PC, and the PPC must have a internet connection, which he gets by connecting to one of the computers through ActiveSync.
So the PPC is connected to one of the computers while the other computer sends data to the other computer.
But the PPC doesn't receive that data because ActiveSync is on another port, and the application opens a port (8000) on the pocket PC not on the computer...
So how could I route all data that is coming to a PC (only the data that is coming on port 8000, on which the pocket PC is connected) to the pocket PC port 8000, which is connected through USB ActiveSync connection?
I know this is quite complicating...
But please if you can help...
Thank you!
|
|
|
|