
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2015 06:59 PM
I want to run a custom vb script I made what exactly would be my steps? If I run it using psexec all I run is cscript script.vbs and it is silent to the user.
Solved! Go to Solution.
Labels:
- Labels:
-
General Discussion
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2015 08:06 PM
The easiest and most flexible way would be to use the deployment feature. This allows you to define Installers, scripts, commands to be executed on your client computers. You don't need psexec in this case as deployment packages will be executed directly on the client machines. For details on how to create a deployment package, please refer to this article. For instructions on how to deploy it, refer to this article.
On the other hand, if you would like to use an asset action, which gets executed on the computer you are using to open the web console:
On the other hand, if you would like to use an asset action, which gets executed on the computer you are using to open the web console:
- Place your vbs script into your Lansweeper actions folder (Program Files (x86)\Lansweeper\Actions by default, but you can configure another one under Configuration\Asset pages)
- Under Configuration\Asset pages, section Asset actions, create a new asset action which calls the script you would like to execute
- Afterwards you will be able to use the asset action on the asset pages of your computers.
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2015 03:38 PM
Hi, greyclear
I think is getting stuck when arrives to a Wscript.Echo, that pops a window with a OK button. I suggest comment or delete them.
regards
I think is getting stuck when arrives to a Wscript.Echo, that pops a window with a OK button. I suggest comment or delete them.
regards

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2015 02:42 PM
The message "Package timeout reached" typically indicates that either your script was not finished successfully (i.e. because it required user interaction, you can test this by manually running the script on the affected target computer) or the package step did not include an Action on Success and/or Action On Failure. These need to be defined. After the execution of the last step of your package you need to set the action to "Stop(Success)" or "Stop(Failure)".

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2015 10:53 PM
This is the script I am running
On Error Resume Next
CName = "."
f1 = 0
f2 = 0
'group name to remove users from
Set LocAdmGroup = GetObject("WinNT://" & CName & "/Administrators")
' loop through all members of the Administrators Group
For Each AdmGrpUser In LocAdmGroup.Members
f1=f1+1
IF (AdmGrpUser.Name <> "Administrator") And (AdmGrpUser.Name <> "Domain Admins") And (AdmGrpUser.Name <> "poweruser") Then
f2=f2+1
IF f2=1 then
Wscript.Echo "Removed Domain Users from Local Administrators Group"
End IF
Wscript.Echo AdmGrpUser.Name
' remove users from Administrators group
LocAdmGroup.Remove AdmGrpUser.ADsPath
End IF
Next
IF f1=2 Then
Wscript.Echo "Domain Users Weren't Found in Local Administrators Group!"
End IF
If err.number<>0 then
WScript.Echo "Script Check Failed"
Wscript.Quit 1001
Else
WScript.Echo "Script Check Passed"
Wscript.Quit 0
End If

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2015 09:49 PM
The logs show this
Initialization complete! Waiting for client to respond. Credential: (domain\domainadmin). ShareCredential: (localuseraccount).
Result: Package timeout reached. Stopping deployment executable: Successful. Timeout:
Initialization complete! Waiting for client to respond. Credential: (domain\domainadmin). ShareCredential: (localuseraccount).
Result: Package timeout reached. Stopping deployment executable: Successful. Timeout:

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2015 08:06 PM
The easiest and most flexible way would be to use the deployment feature. This allows you to define Installers, scripts, commands to be executed on your client computers. You don't need psexec in this case as deployment packages will be executed directly on the client machines. For details on how to create a deployment package, please refer to this article. For instructions on how to deploy it, refer to this article.
On the other hand, if you would like to use an asset action, which gets executed on the computer you are using to open the web console:
On the other hand, if you would like to use an asset action, which gets executed on the computer you are using to open the web console:
- Place your vbs script into your Lansweeper actions folder (Program Files (x86)\Lansweeper\Actions by default, but you can configure another one under Configuration\Asset pages)
- Under Configuration\Asset pages, section Asset actions, create a new asset action which calls the script you would like to execute
- Afterwards you will be able to use the asset action on the asset pages of your computers.
