vbscript

Javascript in HTA File

僤鯓⒐⒋嵵緔 提交于 2021-02-08 04:10:49
问题 everytime when i try to add javascript in a hta file with vbscript it comes an error message when i click the submit button: object doesn't support this property or method I try this <script type="text/javascript" src=""></script> and this <script type="text/javascript"> ...code </script> Is there anyone who know the problem? //EDIT: I have the problem, i forgot a VBScript: to call the vbscript sub THANKS!! <input type="submit" value=" Submit " onclick="Submit" style="margin-left:100px;">

How to get or retrieve different users´ desktop folder than current user´s desktop folder with VBScript?

元气小坏坏 提交于 2021-02-07 19:52:21
问题 On a Windows computer there are three users: Administrator , UserA and UserB How to retrieve the path to UserA ´s desktop folder and UserB respectively when I am logged in as Administrator ? I am looking for VBScript that will run on Windows 7 and Windows Server 2008. I tried SpecialFolders("Desktop") , but this returns the Administrator ´s desktop folder path, not the desktop folder path of UserA . As a result I want to get the paths of C:\Users\UserA\Desktop and C:\Users\UserB\Desktop .

How to get or retrieve different users´ desktop folder than current user´s desktop folder with VBScript?

梦想的初衷 提交于 2021-02-07 19:50:42
问题 On a Windows computer there are three users: Administrator , UserA and UserB How to retrieve the path to UserA ´s desktop folder and UserB respectively when I am logged in as Administrator ? I am looking for VBScript that will run on Windows 7 and Windows Server 2008. I tried SpecialFolders("Desktop") , but this returns the Administrator ´s desktop folder path, not the desktop folder path of UserA . As a result I want to get the paths of C:\Users\UserA\Desktop and C:\Users\UserB\Desktop .

How to get or retrieve different users´ desktop folder than current user´s desktop folder with VBScript?

旧巷老猫 提交于 2021-02-07 19:50:11
问题 On a Windows computer there are three users: Administrator , UserA and UserB How to retrieve the path to UserA ´s desktop folder and UserB respectively when I am logged in as Administrator ? I am looking for VBScript that will run on Windows 7 and Windows Server 2008. I tried SpecialFolders("Desktop") , but this returns the Administrator ´s desktop folder path, not the desktop folder path of UserA . As a result I want to get the paths of C:\Users\UserA\Desktop and C:\Users\UserB\Desktop .

Unicode named Folder shows ? in wscript prompt

喜你入骨 提交于 2021-02-07 19:25:23
问题 I am facing problems with Unicode named folders. When I drag the folder to the script, it doesn't show the path of the folder properly. Simple VBScript (this is just a portion of it): Dim Wshso : Set Wshso = WScript.CreateObject("WScript.Shell") Dim FSO : Set FSO = CreateObject("Scripting.FileSystemObject") If WScript.Arguments.Count = 1 Then If FSO.FileExists(Wscript.Arguments.Item(0)) = true and FSO.FolderExists(Wscript.Arguments.Item(0)) = false Then Alert "You dragged a file, not a folder

What is the difference between New-Object -ComObject in Powershell and CreateObject() in VB?

偶尔善良 提交于 2021-02-07 18:14:29
问题 I have a question about how Windows PowerShell works when dealing with Com Interop. I have a 3rd party application (let's call it ThirdPartyApp ) that exposes an API that I can call into. I can early-bind it in e.g. Excel or Visual Studio and talk to it 'directly'. I can late-bind it in VBScript and still talk to it 'directly'. By 'directly' I mean the way I can call properties and methods exposed by the API using syntax like ThirdPartyApp.Name So in VBScript I can do: Dim api : Set api =

What is the difference between New-Object -ComObject in Powershell and CreateObject() in VB?

大城市里の小女人 提交于 2021-02-07 18:07:34
问题 I have a question about how Windows PowerShell works when dealing with Com Interop. I have a 3rd party application (let's call it ThirdPartyApp ) that exposes an API that I can call into. I can early-bind it in e.g. Excel or Visual Studio and talk to it 'directly'. I can late-bind it in VBScript and still talk to it 'directly'. By 'directly' I mean the way I can call properties and methods exposed by the API using syntax like ThirdPartyApp.Name So in VBScript I can do: Dim api : Set api =

how to check service state using vbscript?

╄→尐↘猪︶ㄣ 提交于 2021-02-07 13:57:15
问题 Is there anyway to check the status of service using vbscript ? I would like to have a function for each possible service state : LINK Any help would be great. I did write a function for checking if service is stopped : Public Function IsServiceStop(ByVal serviceName) On Error Resume Next Dim objServices, service Set oWmiService = GetObject("winmgmts:\\.\root\cimv2") Set objServices = oWmiService.ExecQuery("Select * from Win32_Service where Name='" & serviceName & "'") For Each service In

deleting certs from the “other people” certificate store

与世无争的帅哥 提交于 2021-02-07 10:28:59
问题 I have been doing some research to see if there is a way to script this functionality and I cant seem to find where these certs are actually stored. I see the other articles on "deleting certificates from store", but I think these are causing me more confusion. If I run a search like get-childitem -path cert:\CurrentUser , I don't see the Other People location. But, I am able to see the location in certmgr.msc . I have also checked the reg locations outlined here: https://technet.microsoft

deleting certs from the “other people” certificate store

孤街浪徒 提交于 2021-02-07 10:28:12
问题 I have been doing some research to see if there is a way to script this functionality and I cant seem to find where these certs are actually stored. I see the other articles on "deleting certificates from store", but I think these are causing me more confusion. If I run a search like get-childitem -path cert:\CurrentUser , I don't see the Other People location. But, I am able to see the location in certmgr.msc . I have also checked the reg locations outlined here: https://technet.microsoft