Solved

Script to Identify the OS

Posted on 2004-10-27
160 Views
Last Modified: 2010-05-02
Hi
I have a power point point presentation in a CD that runs as autorun when u insert the CD.Before the presentation starts i want to Identify the OS and install some fonts in the corresponding font folders and then run the PPT...How can i do this ...any idea/suggestion.. ?
 
0
Question by:jinupt
    8 Comments
     
    LVL 26

    Accepted Solution

    by:
    Set WshShell = CreateObject("WScript.Shell")
    Set WshSysEnv = WshShell.Environment("PROCESS")
    wscript.echo WshSysEnv("OS")
    Set WshSysEnv = Nothing
    Set WshShell = Nothing
    0
     
    LVL 9

    Expert Comment

    by:Shahid Thaika
    Instead of finding the operating system first and then install fonts in its fonts folder, you may want to directly install fonts in the windows font folder. One methd is by querying the registry key 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders' for data in 'Fonts' value.
    0
     
    LVL 9

    Assisted Solution

    by:Shahid Thaika
    0
     

    Author Comment

    by:jinupt
    but If i write an app in VB will it run from a CD ..if i copy all the supporting dll's to CD ??
    0
     
    LVL 9

    Expert Comment

    by:Shahid Thaika
    You can write the code in the setup executable file. Make a copy of VB's setup program and modify it. And then add the OS finding code to it. Your code is sure to be executed
    0
     

    Author Comment

    by:jinupt
    ok..thx
    0
     
    LVL 9

    Expert Comment

    by:Shahid Thaika
    let me know if you need any help :)
    0
     

    Author Comment

    by:jinupt
    Sure...
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    856 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now