|
-
Jan 2nd, 2007, 08:24 PM
#1
Thread Starter
Member
[RESOLVED] About Autorun [Next level]
Ok, I know now how to make CD autorun a certain file.
VB Code:
[autorun]
open=myapp.exe
icon=myicon.ico
Now, the next level I want to know is that, how do I make a program in VB6 that runs a certain file in the CD. Say for example, I want to run SetupMenu.exe located in the CD? This SetupMenu.exe is the menu of the files that needed to be installed from the CD. I want to do this because last year (december) I made a BINGO program in VB6 that, and packaged it. I used MS Agent control and i wanted to include the installer of the files needed to run ms agent properly, which is included in cd under "MS Agent" folder. How do I do this? Thank you in advance. (Be back later, I have school. )
Happy New Year to all!~~~
-Lex
Last edited by lex_ph; Jan 2nd, 2007 at 08:27 PM.
-
Jan 2nd, 2007, 08:46 PM
#2
Re: About Autorun [Next level]
If the VB program is going to be in the main folder and the SetupMenu.exe is going to be in another folder
D:\ CD Drive
---SetUpMenu Folder
------SetupMenu.exe
---You VB6 Program
Then you can use shell to open the program
VB Code:
Shell App.Path & "\Directory to the other Exe\ExeName.exe"
Last edited by Andrew G; Jan 2nd, 2007 at 08:51 PM.
Reason: Darn Typos
-
Jan 3rd, 2007, 03:27 AM
#3
Hyperactive Member
Re: About Autorun [Next level]
Remember that a VB6 program will not execute on computers running Windows 2000 or older due to missing runtime libraries. I think that the VB6 runtime libraries were only distributed from Win XP and later... 
What will happen if the user has Win 2000 or older, he will get an error when inserting the CD.
-
Jan 3rd, 2007, 03:29 AM
#4
Re: About Autorun [Next level]
You can add the runtime files to the CD in the same location as the exe and it will run your VB 6 program from CD.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 3rd, 2007, 03:38 AM
#5
-
Jan 3rd, 2007, 04:24 AM
#6
Re: About Autorun [Next level]
If you add the redistributable VB 6 runtime files then you are within licensing rules.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 3rd, 2007, 07:15 AM
#7
Thread Starter
Member
Re: About Autorun [Next level]
ok i will try these. thanks for the help, be back for updates
-
Jan 3rd, 2007, 12:06 PM
#8
Thread Starter
Member
Re: About Autorun [Next level]
question? what do i include in the code if i want to just browse the CD contents?
VB Code:
Private Sub cmdButton_Click(Index As Integer)
Select Case Index
Case 0 'bingo main
Shell App.Path & "\Bingo.Files\CpE.Bingo\Setup.exe"
Case 1 'robby
Shell App.Path & "\Bingo.Files\MS.Agent\Robby.exe"
Case 2 'tts engine
Shell App.Path & "\Bingo.Files\MS.Agent\tv_enua.exe"
Case 3 'sapi 4.0
Shell App.Path & "\Bingo.Files\MS.Agent\spchapi.exe"
Case 4 'browse cd
[color=red]????[/color]
End Sub
-
Jan 3rd, 2007, 01:11 PM
#9
Thread Starter
Member
Re: About Autorun [Next level]
ok, i just found out the solution to my problem, i just wanted some explanation about the code.
VB Code:
...
Case 4 'browse CD
CurrentDirectory = Left(App.Path, 3)
Shell "explorer " & CurrentDirectory, vbMaximizedFocus
...
what are these for? especially the "Left(App.Path, 3)" and the "explorer " part. What are the other 'stuff' aside from "explorer " that i can call? thanks~~~
-
Jan 3rd, 2007, 04:29 PM
#10
Re: About Autorun [Next level]
CurrentDirectory = Left(App.Path, 3)
Its getting the first 3 characters of the path which will be the drive letter of the CDROM drive that your ap is located on if its on a CD.
Then the Shell line is starting an instance of Explorer set to the path of the CDROM root drive. It will open maximized to the location of the app.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 3rd, 2007, 09:31 PM
#11
Thread Starter
Member
Re: About Autorun [Next level]
ok now i get it. i am learning a lot from you guys~~ thank you very much.. this thread is now RESOLVED~~~
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|