Jul 15, 2010 #1 atxstl Programmer Jul 15, 2010 1 US Hi, I'm trying to execute the following line of code. It was compiled on XP, and works on XP, but does not work on Windows 7 Code: Dim shell Set shell = CreateObject("wscript.shell") shell.run "myfile.bat" Set shell = Nothing Any advice? Thanks.
Hi, I'm trying to execute the following line of code. It was compiled on XP, and works on XP, but does not work on Windows 7 Code: Dim shell Set shell = CreateObject("wscript.shell") shell.run "myfile.bat" Set shell = Nothing Any advice? Thanks.
Jul 15, 2010 #2 HughLerwill Programmer Nov 22, 2004 1,818 GB Your code is running for me under Vista when I substitute 'myfile.bat' with 'notepad.exe'. Personally I would not dim shell because Shell clashes with the name of a built-in VB6 Function, have you tried diming it with a different name. Are you getting any error message. Upvote 0 Downvote
Your code is running for me under Vista when I substitute 'myfile.bat' with 'notepad.exe'. Personally I would not dim shell because Shell clashes with the name of a built-in VB6 Function, have you tried diming it with a different name. Are you getting any error message.
Jul 15, 2010 #3 dilettante MIS Apr 13, 2001 4,475 US I wonder if the program is in the Programs folder? It might be a file virtualization side effect. Upvote 0 Downvote