Windows 8 and 8.1 Forums


VB Script not working

  1. #1


    Posts : 9
    windows 8

    VB Script not working


    Since this thread is similar to what I want to ask Im writing it about the problem that I have:
    In windows xp and 7 I did not have this problem but on WINDOWS 8 is a real headache, Right now I have like 20 scripts that use access 2003 that connect to SQL Data in a server, but the first problem is that I cannot map drives classic style like Z:\ or H:\ etc
    here is one simple example of the script


    Set objShell = CreateObject("WScript.Shell")
    Dim accessApp
    set accessApp = CreateObject("Access.Application")

    accessApp.Visible = "True"
    accessApp.OpenCurrentDatabase "Z:\Contabilidad\Autorun\Reportes\CHEQUEOSAB.mdb"
    accessApp.Run "ActualizaDatos"
    accessApp.CloseCurrentDatabase
    accessApp.Quit

    Set objshell = nothing
    set accessApp = nothing
    Last edited by Brink; 25 Oct 2013 at 12:37. Reason: Moved to new thread

      My System SpecsSystem Spec

  2. #2


    Sloe Deth, Californicatia
    Posts : 3,908
    Windows 8 Pro with Media Center/Windows 7


    And the drives are mapped, and connected when trying to run the script?

    Are you using Homegroup for Networking or regular MS Networking? I don't know if that would matter, Windows 7 has Homegroup too.

    I found these articles:

    Task scheduled vbscript cannot access mapped drive when run on logged off remote computer

    Access network share from within VBScript eg FileSystemObject - Stack Overflow
      My System SpecsSystem Spec

  3. #3


    Posts : 9
    windows 8


    Quote Originally Posted by XweAponX View Post
    And the drives are mapped, and connected when trying to run the script?

    Are you using Homegroup for Networking or regular MS Networking? I don't know if that would matter, Windows 7 has Homegroup too.

    I found these articles:

    Task scheduled vbscript cannot access mapped drive when run on logged off remote computer

    Access network share from within VBScript eg FileSystemObject - Stack Overflow
    Actually ; i have a windows 8, upgraded to 8.1, I even have a simple script "open notepad" that with a double click from the mouse works perfect , but if I programmed it to run in taskschd.msc it shows the state running but it doesnt show anything on screen
      My System SpecsSystem Spec

  4. #4


    Posts : 9
    windows 8


    WHY DOESN'T THE TASKSCHD.MSC WORK ON WINDOWS 8.1 IT SEEMS AS IT IS BUT IT DOESN'T DO ANYTHING FOR EXAMPLE I HAVE A VBS PROGRAM THAT OPENS NOTE PAD, IF i DOUBLE CLICK IT , IT OPENS NOTEPAD , BUT IF I PUT IT TO RUN AT A CERTAIN TIME IT DOESN'T ON TASKSCHD.MSC, I MAY DOING SOMETHING WRONG OR IS THIS A BUG BECAUSE ON WINDOWS XP WORKS PERFECTLY OR DOES IT HAVE TODO WITH THE SCRIPT ON VBS TO RUN ON WINDOWS 8.1
    Last edited by Brink; 25 Oct 2013 at 12:38. Reason: moved to original thread
      My System SpecsSystem Spec

  5. #5


    Sloe Deth, Californicatia
    Posts : 3,908
    Windows 8 Pro with Media Center/Windows 7


    You mean, NO scheduled tasks run?

    If the script ruins, it's a problem with maybe how the task was created.

    Make another scheduled task, like to open a simple program? See if it opens at the allotted time.

    Sounds like you know what you are doing with the Scripts, the problem is getting task scheduler to run it.
      My System SpecsSystem Spec

  6. #6


    Posts : 9
    windows 8


    Quote Originally Posted by XweAponX View Post
    You mean, NO scheduled tasks run?

    If the script ruins, it's a problem with maybe how the task was created.

    Make another scheduled task, like to open a simple program? See if it opens at the allotted time.

    Sounds like you know what you are doing with the Scripts, the problem is getting task scheduler to run it.
    I already did one as simple as it can be, just to open notepad.exe locally and it works perfectly on the desktop with a double click from the mouse, but if I put on taskschd.msc doesn't show anything , i don't know if it is a bug on the system win8.1 but it's killing me!!!
      My System SpecsSystem Spec

  7. #7


    Sloe Deth, Californicatia
    Posts : 3,908
    Windows 8 Pro with Media Center/Windows 7


    Well, for one thing, when you schedule a task, it normally runs hidden.

    You can look at the task, and it should tell you if it ran at the time it was meant to. I have wanted to check my "History", to see if my scheduled tasks have run, but the "History" for Task Scheduler is by default blocked.

    I have several programs that run scripts, and they are all running daily, I can check the status of some things, and it shows that the script had run.

    Is there any way to create a task that will change something in a file or a program, that you can open up later and see if the changes were applied?

    Also if a task did not run properly, it will give you an error status, so you should put t=your desired script in there, tell it to run at a certain time, then go in there about 10 minutes after the time it was scheduled, if it failed, it will say so.

    Click image for larger version

    As you can see, it shows me when the tasks will run next, and the last status. Stick your script in there, and tell it to run in 15 minutes, then check the status in 20 minutes. It will probably open Notepad, but hidden. I take it your script, I think it was, pulled up an email program and attach a document to it? Just check it and see if it had worked I guess.
      My System SpecsSystem Spec

  8. #8


    Posts : 9
    windows 8


    that's exactly what the other scripts are supposed to do, for example I have this:
    I have many of them that open an ACCESS database to pull info from SQL and update all the info, and I already check th e file and doesn't show any changes , whe nto check the history of the task but only shows 5 items, but none saying that there was a problem, and trying not to give up on win8.1, but with this problem it's really hard not to give up
      My System SpecsSystem Spec

  9. #9


    Sloe Deth, Californicatia
    Posts : 3,908
    Windows 8 Pro with Media Center/Windows 7


    Well then it has to do with being able to affect changes across the MS network, but you say the script works when run manually? Arg!

    If this is something that is needed, I'd go back to what works, until a solution is forthcoming in Windows 8.1.

    You say it works in Windows 8? You will have to weigh the advantages of using 8.1 over what works with 8. If too many things in 8.1 don't work the same way as they did in 8 then it's not worth it.

    Each time a new OS comes out, I have about 50 to 100 programs and other things I have to make sure all work right. If they don't work, I don't update.
      My System SpecsSystem Spec

  10. #10


    Posts : 9
    windows 8


    Quote Originally Posted by XweAponX View Post
    Well then it has to do with being able to affect changes across the MS network, but you say the script works when run manually? Arg!

    If this is something that is needed, I'd go back to what works, until a solution is forthcoming in Windows 8.1.

    You say it works in Windows 8? You will have to weigh the advantages of using 8.1 over what works with 8. If too many things in 8.1 don't work the same way as they did in 8 then it's not worth it.

    Each time a new OS comes out, I have about 50 to 100 programs and other things I have to make sure all work right. If they don't work, I don't update.
    only on Windows xp pro, i dont have a windows 7 pc so i cannot tell that it works there too!!!!
      My System SpecsSystem Spec

