How do I create a simple setup program to install a shortcut to the desktop

How do I create simple VB program that will fit onto one disk that you type a:setup and it installs a shortcut to the desktop to access a webpage ?

I cannot find anything on how to program something like this
LVL 21
briancassinAsked:
Who is Participating?
 
mcriderConnect With a Mentor Commented:
briancassin

You still there???
0
 
mcriderCommented:
With all of the runtimes you need to provide, I don't think you're going to get a distribution to fit on one disk... MSVBVM50.DLL & MSVBVM60.DLL are 1.3MB all by themselves...


Cheers!
0
 
tkuppinenCommented:
This question has been asked several times and the answer has always been no but if anybody can prove us wrong I would be very happy.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Éric MoreauSenior .Net ConsultantCommented:
I really think that's impossible!!!

Even if you want to distribute an empty form, it is still too large to fit on 1 diskette.

I have just made the test:
-An empty form.
-Nothing changed in the references.
-No added controls.
-No database connection.
Just an empty VB 6 (SP3) application that does nothing and I have packaged it to multiple cabs 9 for 1.44 diskette distribution and I have 2 cabs to distribute.
0
 
briancassinAuthor Commented:
Ok is there anyway I can fit it onto two diskettes then ?   or do you have any other suggestions as to how I could do this but in another way other then VB????? like a shareware program or something like that
0
 
Éric MoreauSenior .Net ConsultantCommented:
>Ok is there anyway I can fit it onto two diskettes then ?  
It is depending on your application. Remember my empty form? The second CAB took only 38ko. So you can have something on your form that will make your CAB grows but if you stay with standard VB controls and your application is small, you should be able to stay on 2 disks.

