A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: What's wrong with my code

  1. #1
    Senior Member carbonX's Avatar
    Join Date
    Jul 2001
    Location
    Virginia
    Posts
    261

    What's wrong with my code

    I'm trying to run an .exe file if the current version of the software is 17.1,
    but I keep getting errors. Any suggestions would be appreciated!

    Set WshShell = CreateObject("WScript.Shell")
    dname = WshShell.RegRead("HKCU\Software\Autodesk\AutoCAD\C urVer")
    If (dname=17.1) Then
    WshShell.Run ("c:\windows\paint.exe")
    Else
    End If
    wscript.Quit

  2. #2
    Senior Member carbonX's Avatar
    Join Date
    Jul 2001
    Location
    Virginia
    Posts
    261
    Nevermind, I got it to work...

    Dim a
    strPath = "HKCU\Software\Autodesk\AutoCAD\CurVer"

    Set objShell = WScript.CreateObject("WScript.Shell")
    a = objShell.RegRead(strPath)
    If (a = a) Then
    objShell.Run "C:\WINDOWS\system32\mspaint.exe"
    Else
    Wscript.Echo a
    End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center