Khamis, 10 April 2008

Setup your windows OS as a webserver using WampServer 2.0

1) Download wamp from the this site
2) Install it into your computer
3) Now turn off your windows firewall
4) Open your web browser and go to http://localhost
5) Now your computer has become a web server
6) I'm not finish yet. The purpose of a web server is to enable other computer to
access it right.
7) Your web server can only be access from your computer not from other computer
8) In order to fix that, go to Wamp icon located at icon tray(bottom right meter icon)
9) Click once, go to Apache>httpd.conf
10)Find element 'Directory "c:/wamp/www/">'
11)In that element, find these lines:
onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
12) Change the one that I highlighted above to 'Allow from all'
13) Save the file
14) Click the Wamp icon once and click Restart All Services
15) Now your computer can be access from another computer ex:http://urcomputername

Additional info: Setup a personal home web server

Jumaat, 4 April 2008

Using elevated privileges in Wix

When you create an installer using Wix, usually you need an elevated privileges to execute a program or run services using custom action. This usually happen in Windows Vista. So, to do that use this custom action element:

CustomAction Id="shutdownprogram" Impersonate="no" FileKey="stfu" Execute="deferred" Execommand="/shutdown" return="ignore">

As you can see in the above code, you need to use the 'Impersonate="no" and Execute="deferred" element. I repeat, you need to use these element otherwise you didn't get the permission to execute scripts or programs. Weird solution but it works.