But if you use database, you will for sur be well over 2 disks. For example, if you use ADO, you have to distribute MDAC_TYP.EXE (which install ADO on user'S computer) that is 6 or 7 MEG big. If your user's computer is on Win 9x and you use ADO, you must add DCOM98.EXE which is 1 meg. Plus all the VB run time files and etc and etc and etc. A normal application is often 10 megs to distribute (with an executable file around 1 meg)!!!


>or do you have any other suggestions as to how I could do this but in another way other then VB?????
If you are willing to learn C or Delphi (and surely other languages), you can build an auto-sufficient EXE because these compiler support what we call STATIC linking. With these, you can compile an EXE file and distribute it without any other files. VB doesn't support it. It has been for a long time on the wish list but not yet implemented!

0
 
briancassinAuthor Commented:
I have visual c++ ver 4.0 could that make the same program but smaller ?
0
 
tkuppinenCommented:
I am not sure if it could make it smaller.  I've only used other compilers but the fact of the matter is that C is not an easy language to learn it takes a lot of time, patience, and caffeine.  This is just my two cents worth but you should probably just save yourself the aggrevation and just use VB if at all possible.
0
 
Éric MoreauSenior .Net ConsultantCommented:
I have read your question again (we have to do so from time to time - it helps!!!).

Why don't you simply put a script? Here is an example of a script that will open your Hotmail account:

'Hotmail.vbs
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True
oIE.Navigate("www.hotmail.com")
while oIE.Busy: wend ' wait for page to load...
oIE.Document.All("login").value="LoginNameHere"
oIE.Document.All("passwd").value="PasswordHere"
oIE.Document.Forms(0).Submit

Instruct your user to copy instead of setting up. If the vbs is not recognized, you have to install WSH from http://msdn.microsoft.com/scripting/default.htm?/scripting/windowshost/docs/samples/default.htm which is 739ko.
0
 
briancassinAuthor Commented:
emoreau....

You know AOL is on a diskette.... what I would like to do is create some program that either puts a shortcut to a website on the desktop or it opens the webroser puts you to my site and a script on the site automatically bookmarks it.... or you put the diskette in run setup and it installs a web page shortcut to the desktop
0
 
Éric MoreauSenior .Net ConsultantCommented:
The vbscript that I have pasted yesterday open IE and take you to a web site of your choice.

0
 
briancassinAuthor Commented:
I do not understand that script is for hotmail.... ???   also how are they going to run the script?????
0
 
Éric MoreauSenior .Net ConsultantCommented:
In the line:
oIE.Navigate("www.hotmail.com")

if you replace hotmail.com with your YourSite.com, this will launch IE and get them to your site.

All these line needs to be in a vbs file and this script will be executed if they have WSH (if they don't, you need to distribute the other file).
0
 
briancassinAuthor Commented:
so i just place the above code with the change to it as far as the url in notepad and then save the extension as a .vbs extension as in Mysite.vbs   and then they can go to start run and run it ?    

Does that WSH file come with I.E. 4.0 and up ?

what does WSH stand for anyways ?
0
 
Éric MoreauSenior .Net ConsultantCommented:
If you don't have userid and passwaord, you can have this portion only:
'Hotmail.vbs
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True
oIE.Navigate("www.YourSite.com")
while oIE.Busy: wend ' wait for page to load...


WSH stands for "Windows script host".

I don't know with which package did WSH installs on my home PC (because it was installed). On my office PC it wasn't. I had downloaded the file and then everything was OK.

0
 
mcriderCommented:
I know this is EXTREMELY OLD, but you could use the following BATCH FILE to create a link to your webpage on the desktop...  That way, you don't have to worry about installing anything.  Just name the file SETUP.BAT...


Cheers!


THE CODE:


@ECHO OFF
REM -----------------------------------------------------------
REM - THIS RELAUNCHES THE BATCH FILE WITH A LARGE ENVIRONMENT -
REM - IN CASE THE ENVIRONMENT HAS BEEN USED UP                -
REM -----------------------------------------------------------
if "-BIG_ENV" == "%1" goto START
command /E:32768 /C %0 -BIG_ENV
goto END

REM -----------------------------------------------------------
REM - HERE IS WHERE THE BATCH FILE ACTUALLY STARTS            -
REM - MAKE SURE THE TWO SET STATEMENTS BELOW ARE CORRECT      -
REM -                                                         -
REM - Set MY_URL_PATH to the URL you want to open             -
REM -                                                         -
REM - Set MY_URL_FILE to the name of the file you're creating -
REM -----------------------------------------------------------
:START
set MY_URL_PATH=http://www.caas.com
set MY_URL_FILE=%windir%\Desktop\My Url Test.url
echo [InternetShortcut] >"%MY_URL_FILE%"
echo URL=%MY_URL_PATH% >>"%MY_URL_FILE%"
:END
EXIT

0
 
briancassinAuthor Commented:
emoreau I will have to try that and then let you know it will be a few days mcrider if emoreaus doesn;t work then i will look into your solution
0
 
Éric MoreauSenior .Net ConsultantCommented:
Responding on another question, can your problem be answered simply by providing a HTML file to the client.

By distributing the HTML, the clients will double-click on it, the default browser will open. Nothing to install.  
0
 
briancassinAuthor Commented:
emoreau that was my other option
0
 
briancassinAuthor Commented:
mcrider tried what your wrote I am highly impressed on problem though it leaves behind an msdos shortcut saying setup and make the url file ....

any ideas how I could get rid of this ?


emoreau,

I like yours too it lanuches quicker then mcrider's (no offense but if people do not have WSH then it is useless (no offense)so I think either creating the shortcut to the internet site and placing it on diskette or doing what mcrider had aid and then adding a readme document that automatically pop's up or something like that those two solutions will work.  


By the way how did you guys learn this stuff i wish I new it.... it is amazing what little coding it takes to be able to do something liek this
0
 
mcriderCommented:
briancassin

In your original question you said:

   "How do I create simple VB program that will fit onto one disk that you type a:setup and it installs a shortcut to the desktop to access a webpage ?"

If the batch file is on the diskette and called "setup.bat", it will create the desktop link to your web site when it is run and there will be no dos link on the desktop...


Cheers!
 
0
 
briancassinAuthor Commented:
yes I am mcrider sorry for the delay
0
 
briancassinAuthor Commented:
thanks mcrider
0
 
mcriderCommented:
Thanks for the points! Glad I could help!


Cheers!
0
All Courses

From novice to tech pro — start learning today.