Solved

popup advertisements

Posted on 2004-04-22
5
316 Views
Last Modified: 2010-04-17
what i m trying to do is like a popup , which means , i will put a file into the user's computer , i will write it on my way
<!--
open url http://www.yahoo.com after 20 minutes
open url http://www.hotmail.com after 40 minutes
if Os = 2000 , 2003, or xp then
execute some code lines
--!>
but this script must be exe , no maro in which langage it must be.
and when the execution finishs , it must reload again
thanks
0
Comment
Question by:skynoc
5 Comments
 
LVL 28

Expert Comment

by:peakpeak
ID: 10890335
You're actually trying to plant an executable file on someone else's computer? (or execute something of YOUR choice on someone else's computer?)
That is exactly what virus writers (try to) do ....

Regards
Peter
0
 

Author Comment

by:skynoc
ID: 10891724
actually i m not planning to make a virus
but some advertisements for a local workgroup
i will install this file manually into each computer
that's all
it is a netcaffe
0
 
LVL 28

Expert Comment

by:peakpeak
ID: 10891758
Ok
0
 
LVL 2

Accepted Solution

by:
funvill earned 500 total points
ID: 10895983
In MFC its easy

in the OnInitDialog() function put your timers

      SetTimer(1, 1000*60*60*30, NULL); // 30 min
      SetTimer(2, 1000*60*60*60, NULL); // 60 min
      SetTimer(3, 1000*3, NULL); // 3 sec

int the OnTimer() function put your urls

      if( nIDEvent == 1 ) // every 30 min
      {
            ShellExecute(NULL, "open", "http://www.yahoo.com", NULL, NULL, SW_SHOWNORMAL);
      }
      else if ( nIDEvent == 2 ) // every 60 min
      {
            ShellExecute(NULL, "open", "http://www.hotmail.com", NULL, NULL, SW_SHOWNORMAL);
      }
      else if  ( nIDEvent == 3 ) // every 3 sec
      {
            ShellExecute(NULL, "open", "http://www.funvill.com", NULL, NULL, SW_SHOWNORMAL);
      }



Hope this helps.
0
 
LVL 8

Expert Comment

by:rajaloysious
ID: 10896464
VB is still easier as it is a RAD.
You can use timers.
Also the development time would be fast.
Use Shell command to execute anything you do from the command prompt.
Timer control is there for your use.

Also you will not get GPFs or any crashes especially if you are new to MFC.

VB is the best tool in my opinion. Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question