Page 1 of 2 12 LastLast
VB Script not working
Related Threads
Hey guys. just finished formating my computer (using the built in windows 8 feature). once it was up and running i uninstalled all the built in stuff lenovo brings with the computer using revo uninstaller. in the procces i also removed all registry and files those programs left.. but now theres...
hi i have problem with some app for example powershell or Troubleshooting see event : - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> - <System> <Provider Name="Application Error" /> <EventID Qualifiers="0">1000</EventID> <Level>2</Level>
VB Script not working in General Support
Hello: I am knew in this forum. I have just bought Dell XPS 12 Duo with Windows 8. I was used to working with Windows 7 and i have few VBS script which worked just fine in Windows 7. Now the same script would not work on Windows 8. I would appreciate if someone can help me resolve the...
Script movies in General Support
Every half an hour pops out this message that I have a script movies causing my PC to run slowly etc..... I do not have any script movies on at present. How can I get rid of this message that is annoying. Thanks so much. Pascale
Script Error in General Support
I keep getting a Script Error popping up, how do deal with this?
Script Errors in General Support
I use W8 Pro and this week I started to receive many different types of script errors on the MSN homepage and several other websites Ideas please on how to correct the situation. Thanks
VB Script not working in Software and Apps
Hello: I am knew in this forum. I have just bought Dell XPS 12 Duo with Windows 8. I was used to working with Windows 7 and i have few VBS script which worked just fine in Windows 7. Now the same script would not work on Windows 8. I would appreciate if someone can help me resolve the...
Eight Forums Android App Eight Forums IOS App Follow us on Facebook