vimasum
Posts: 3
Joined: Tue Jul 10, 2012 6:01 pm

"Set as Your Home Page" dialogs

I want to Make a setup and I want to add some search engine link on it and set a dialog/command to ask from installer to set as your home page. How does ad this ? You can see what i going to say on this picture
Attachments
Capture.JPG
Capture.JPG (38.5 KiB) Viewed 4272 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: "Set as Your Home Page" dialogs

Hello,

From your initial thread I assume you already know the command line which sets your website as home page and how to execute it.

All you need to do is add a checkbox control (Dialogs page) and use its property as a condition for the "Launch file or open URL" custom action that executes the command line during the install.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vimasum
Posts: 3
Joined: Tue Jul 10, 2012 6:01 pm

Re: "Set as Your Home Page" dialogs

Thank You For Your Reply. I tried to do this but i can't make a .bat file. because i don't know how to write a .bat file. So please help me and Send me a reply.

Code: Select all

AskThenOpenURL("Question... ?")

Function AskThenOpenURL(strPrompt)
  Const msiMessageTypeUser = &H03000000
  Dim ans
  
  Set record = Session.Installer.CreateRecord(0)
  record.StringData(0) = strPrompt
  ans = Session.Message(msiMessageTypeUser + vbYesNo + vbQuestion, record)
  
  If ans = vbYes Then
    OpenURL("http://www.your-site.com/uninstall.htm") 
  End If
End Function

Function OpenURL(strURL)
   Set WshShell = CreateObject("WScript.Shell")
   ret = WshShell.Run(strURL, 1, False)
End Function
This is a program to run a url after instalation or unstalaton. But I need a program code to make a .bat file for set my search engine as home page and set as default search engine.Please reply me
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: "Set as Your Home Page" dialogs

Hello,

Unfortunately we cannot create or debug custom actions. However, you can search the Internet for the most convenient solution.
An approach would be to modify some registry values in the browser's registry install location. If you choose this approach, you can perform these registry operations from the Registry page without having to create a .BAT or custom action.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”