Results 1 to 4 of 4

Thread: [RESOLVED] VB6, shell, and Windows 7

  1. #1

    Thread Starter
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Resolved [RESOLVED] VB6, shell, and Windows 7

    I have some code
    Code:
    Private Sub Form_Load()
    
    MsgBox "DAD Launcher - 10/19/2011 10:00"
    
    Dim filefrom As String
    Dim FileTo As String
    Dim Command As String
    
    filefrom = "Z:\DAD\TECHNI.EXE"
    FileTo = "C:\PROGRAM FILES\TECHNI\TECHNI.EXE"
    
    'first copy file
    
    FileCopy filefrom, FileTo
    
    'now fire up the program
    
    Command = "C:\PROGRAM FILES\TECHNI\TECHNI.EXE"
    Shell Command, vbNormalNoFocus
    
    End
    
    End Sub
    Everything seems to be working fine. However, when the users try to log in to the database they get an error "Cannot initialize SSPI package".

    I moved everything to a directory under the Program Files directory because W7 seems to get all upset about running programs from the C: root.

    If I manually copy the executable to their desktop and run it, they have no problem.

    So, what would be the code to copy the program to the desktop and start it?
    ===================================================
    If your question has been answered, mark the thread as [RESOLVED]

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: VB6, shell, and Windows 7

    Not enough information to diagnose your errors, but copying a program to the desktop (???) is very odd and copying it at all should not be necessary. Ideally you would find and fix your LUA bugs. LUA Buglight

    As for how to do what you ask... how would it be different from what you're doing in the code you showed? Sadly even that is a little strange. Why aren't you using a proper setup package for deployment?

  3. #3

    Thread Starter
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: VB6, shell, and Windows 7

    I do have a proper setup program. It works just fine (on the XP computers). There is just something fishy going on with the Windows 7 units. Maybe copying it to desktop would not solve anything either. I have not tried it.

    As for the "odd" program. I compile the code on my desktop and copy the executable to a shared directory on one of the servers. I can't have multiple users run a single executable. They would get an "in use" error. So this little program copies it to their local disk, That way, they don't affect the server and they have the latest version of the executable.

    Again, if I run the executable on their PC manually, it works just fine. It is only when this "automated" version starts the program that I have the problems.
    ===================================================
    If your question has been answered, mark the thread as [RESOLVED]

  4. #4

    Thread Starter
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: VB6, shell, and Windows 7

    I got it to work by taking out

    CnxnPR.Properties("Integrated Security"). Value = "SSPI"

    and replaced it with the properties of user ID & Password.
    ===================================================
    If your question has been answered, mark the thread as [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
  •  



Click Here to Expand Forum to Full Width