problem: customers stock system doesnt play nice with web, so stock levels and prices are manually updated each morning. local copy of website on sales laptops information can be out by two weeks!
what im not doing: calling in sales reps every day to get up-to-date info
so, vbs to the rescue again. as this is a text file, read into an array by php live it is uploaded using ftp binary type to preserve carriage returns. downloading via ascii should preserve this file characteristic.
on error resume next
url = "onlinepathhere"
path = "localpathhere"
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "GET", url, False
xmlhttp.send()
if xmlhttp.Status = 200 then 'if status is anything other than 200 it is not ready
Set fstemp = CreateObject("Scripting.FileSystemObject")
fstemp.GetFile(path + "pricelist.bak").Delete 'on error statement ensure script carries on if file doesnt exist
fstemp.MoveFile path + "pricelist.dat", path + "pricelist.bak"
Set filetemp = fstemp.CreateTextFile(path + "pricelist", true)
filetemp.write (xmlhttp.responseText)
filetemp.close
else
msgbox "please ensure that you are connected to the internet to update stock figures" + vbcrlf + vbcrlf + "if you are connected please try again later"
end if
wscript.quit()
Friday, 20 June 2008
Wednesday, 18 June 2008
winxp wmi / wbem problems (for no good reason!)
problem: tasklist wont run (dialogue framedyn.dll not found) and the following error in event viewer
step 1 - copy framedyn.dll from %windir%\system32\dllcache to %windir%\system32\wbem (as admin)... tasklist runs, but logging out & back in takes us back to problem!
step 2 - run rundll32 wbemupgd, UpgradeRepository to diagnose and repair wmi... wbemupdg module not found... no good!
step 3 - run rundll32.exe setupapi,InstallHinfSection WBEM 132 %windir%\inf\wbemoc.inf, insert winxppro cd then restart... now i have additional warnings along with initial problem!
A provider, HiPerfCooker_v1, has been registered in the WMI namespace, Root\WMI, to use the LocalSystem account. This account is privileged and the provider may cause a security violation if it does not correctly impersonate user requests.
A provider, CmdTriggerConsumer, has been registered in the WMI namespace, Root\cimv2, to use the LocalSystem account. This account is privileged and the provider may cause a security violation if it does not correctly impersonate user requests.
A provider, Rsop Planning Mode Provider, has been registered in the WMI namespace, root\RSOP, but did not specify the HostingModel property. This provider will be run using the LocalSystem account. This account is privileged and the provider may cause a security violation if it does not correctly impersonate user requests. Ensure that provider has been reviewed for security behavior and update the HostingModel property of the provider registration to an account with the least privileges possible for the required functionality.
may have to come back to this one...
The Windows Security Center Service was unable to establish event queries with WMI to monitor third party AntiVirus and Firewall.
what im not doing: an 'inplace reinstall' [edit: i maybe am!]
step 1 - copy framedyn.dll from %windir%\system32\dllcache to %windir%\system32\wbem (as admin)... tasklist runs, but logging out & back in takes us back to problem!
step 2 - run rundll32 wbemupgd, UpgradeRepository to diagnose and repair wmi... wbemupdg module not found... no good!
step 3 - run rundll32.exe setupapi,InstallHinfSection WBEM 132 %windir%\inf\wbemoc.inf, insert winxppro cd then restart... now i have additional warnings along with initial problem!
A provider, HiPerfCooker_v1, has been registered in the WMI namespace, Root\WMI, to use the LocalSystem account. This account is privileged and the provider may cause a security violation if it does not correctly impersonate user requests.
A provider, CmdTriggerConsumer, has been registered in the WMI namespace, Root\cimv2, to use the LocalSystem account. This account is privileged and the provider may cause a security violation if it does not correctly impersonate user requests.
A provider, Rsop Planning Mode Provider, has been registered in the WMI namespace, root\RSOP, but did not specify the HostingModel property. This provider will be run using the LocalSystem account. This account is privileged and the provider may cause a security violation if it does not correctly impersonate user requests. Ensure that provider has been reviewed for security behavior and update the HostingModel property of the provider registration to an account with the least privileges possible for the required functionality.
may have to come back to this one...
Friday, 6 June 2008
remote remote desktop
problem: forgot to enable rdp on domain workstation
what im not doing: driving all the way there to tick a box!
easy, connect to remote registry, navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
change
fDenyTSConnections
to
0
what im not doing: driving all the way there to tick a box!
easy, connect to remote registry, navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
change
fDenyTSConnections
to
0
Wednesday, 14 May 2008
windows nt command line enable / disable accounts
problem: enabling temp admin account for app specific use (yes, sage again!)
what im not doing: going through the server management console just for this
pretty simple from the command line, but difficult to find and documentation on it
net user tempaccount /active:[yes|no]
picked up that there is also a /time switch for enabling only during certain times, but dont need this just now
what im not doing: going through the server management console just for this
pretty simple from the command line, but difficult to find and documentation on it
net user tempaccount /active:[yes|no]
picked up that there is also a /time switch for enabling only during certain times, but dont need this just now
Monday, 12 May 2008
ubuntu desktop enviroment summary
problem: keep forgetting this stuff
what im not doing: raking through forums every time i need reference
ubuntu (gnome desktop enviroment)
login manager: gdm
window manager: metacity
file manager: nautilus
kubuntu (kde desktop enviroment)
login manager: kdm
window manager: kwin
file manager: konqueror
xubuntu
login manager: xdm
window manager: xfce(4)
file manager: thunar
can all be mixed / matched / added / removed, but this is the default setup
what im not doing: raking through forums every time i need reference
ubuntu (gnome desktop enviroment)
login manager: gdm
window manager: metacity
file manager: nautilus
kubuntu (kde desktop enviroment)
login manager: kdm
window manager: kwin
file manager: konqueror
xubuntu
login manager: xdm
window manager: xfce(4)
file manager: thunar
can all be mixed / matched / added / removed, but this is the default setup
Thursday, 1 May 2008
xp show / hide login
problem: a friend and his family have just got their pc back from re-installation and wish to have everyones login reduced to limited user
what im not doing: disabling the graphical login screen
this instance applies specifically to xphome, but can translate to pro dependent on its applied use. as you no doubt know, winxp home requires at least one user account with admin rights in addition to the existing administrator account, which can only log on in safe mode. the idea is to setup an account with admin rights, hide it from the graphical logon screen and leave all additional users as 'limited users'. this situation isnt really scalable as adding any additional users and basic admin right dependent tasks cannot be performed from user only accounts, but my friend was ok with this.
so, create your user scheme then, as a member of admin navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList
create a dword named the account name that you wish to hide, and assign the hex value '0'. if you need to log in under this account, 'ctrl-alt-del' x2 at the glogin screen and enter your credentials. easy!
what im not doing: disabling the graphical login screen
this instance applies specifically to xphome, but can translate to pro dependent on its applied use. as you no doubt know, winxp home requires at least one user account with admin rights in addition to the existing administrator account, which can only log on in safe mode. the idea is to setup an account with admin rights, hide it from the graphical logon screen and leave all additional users as 'limited users'. this situation isnt really scalable as adding any additional users and basic admin right dependent tasks cannot be performed from user only accounts, but my friend was ok with this.
so, create your user scheme then, as a member of admin navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList
create a dword named the account name that you wish to hide, and assign the hex value '0'. if you need to log in under this account, 'ctrl-alt-del' x2 at the glogin screen and enter your credentials. easy!
Tuesday, 1 April 2008
bluetooth phone (samsung) to laptop (ubuntu 6.06 lts)
problem: installing strange, unstable drivers for cheap, bluetooth dongle on windows, but phone getting full.
what im not doing: installing strange, unstable drivers for cheap, bluetooth dongle on windows
stick in the dongle, lsusb;
Bus 001 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
then dmesg to check if kernel modules are present and loading;
[17179599.760000] Bluetooth: HCI device and connection manager initialized
[17179599.760000] Bluetooth: HCI socket layer initialized
[17179599.816000] Bluetooth: HCI USB driver ver 2.9
[17179599.816000] usbcore: registered new driver hci_usb
the above makes me happy! so, to the terminal;
sudo gedit /etc/rc.local
and add to the bottom;
hciconfig hci0 inqmode 0 (not sure if this is required but google told me, restart the machine)
hcitool scan gives me the phones mac and all seems good to go! pair from the phone (1234 by default) and i thought i was there! unfortunately i couldnt find 'applications > accessories > bluetooth file sharing', so a quick;
sudo apt-get install gnome-bluetooth
start it up and send to the home folder. class, linux does it again!
what im not doing: installing strange, unstable drivers for cheap, bluetooth dongle on windows
stick in the dongle, lsusb;
Bus 001 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
then dmesg to check if kernel modules are present and loading;
[17179599.760000] Bluetooth: HCI device and connection manager initialized
[17179599.760000] Bluetooth: HCI socket layer initialized
[17179599.816000] Bluetooth: HCI USB driver ver 2.9
[17179599.816000] usbcore: registered new driver hci_usb
the above makes me happy! so, to the terminal;
sudo gedit /etc/rc.local
and add to the bottom;
hciconfig hci0 inqmode 0 (not sure if this is required but google told me, restart the machine)
hcitool scan gives me the phones mac and all seems good to go! pair from the phone (1234 by default) and i thought i was there! unfortunately i couldnt find 'applications > accessories > bluetooth file sharing', so a quick;
sudo apt-get install gnome-bluetooth
start it up and send to the home folder. class, linux does it again!
Subscribe to:
Posts (Atom)