How to resolve “The requested URL was rejected. Please consult with your administrator.” error?

Your http is being blocked by a firewall from F5 Networks called Application Security Manager (ASM). It produces messages like: Please consult with your administrator. Your support ID is: xxxxxxxxxxxx So your application is passing some data that for some reason ASM detects as a threat. Give the support id to your network engineer to … Read more

Creating and writing lines to a file

Set objFSO=CreateObject(“Scripting.FileSystemObject”) ‘ How to write file outFile=”c:\test\autorun.inf” Set objFile = objFSO.CreateTextFile(outFile,True) objFile.Write “test string” & vbCrLf objFile.Close ‘How to read a file strFile = “c:\test\file” Set objFile = objFS.OpenTextFile(strFile) Do Until objFile.AtEndOfStream strLine= objFile.ReadLine Wscript.Echo strLine Loop objFile.Close ‘to get file path without drive letter, assuming drive letters are c:, d:, etc strFile=”c:\test\file” s … Read more

What’s the environment variable for the path to the desktop?

To be safe, you should use the proper APIs in Powershell (or VBScript) Using PowerShell: [Environment]::GetFolderPath(“Desktop”) Copy something using Powershell: Copy-Item $home\*.txt ([Environment]::GetFolderPath(“Desktop”)) Here is a VBScript-example to get the desktop path: dim WSHShell, desktop, pathstring, objFSO set objFSO=CreateObject(“Scripting.FileSystemObject”) Set WSHshell = CreateObject(“WScript.Shell”) desktop = WSHShell.SpecialFolders(“Desktop”) pathstring = objFSO.GetAbsolutePathName(desktop) WScript.Echo pathstring

insert a variable to cmd command

LabelName doesn’t need to be a shell object, as it’s just a string. Then concatenate the string onto the run command and you are done. Set oShell = WScript.CreateObject(“WScript.Shell”) Dim LabelName LabelName = InputBox(“Please Enter Label to check-out:”, _ “Create File”) oShell.run “cmd /K “”c:\Program Files (x86)\Borland\StarTeam Cross-Platform Client 2008 R2\stcmd.exe”” co -p bla:[email protected]:7777/bla/ -is … Read more