How do you run a command as an administrator from the Windows command line?

All you have to do is use the runas command to run your program as Administrator (with a caveat). runas /user:Administrator “cmdName parameters” In my case, this was runas /user:Administrator “cmd.exe /C %CD%\installer.cmd %CD%” Note that you must use Quotation marks, else the runas command will gobble up the switch option to cmd. Also note … Read more

How to make Eclipse behave well in the Windows 7 taskbar?

Specify the latest available Java VM in your eclipse.ini. I.e.: -vm jdk1.6.0_10\jre\bin\client\jvm.dll Make sure they are on separate lines Anything after the “vmargs” is taken to be vm arguments (More info) Or alternatively add the java bin folder to your Windows PATH before the “windows32” folder, because otherwise eclipse uses “javaw.exe” in the win32 folder … Read more

How to request administrator permissions when the program starts?

Add the following to your manifest file: <requestedExecutionLevel level=”requireAdministrator” uiAccess=”false” /> You can also use highestAvailable for the level. Look here about embedding manifest files: http://msdn.microsoft.com/en-us/library/bb756929.aspx PS: If you don’t have a manifest file, you can easily add a new one: In Visual Studio, right click project -> Add Item -> Choose Application Manifest File … Read more

how to empty recyclebin through command prompt?

You can effectively “empty” the Recycle Bin from the command line by permanently deleting the Recycle Bin directory on the drive that contains the system files. (In most cases, this will be the C: drive, but you shouldn’t hardcode that value because it won’t always be true. Instead, use the %systemdrive% environment variable.) The reason … Read more

Run Batch File On Start-up

I had the same issue in Win7 regarding running a script (.bat) at startup (When the computer boots vs when someone logs in) that would modify the network parameters using netsh. What ended up working for me was the following: Log in with an Administrator account Click on start and type “Task Scheduler” and hit … Read more

Access Parallels Windows localhost from Mac [closed]

The above didn’t help me, but this did: Go to Windows VM, go to Start –> Run… –> type cmd.exe The windows command line opens. Type ipconfig and find out your IP4-adress. Edit your macs hosts file as described in this blogpost. Put in the following line, replacing my windows VMs local IP (here 10.211.55.5) … Read more

Have WAMP start automatically upon Windows start-up (without logging on or any UAC interference)

Follow these instructions to start the appropriate WAMP services on start-up. UAC will not interfere here and there is no need to log in to start your web-server: Log in as an administrator. Start -> Run “services.msc” Right click the service wampapache (may also be called wampapache64). Go to properties and set start-up type to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)